-
Notifications
You must be signed in to change notification settings - Fork 23
/
.travis.yml
265 lines (242 loc) · 7.95 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
language: python
sudo: required
cache:
pip: true
directories:
- $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853
addons:
apt:
packages: &native_deps_apt
- strace
- valgrind
update: true
homebrew: &native_deps_brew
packages:
- valgrind
update: true
os:
- linux
python:
- 3.6
env:
global:
NUMPY=numpy
MATPLOTLIB=matplotlib
MPLBACKEND=agg
JSONSCHEMA=jsonschema
INSTALLZMQ=1
INSTALLRMQ=0
INSTALLAPY=0
INSTALLLPY=0
INSTALLR=1
INSTALLFORTRAN=1
INSTALLSBML=1
INSTALLTRIMESH=0
INSTALLPYGMENTS=0
YGG_SECOND_TEST=
BUILDDOCS=0
YGG_TEST_FLAGS="--test-suite=examples"
matrix:
- YGG_TEST_FLAGS="--test-suite=examples_part1 --test-suite=demos" INSTALLTRIMESH=1
- YGG_TEST_FLAGS="--test-suite=examples_part2"
- YGG_CONDA=yes YGG_TEST_FLAGS="--long-running" CC=gcc CFLAGS="-Wall -g" INSTALLRMQ=1 INSTALLAPY=1 INSTALLTRIMESH=1 INSTALLPYGMENTS=1 YGG_SECOND_TEST="yggtest --ci --default-comm=IPCComm --test-suite=timing" # --long-running"
before_install:
- |
echo Installing os level packages...;
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
export PATH=/usr/lib/ccache:$PATH
fi
if [[ -n "$TRAVIS_PYTHON_VERSION" ]]; then
if [[ -n "$YGG_CONDA" ]]; then
export YGG_CONDA=$TRAVIS_PYTHON_VERSION
else
export YGG_PYTHON=$TRAVIS_PYTHON_VERSION
fi
fi
echo "YGG_CONDA = $YGG_CONDA"
echo "YGG_PYTHON = $YGG_PYTHON"
# Install miniconda
if [[ -n "$YGG_CONDA" || $INSTALLLPY == '1' ]]; then
echo Installing Python using conda...;
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then MINICONDA_OS=Linux; else MINICONDA_OS=MacOSX; fi
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-$MINICONDA_OS-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
fi
# Download and point to older SDK on OSX
echo "TRAVIS_OS_NAME = ${TRAVIS_OS_NAME}"
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
./utils/setup_old_mac_sdk.sh
fi
# Install RabbitMQ & Start a server
if [[ $INSTALLRMQ == '1' ]]; then
if [[ $TRAVIS_OS_NAME == 'osx' || $TRAVIS_DIST == 'xenial' ]]; then
echo Installing RabbitMQ...;
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
brew install rabbitmq
else
sudo apt-get install rabbitmq-server
fi
./utils/setup_rabbitmq.sh
else
# It has been installed via a service
echo Checking rabbitmq status...;
sudo rabbitmqctl status
fi
fi
# Setup environment
if [[ -n "$YGG_CONDA" || $INSTALLLPY == '1' ]]; then
python utils/setup_test_env.py env conda $YGG_CONDA --env-name=test-environment
else
# No environment required on Linux because Travis is managing the version
# of Python that is installed
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
python utils/setup_test_env.py env virtualenv $YGG_PYTHON --env-name=test-environment
fi
fi
# Perform the conda build in the base environment
if [[ -n "$YGG_CONDA" ]]; then
python utils/setup_test_env.py build conda --python $YGG_CONDA
fi
# Activate environment
if [[ -n "$YGG_CONDA" || $INSTALLLPY == '1' ]]; then
source activate test-environment
# TODO: Check if this can be removed
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
fi
fi
if [[ -n "$YGG_PYTHON" && $TRAVIS_OS_NAME == 'osx' ]]; then
source test-environment/bin/activate
fi
install:
- |
# setup environment
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
ccache -s
fi
# Install dependencies & package
if [[ -n "$YGG_CONDA" ]]; then
travis_wait python utils/setup_test_env.py deps conda
travis_wait python utils/setup_test_env.py install conda --without-build --without-deps
else
# if [[ $INSTALLR == '1' ]]; then
# export YGG_USE_SUDO_FOR_R=1
# fi
travis_wait python utils/setup_test_env.py install pip
fi
script:
- python utils/setup_test_env.py verify
- travis_wait yggcompile
- yggtest --ci $YGG_TEST_FLAGS
- $YGG_SECOND_TEST
# after_success:
# - |
# codecov
stages:
- warm-up
- test
- test-with-cache
- deploy
jobs:
fast_finish: true
include:
# Tests
- stage: test
os: linux
env: YGG_TEST_FLAGS="--test-suite=types --languages matlab python cpp"
python: 3.7
dist: xenial
sudo: true
- os: linux
env: YGG_TEST_FLAGS="--test-suite=types --languages R c --skip-languages cpp"
python: 3.7
dist: xenial
sudo: true
- os: linux
env: YGG_TEST_FLAGS="--test-suite=types --languages fortran"
python: 3.7
dist: xenial
sudo: true
- os: linux
env: YGG_TEST_FLAGS="--test-suite=timing tests/test_multitasking.py" YGG_DEFAULT_COMM=ZMQComm
python: 3.7
dist: xenial
sudo: true
- os: osx
python: 3.6
language: generic # https://github.com/travis-ci/travis-ci/issues/2312
cache:
pip: false
directories:
- $HOME/Library/Caches/pip
- $HOME/Library/Caches/Homebrew
- $HOME/R/Library
env: YGG_PYTHON=3.6 R_LIBS_USER=$HOME/R/Library YGG_TEST_FLAGS="tests/test_tools.py --test-suite=types --languages R c" INSTALLR=0 INSTALLFORTRAN=0 INSTALLZMQ=0
- os: osx
python: 3.7
language: generic # https://github.com/travis-ci/travis-ci/issues/2312
cache:
pip: false
directories:
- $HOME/Library/Caches/pip
- $HOME/Library/Caches/Homebrew
env: YGG_CONDA=3.7 YGG_TEST_FLAGS="serialize --test-suite=examples_part1 communication/tests/test_IPCComm.py communication/tests/test_RMQAsyncComm.py --test-suite=timing" # INSTALLZMQ=0
script:
- yggconfig --remove-file
- yggtest --ci tests/test_config.py $YGG_TEST_FLAGS
- name: "Build docs"
python: 3.6
env: BUILDDOCS=1
script: |
cd docs
make autodoc
cd "$TRAVIS_BUILD_DIR"
after_success: skip
addons:
apt:
packages:
- *native_deps_apt
- doxygen
update: true
# Docs
# - stage: deploy
# name: "Deploy docs"
# python: 3.6
# env: BUILDDOCS=1
# script: |
# cd docs
# make autodoc
# cd "$TRAVIS_BUILD_DIR"
# after_success: skip
# if: (tag IS present)
# deploy:
# provider: pages
# skip_cleanup: true
# local_dir: docs/build/html/
# keep-history: true
# github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
# on:
# tags: true
# verbose: true
# addons:
# apt:
# packages:
# - *native_deps_apt
# - doxygen
# update: true
# Deploy
# - stage: deploy
# name: "Deploy to PyPI"
# script: skip
# if: (tag IS present)
# deploy:
# provider: pypi
# skip_existing: true
# distributions: sdist bdist_wheel --universal
# username: "__token__"
# password:
# secure: "iRsnZ8i1fWoqZVQd7LzX8L+z3aS/c1io/tUHApJE8ujHdNF7owtLyg1JG9eUWdinfApv0WS7uaoUxdM44I3eMpFdsXBXCEcQZ77ZQEJ5kO+QqqSfPX6BO/hKTcckuw3UMWYMxWk7BmreUFBFwV1vx5/o0Wv+vql968+zhHILtWnaW+1jhDwHn2FmUZ9ESXww87FyJhcpvvsCQOXBTKEWN2AOToLaU4NWvzrHi5B7Vr9+4rZ70HyUwCIhb53ktZ+3Xn0zZwbf5or7XbRPrkfiVHqX2ywfa2lQU+59KHwXG0UHt8cSqvD08Tig3QgFO76SAsLXaJ+GI1YPTJ/Q/2xC+5N5tWDi1wL8SXmetjnku3/PGk9tfljVbMVErDLq8Vchra/w8AQ1EAyyhV4xBRIWJr/PlwsjxHB+qNnJ5S/x/0ZeSylUsPlQNTsqRqHdMYNJR1m1/pJqzZ6WURMVW2A341fRHHZNFQDNFePWvEA1qWKmeCWkKeKAu22TbIl0YlIX4m/y87BfjuHq4pditoIMws5K9SH4HVgrm4Kcqo8JlYN8bsTDlKw0ydtHZAYnh2BS6KHaCQqM+03/8yBrnrP0nzei1qkFVfAoAKcPMIsEYcPcme9MgJG5j/pAAzY1VeY52zgc7F9FRVmufKxEfro2Gcid/PW0reaPZgqD98B+ubo="
# on:
# tags: true