Skip to content

Commit

Permalink
Feature ci test travis stages (#9)
Browse files Browse the repository at this point in the history
* test stages

* OSs

* OSs 2

* OSs 3

* OSs 4

* OSs 5

* OSs 6

* stages test 1

* stages test 1

* stages test 2

* stages test 3

* stages test 4

* stages test 5

* stages test 6

* stages test 6

* stages test 7

* stages test 8

* stages test 9

* conditional run of jobs

* some changes 10

* some changes 11

* some changes 12

* some changes 13

* add versioning functionality

* add versioning functionality 2

* add versioning functionality 4

* add versioning functionality 5

* add versioning functionality 6

* add versioning functionality 7

* add versioning functionality 8

* add versioning functionality 9

* fix for Python 3

* passing environment variables to docker

* fixes

* test for travis 1

* test for travis 2

* test for travis 3

* test for travis 4

* test for travis 5

* test for travis 6

* test for travis 7

* test for travis 8

* test for travis 9

* test for travis 10

* test for travis 11

* test for travis 12

* test for travis 13

* test for travis 14

* test for travis 15

* test for travis 16

* test for travis 17

* test for travis 18

* test for travis 19

* test for travis 20

* test for travis 21

* test for travis 22

* test for travis 23

* remove logs

* test what happens on macOS

* push to repos using CI APIs

* test for travis 28

* calling python after activate pyenv on macOS

* calling python after activate pyenv on macOS 2

* removing logs
  • Loading branch information
fpelliccioni authored Jun 30, 2018
1 parent ca58037 commit 9916969
Show file tree
Hide file tree
Showing 9 changed files with 273 additions and 160 deletions.
2 changes: 2 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ branches:
- /^release-\d+\.\d+\.\d+$/
- /^feature-ci-.+$/
- /^feature_ci_.+$/
- /^feature-appveyor-.+$/
- /^feature_appveyor_.+$/

build: false

Expand Down
252 changes: 196 additions & 56 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
branches:
only:
# - master
# - /^v\d+\.\d+\.\d+$/
- dev
- /^v\d+\.\d+\.\d+$/
- /^release-\d+\.\d+\.\d+$/
- /^hotfix-\d+\.\d+\.\d+$/
- /^feature-ci-.+$/
- /^feature_ci_.+$/
- /^feature-travis-.+$/
- /^feature_travis_.+$/

linux: &linux
os: linux
Expand All @@ -38,55 +41,6 @@ osx: &osx
os: osx
language: generic

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

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

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

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

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

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

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

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

- <<: *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: xcode7.3
env: CONAN_APPLE_CLANG_VERSIONS=7.3

before_install:
- |
if [[ "${TRAVIS_COMMIT_MESSAGE}" = *"[skip travis]"* ]]; then
Expand All @@ -104,26 +58,40 @@ install:
fi
script:
# - python ci_utils/print_version.py
- export BITPRIM_BRANCH="${TRAVIS_BRANCH}"
- git fetch --unshallow
- export BITPRIM_BUILD_NUMBER="$(git describe)"
- echo "${BITPRIM_BUILD_NUMBER}"
# - export BITPRIM_BUILD_NUMBER="$(git describe)"
# - export BITPRIM_BUILD_NUMBER="$(python ci_utils/print_version.py)"
# - export BITPRIM_CONAN_VERSION="${BITPRIM_BUILD_NUMBER}"
# - echo "${BITPRIM_BUILD_NUMBER}"
# - echo "${BITPRIM_CONAN_VERSION}"


- |
echo "${TRAVIS_BRANCH}"
if [[ "${TRAVIS_BRANCH}" = "dev" ]]; then
export BITPRIM_CONAN_CHANNEL="testing"
export BITPRIM_FULL_BUILD=0
elif [[ "${TRAVIS_BRANCH}" = "release"* ]]; then
export BITPRIM_CONAN_CHANNEL="stable"
export BITPRIM_FULL_BUILD=1
elif [[ "${TRAVIS_BRANCH}" = "hotfix"* ]]; then
export BITPRIM_CONAN_CHANNEL="stable"
export BITPRIM_FULL_BUILD=1
elif [[ "${TRAVIS_BRANCH}" = "feature"* ]]; then
export BITPRIM_CONAN_CHANNEL="${TRAVIS_BRANCH}"
export BITPRIM_FULL_BUILD=0
else
export BITPRIM_CONAN_CHANNEL="stable"
export BITPRIM_FULL_BUILD=1
fi
echo "${BITPRIM_CONAN_CHANNEL}"
# echo "${BITPRIM_CONAN_CHANNEL}"
# echo "${BITPRIM_FULL_BUILD}"
# if [ -e conan_channel ] then
# echo "Creating conan_channel file"
# printf "${BITPRIM_CONAN_CHANNEL}" > conan_channel
# if [ ! -f conan_version ]; then
# echo "Creating conan_version file"
# printf "${BITPRIM_BUILD_NUMBER}" > conan_version
# fi
Expand All @@ -137,6 +105,178 @@ script:
./ci_utils/.travis/run.sh
fi
jobs:
include:

# Static Checks ------------------------------------------------------
- stage: static checks
install: skip
# script:
# - chmod +x .travis/push_other_repo.sh
# - ./.travis/push_other_repo.sh

script: echo "Running checks (1)"
# script:
# - export BITPRIM_BRANCH="${TRAVIS_BRANCH}"
# - git fetch --unshallow
# # - export BITPRIM_BUILD_NUMBER="$(git describe)"
# - export BITPRIM_BUILD_NUMBER="$(python ci_utils/print_version.py)"
# - echo "${BITPRIM_BUILD_NUMBER}"

# Unit Tests ------------------------------------------------------
- stage: unit tests
os: linux
sudo: required
language: python
python: "3.6"
services:
- docker
env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=lasote/conangcc7 CONAN_UPLOAD=""
BITPRIM_RUN_TESTS=true

# Builds ------------------------------------------------------
# Linux, GCC, libstdc++ ------------------------------------------------------
- stage: build and upload binaries
os: linux
sudo: required
language: python
python: "3.6"
services:
- docker
env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=lasote/conangcc8
if: branch =~ /^(release|hotfix).+$/

- stage: build and upload binaries
os: linux
sudo: required
language: python
python: "3.6"
services:
- docker
env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=lasote/conangcc7

- stage: build and upload binaries
os: linux
sudo: required
language: python
python: "3.6"
services:
- docker
env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=lasote/conangcc6
if: branch =~ /^(release|hotfix).+$/

- stage: build and upload binaries
os: linux
sudo: required
language: python
python: "3.6"
services:
- docker
env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=lasote/conangcc5
if: branch =~ /^(release|hotfix).+$/


# - stage: build and upload binaries
# os: linux
# sudo: required
# language: python
# python: "3.6"
# services:
# - docker
# env: CONAN_GCC_VERSIONS=4.9 CONAN_DOCKER_IMAGE=lasote/conangcc49
# if: branch =~ /^(release|hotfix).+$/


# Linux, Clang, libstdc++ ----------------------------------------------------
- stage: build and upload binaries
os: linux
sudo: required
language: python
python: "3.6"
services:
- docker
env: CONAN_CLANG_VERSIONS=6.0 CONAN_DOCKER_IMAGE=lasote/conanclang60

- stage: build and upload binaries
os: linux
sudo: required
language: python
python: "3.6"
services:
- docker
env: CONAN_CLANG_VERSIONS=5.0 CONAN_DOCKER_IMAGE=lasote/conanclang50
if: branch =~ /^(release|hotfix).+$/

- stage: build and upload binaries
os: linux
sudo: required
language: python
python: "3.6"
services:
- docker
env: CONAN_CLANG_VERSIONS=4.0 CONAN_DOCKER_IMAGE=lasote/conanclang40
if: branch =~ /^(release|hotfix).+$/

# - stage: build and upload binaries
# os: linux
# sudo: required
# language: python
# python: "3.6"
# services:
# - docker
# env: CONAN_CLANG_VERSIONS=3.9 CONAN_DOCKER_IMAGE=lasote/conanclang39

# macOS, apple-Clang, libc++ -------------------------------------------------
- stage: build and upload binaries
os: osx
language: generic
osx_image: xcode9
env: CONAN_APPLE_CLANG_VERSIONS=9.0 BITPRIM_RUN_TESTS=true

- stage: build and upload binaries
os: osx
language: generic
osx_image: xcode8.3
env: CONAN_APPLE_CLANG_VERSIONS=8.1
if: branch =~ /^(release|hotfix).+$/

- stage: build and upload binaries
os: osx
language: generic
osx_image: xcode7.3
env: CONAN_APPLE_CLANG_VERSIONS=7.3
if: branch =~ /^(release|hotfix).+$/


# Push to repos ------------------------------------------------------
- stage: push to repos
install: skip
# script: echo "Running push to repos"
script:
- chmod +x .travis/push_other_repo.sh
- ./.travis/push_other_repo.sh


# # Integration Tests ------------------------------------------------------
# - stage: integration tests
# install: skip
# script: echo "Running integration tests (Guille)"


# - stage: deploy to staging
# install: skip
# script: skip
# - stage: test staging
# install: skip
# script: 'curl http://sf-stages-staging.herokuapp.com'
# - stage: deploy to production
# install: skip
# script: skip
# - stage: test production
# install: skip
# script: 'curl http://sf-stages-production.herokuapp.com'


notifications:
email: false
webhooks:
Expand Down
Loading

0 comments on commit 9916969

Please sign in to comment.