Skip to content

Commit

Permalink
Feature ci adjust compilers (#7)
Browse files Browse the repository at this point in the history
* improvements for CI

* use bitprim tools

* adding submodule

* using common code

* submodules

* update submodule

* update submodule

* fix conanfile

* fixes

* update submodule

* fixes

* using common code from submodule

* fixes

* cmake fixes

* test appveyor

* test appveyor

* test appveyor

* test appveyor

* test appveyor

* test appveyor 2

* test appveyor 2

* test appveyor 3

* skip appveyor detection

* fix

* test travis and [skip appveyor]

* CI script fixes

* test [skip appveyor]

* test [skip travis]

* disable skip appveyor [skip ci]

* conan channel management

* update submodule

* create conan_channel file in CI

* git ignore update [skip ci]

* avoid using conan_channel file, to test

* it is not necesary to create the conan_channel

* remove comments
  • Loading branch information
fpelliccioni authored Jun 26, 2018
1 parent 980a602 commit 769e3e8
Show file tree
Hide file tree
Showing 17 changed files with 171 additions and 426 deletions.
84 changes: 75 additions & 9 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017 Bitprim developers (see AUTHORS)
# Copyright (c) 2017-2018 Bitprim Inc.
#
# This file is part of Bitprim.
#
Expand All @@ -22,7 +22,9 @@ branches:
- master
- dev
- /^v\d+\.\d+\.\d+$/
- feature_compile_time_currencies
- /^release-\d+\.\d+\.\d+$/
- /^feature-ci-.+$/
- /^feature_ci_.+$/

build: false

Expand All @@ -32,21 +34,53 @@ environment:
PYTHON_ARCH: "32"

matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
CONAN_VISUAL_VERSIONS: 14
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CONAN_VISUAL_VERSIONS: 15
VS150COMNTOOLS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\Tools\\"

# - MINGW_CONFIGURATIONS: "5.4@x86_64@seh@posix" #5.4@x86_64@sjlj@posix"
# - MINGW_CONFIGURATIONS: "7.2@x86_64@seh@posix" #7.2@x86_64@sjlj@posix"

- MINGW_CONFIGURATIONS: "7@x86_64@seh@posix, 6@x86_64@seh@posix, 5@x86_64@seh@posix, 4.9@x86_64@seh@posix"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
CONAN_VISUAL_VERSIONS: 14

# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# CONAN_VISUAL_VERSIONS: 12
# CONAN_VISUAL_VERSIONS: 12

# - MINGW_CONFIGURATIONS: "7@x86_64@seh@posix, 6@x86_64@seh@posix, 5@x86_64@seh@posix, 4.9@x86_64@seh@posix"

- MINGW_CONFIGURATIONS: "8@x86_64@seh@posix"
- MINGW_CONFIGURATIONS: "7@x86_64@seh@posix"
- MINGW_CONFIGURATIONS: "6@x86_64@seh@posix"
- MINGW_CONFIGURATIONS: "5@x86_64@seh@posix"
# - MINGW_CONFIGURATIONS: "4.9@x86_64@seh@posix"


init:
# - echo "*******************************************************"
# - echo %APPVEYOR_REPO_TAG%
# - echo %APPVEYOR_REPO_BRANCH%
# - echo %APPVEYOR_REPO_TAG_NAME%
# - echo %APPVEYOR_REPO_COMMIT_MESSAGE%
# - echo "*******************************************************"

- ps: |
if ($Env:APPVEYOR_REPO_BRANCH -ceq "master" -And [string]::IsNullOrEmpty($Env:APPVEYOR_REPO_TAG_NAME)) {
Write-Host "branch is master without tags, exiting"
Exit-AppveyorBuild
}
# Note(fernando): It is implemented natively in Appveyor...
# if ($Env:APPVEYOR_REPO_COMMIT_MESSAGE -like "*\[skip appveyor\]*") {
# Write-Host "[skip appveyor] detected in commit message, exiting"
# Exit-AppveyorBuild
# }
install:
# - echo "*******************************************************"
# - echo %APPVEYOR_REPO_TAG%
# - echo %APPVEYOR_REPO_BRANCH%
# - echo %APPVEYOR_REPO_TAG_NAME%
# - echo %APPVEYOR_REPO_COMMIT_MESSAGE%
# - echo "*******************************************************"

- set PATH=%PATH%;%PYTHON%/Scripts/

- pip.exe install conan --upgrade
Expand All @@ -58,9 +92,41 @@ install:
- conan user # It creates the conan data directory

test_script:

- git submodule init
# - git submodule update --remote
- git submodule update
# - dir *.*

# - git fetch --unshallow
# - export BITPRIM_BUILD_NUMBER="$(git describe)"
- for /f %%i in ('git describe') do set BITPRIM_BUILD_NUMBER=%%i
- echo %BITPRIM_BUILD_NUMBER%

# - echo %APPVEYOR_REPO_BRANCH%
# - dir *.*
# - cd

- ps: |
if ($Env:APPVEYOR_REPO_BRANCH -ceq "dev") {
$Env:BITPRIM_CONAN_CHANNEL = "testing"
}
elseif ($Env:APPVEYOR_REPO_BRANCH.StartsWith("release")) {
$Env:BITPRIM_CONAN_CHANNEL = "stable"
}
elseif ($Env:APPVEYOR_REPO_BRANCH.StartsWith("feature")) {
$Env:BITPRIM_CONAN_CHANNEL = $Env:APPVEYOR_REPO_BRANCH
}
else {
$Env:BITPRIM_CONAN_CHANNEL = "stable"
}
# if ([System.IO.File]::Exists("conan_channel")) {
# Write-Host "Creating conan_channel file"
# $Env:BITPRIM_CONAN_CHANNEL | Out-File conan_channel
# }
# - dir *.*
# - echo %BITPRIM_CONAN_CHANNEL%

- python build.py
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ CMakeSettings.json
/.vs/ProjectSettings.json
/.vs/slnx.sqlite

.vscode/
.vscode/

get_branch.py
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ci_utils"]
path = ci_utils
url = https://github.com/bitprim/bitprim-ci-utils.git
92 changes: 68 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2017 Bitprim developers (see AUTHORS)
# Copyright (c) 2017-2018 Bitprim Inc.
#
# This file is part of Bitprim.
#
Expand All @@ -19,11 +19,12 @@

branches:
only:
- master
# - master
- dev
- /^v\d+\.\d+\.\d+$/
- feature_compile_time_currencies

- /^release-\d+\.\d+\.\d+$/
- /^feature-ci-.+$/
- /^feature_ci_.+$/

linux: &linux
os: linux
Expand All @@ -39,65 +40,108 @@ osx: &osx

matrix:
include:
- <<: *linux
env: PUSH_TO_REPOS=true
# - <<: *linux
# env: PUSH_TO_REPOS=true

# Linux, GCC, libstdc++ ------------------------------------------------------
- <<: *linux
env: CONAN_GCC_VERSIONS=4.9 CONAN_DOCKER_IMAGE=lasote/conangcc49
env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=lasote/conangcc8
BITPRIM_RUN_TESTS=true

- <<: *linux
env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=lasote/conangcc5
env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=lasote/conangcc7

- <<: *linux
env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=lasote/conangcc63
env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=lasote/conangcc6

- <<: *linux
env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=lasote/conangcc7
BITPRIM_RUN_TESTS=true
env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=lasote/conangcc5

- <<: *linux
env: CONAN_CLANG_VERSIONS=3.9 CONAN_DOCKER_IMAGE=lasote/conanclang39
# - <<: *linux
# env: CONAN_GCC_VERSIONS=4.9 CONAN_DOCKER_IMAGE=lasote/conangcc49

# Linux, Clang, libstdc++ ----------------------------------------------------
- <<: *linux
env: CONAN_CLANG_VERSIONS=4.0 CONAN_DOCKER_IMAGE=lasote/conanclang40
env: CONAN_CLANG_VERSIONS=6.0 CONAN_DOCKER_IMAGE=lasote/conanclang60

- <<: *linux
env: CONAN_CLANG_VERSIONS=5.0 CONAN_DOCKER_IMAGE=lasote/conanclang50

- <<: *osx
osx_image: xcode7.3
env: CONAN_APPLE_CLANG_VERSIONS=7.3
- <<: *linux
env: CONAN_CLANG_VERSIONS=4.0 CONAN_DOCKER_IMAGE=lasote/conanclang40

# - <<: *linux
# env: CONAN_CLANG_VERSIONS=3.9 CONAN_DOCKER_IMAGE=lasote/conanclang39

# macOS, apple-Clang, libc++ -------------------------------------------------
- <<: *osx
osx_image: xcode9
env: CONAN_APPLE_CLANG_VERSIONS=9.0
BITPRIM_RUN_TESTS=true

- <<: *osx
osx_image: xcode8.3
env: CONAN_APPLE_CLANG_VERSIONS=8.1

- <<: *osx
osx_image: xcode9
env: CONAN_APPLE_CLANG_VERSIONS=9.0
BITPRIM_RUN_TESTS=true
osx_image: xcode7.3
env: CONAN_APPLE_CLANG_VERSIONS=7.3

before_install:
- |
if [[ "${TRAVIS_COMMIT_MESSAGE}" = *"[skip travis]"* ]]; then
echo "[skip travis] detected in commit message, exiting"
travis_terminate 0
fi
install:
- cd ${TRAVIS_BUILD_DIR}

- |
if [[ "${PUSH_TO_REPOS}" != "true" ]]; then
chmod +x .travis/install.sh
./.travis/install.sh
chmod +x ci_utils/.travis/install.sh
./ci_utils/.travis/install.sh
fi
script:
- git fetch --unshallow
- export BITPRIM_BUILD_NUMBER="$(git describe)"
- echo "${BITPRIM_BUILD_NUMBER}"

- |
echo "${TRAVIS_BRANCH}"
if [[ "${TRAVIS_BRANCH}" = "dev" ]]; then
export BITPRIM_CONAN_CHANNEL="testing"
elif [[ "${TRAVIS_BRANCH}" = "release"* ]]; then
export BITPRIM_CONAN_CHANNEL="stable"
elif [[ "${TRAVIS_BRANCH}" = "feature"* ]]; then
export BITPRIM_CONAN_CHANNEL="${TRAVIS_BRANCH}"
else
export BITPRIM_CONAN_CHANNEL="stable"
fi
echo "${BITPRIM_CONAN_CHANNEL}"
# pwd
# ls -ltra
# if [ -e conan_channel ] then
# echo "Creating conan_channel file"
# printf "${BITPRIM_CONAN_CHANNEL}" > conan_channel
# fi
# ls -ltra
- |
if [[ "${PUSH_TO_REPOS}" == "true" ]]; then
chmod +x .travis/push_other_repo.sh
./.travis/push_other_repo.sh
else
cd ${TRAVIS_BUILD_DIR}
chmod +x .travis/run.sh
./.travis/run.sh
chmod +x ci_utils/.travis/run.sh
./ci_utils/.travis/run.sh
fi
notifications:
Expand Down
28 changes: 0 additions & 28 deletions .travis/install.sh

This file was deleted.

13 changes: 0 additions & 13 deletions .travis/run.sh

This file was deleted.

7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,14 @@ message( STATUS "Bitprim: Compiling for ${MICROARCHITECTURE}")
# endif()


if(EXISTS ${CMAKE_SOURCE_DIR}/bitprimbuildinfo.cmake)
include(${CMAKE_SOURCE_DIR}/bitprimbuildinfo.cmake)
if(EXISTS ${CMAKE_SOURCE_DIR}/ci_utils/cmake/bitprimbuildinfo.cmake)
include(${CMAKE_SOURCE_DIR}/ci_utils/cmake/bitprimbuildinfo.cmake)
else()
message( STATUS "bitprimbuildinfo doent exists")
endif()



set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/ci_utils/cmake)

include(Secp256k1Tools)

Expand Down
File renamed without changes.
42 changes: 0 additions & 42 deletions bitprimbuildinfo.cmake

This file was deleted.

Loading

0 comments on commit 769e3e8

Please sign in to comment.