forked from Aquaveo/xmsmesh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
151 lines (141 loc) · 5.54 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
env:
global:
# TRAVIS_BRANCH is tag name if tag provided else branch name
- XMS_VERSION: $TRAVIS_BRANCH
- CONAN_REFERENCE: "xmsmesh/${XMS_VERSION}"
- CONAN_USERNAME: "aquaveo"
- CONAN_CHANNEL: "stable"
- CONAN_LOGIN_USERNAME: $CONAN_USER_SECRET
- CONAN_PASSWORD: $CONAN_PASSWORD_SECRET
- CONAN_REMOTES: $AQUAVEO_CONAN
- GH_REPO_NAME: xmsmesh
- DOXYFILE: $TRAVIS_BUILD_DIR/Doxygen/Doxyfile
- GH_REPO_REF: github.com/Aquaveo/xmsmesh.git
- PYTHON_TARGET_VERSION: 2.7
linux: &linux
os: linux
sudo: required
language: python
python:
- 2.7
services:
- docker
osx: &osx
os: osx
language: generic
stages:
# Builds configurations and runs tests on library
# Also test documentation for undocumented code
- name: test
if: NOT tag IS present
# Builds configurations and runs tests on library and publishes library to conan
- name: deploy
if: tag =~ ^\d+\.\d+\.\d+$
# This needs to be done on tags so that we have python package to read from.
- name: documentation
# Global Lifecycle Steps
# See: https://docs.travis-ci.com/user/customizing-the-build/#The-Build-Lifecycle
# Install Step
install:
- chmod +x .travis/install.sh
- ./.travis/install.sh
# Build Step
script:
- chmod +x .travis/run.sh
- ./.travis/run.sh
# After Success
after_success:
- python test.py
# Jobs/Build Matrix
# Note: Lifecycle Steps specified in stages will override Global Lifecycle Steps
jobs:
include:
# --- TEST STAGE ------------------------------------------------------------------------------------------------
# GCC 5
- stage: test
<<: *linux
env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=lasote/conangcc5 CONAN_BUILD_TYPES=Debug CONAN_ARCHS=x86_64
- stage: test
<<: *linux
env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=lasote/conangcc5 CONAN_BUILD_TYPES=Release CONAN_ARCHS=x86_64
# GCC 6
- stage: test
<<: *linux
env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=lasote/conangcc6 CONAN_BUILD_TYPES=Debug CONAN_ARCHS=x86_64
- stage: test
<<: *linux
env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=lasote/conangcc6 CONAN_BUILD_TYPES=Release CONAN_ARCHS=x86_64
# GCC 7
- stage: test
<<: *linux
env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=lasote/conangcc7 CONAN_BUILD_TYPES=Debug CONAN_ARCHS=x86_64
- stage: test
<<: *linux
env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=lasote/conangcc7 CONAN_BUILD_TYPES=Release CONAN_ARCHS=x86_64
# OSX
- stage: test
<<: *osx
osx_image: xcode9.2
env: CONAN_APPLE_CLANG_VERSIONS=9.0 CONAN_BUILD_TYPES=Debug CONAN_ARCHS=x86_64
- stage: test
<<: *osx
osx_image: xcode9.2
env: CONAN_APPLE_CLANG_VERSIONS=9.0 CONAN_BUILD_TYPES=Release CONAN_ARCHS=x86_64
# --- DEPLOY STAGE ----------------------------------------------------------------------------------------------
# GCC 5
- stage: deploy
<<: *linux
env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=lasote/conangcc5 CONAN_UPLOAD=$AQUAVEO_CONAN CONAN_BUILD_TYPES=Debug CONAN_ARCHS=x86_64
after_success: true
- stage: deploy
<<: *linux
env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=lasote/conangcc5 CONAN_UPLOAD=$AQUAVEO_CONAN CONAN_BUILD_TYPES=Release CONAN_ARCHS=x86_64
after_success: true
# GCC 6
- stage: deploy
<<: *linux
env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=lasote/conangcc6 CONAN_UPLOAD=$AQUAVEO_CONAN CONAN_BUILD_TYPES=Debug CONAN_ARCHS=x86_64
after_success: true
- stage: deploy
<<: *linux
env: CONAN_GCC_VERSIONS=6 CONAN_DOCKER_IMAGE=lasote/conangcc6 CONAN_UPLOAD=$AQUAVEO_CONAN CONAN_BUILD_TYPES=Release CONAN_ARCHS=x86_64
after_success: true
# GCC 7
- stage: deploy
<<: *linux
env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=lasote/conangcc7 CONAN_UPLOAD=$AQUAVEO_CONAN CONAN_BUILD_TYPES=Debug CONAN_ARCHS=x86_64
after_success: true
- stage: deploy
<<: *linux
env: CONAN_GCC_VERSIONS=7 CONAN_DOCKER_IMAGE=lasote/conangcc7 CONAN_UPLOAD=$AQUAVEO_CONAN CONAN_BUILD_TYPES=Release CONAN_ARCHS=x86_64
after_success: true
# OSX
- stage: deploy
<<: *osx
osx_image: xcode9.2
env: CONAN_APPLE_CLANG_VERSIONS=9.0 CONAN_UPLOAD=$AQUAVEO_CONAN CONAN_BUILD_TYPES=Debug CONAN_ARCHS=x86_64
after_success: true
- stage: deploy
<<: *osx
osx_image: xcode9.2
env: CONAN_APPLE_CLANG_VERSIONS=9.0 CONAN_UPLOAD=$AQUAVEO_CONAN CONAN_BUILD_TYPES=Release CONAN_ARCHS=x86_64
after_success: true
# DOCUMENTATION
- stage: documentation
dist: trusty
compiler: gcc
language: cpp
addons:
apt:
packages:
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz
<<: *linux
env: TASK_NAME=Documentation
script:
- cd $TRAVIS_BUILD_DIR
- chmod +x generateDocumentationAndDeploy.sh
- sudo docker run -v $PWD:/home/conan -e "TRAVIS_BUILD_DIR=/home/conan" -e "TRAVIS_BUILD_NUMBER=${TRAVIS_BUILD_NUMBER}" -e "TRAVIS_COMMIT=${TRAVIS_COMMIT}" -e "DOXYFILE=/home/conan/Doxygen/Doxyfile" -e "SPHINX_CONF=/home/conan/pydocs/source/conf.py" -e "GH_REPO_NAME=${GH_REPO_NAME}" -e "GH_REPO_REF=${GH_REPO_REF}" -e "GH_REPO_TOKEN=${GH_REPO_TOKEN}" -e "TRAVIS_TAG=${TRAVIS_TAG}" lasote/conangcc6 /bin/sh generateDocumentationAndDeploy.sh