18
18
# You should have received a copy of the GNU General Public License
19
19
# along with NEST. If not, see <http://www.gnu.org/licenses/>.
20
20
21
-
22
21
# This is the Travis CI top-level script to setup and run the NEST
23
22
# build and test environment.
24
23
24
+
25
25
language : python
26
26
27
- # Using the Sudo-enabled Ubuntu Bionic (18.04 LTS).
28
27
sudo : required
29
28
dist : bionic
30
29
31
30
env :
32
31
global :
33
32
- MAKEFLAGS="-j 2"
34
33
stages :
35
- - Staticcheck
36
- - MPI-Threading-GSL-Python
37
- - Python-Full-build-Clang7-OsX
38
- - ARM64
39
-
40
- # list of build stages to run. Stages with the same name get run in parallel.
34
+ - Static-Code-Analysis
35
+ - Linux-GCC
36
+ - Linux-Clang
37
+ - macOS
41
38
42
39
jobs :
40
+ # list of build stages to run. Stages with the same name get run in parallel.
43
41
include :
44
- - stage : Staticcheck
45
- python : 3.6.10
46
- env : xTHREADING=0 xMPI=0 xSIONLIB=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xLIBBOOST=0 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=1 xRUN_BUILD_AND_TESTSUITE=0 CACHE_NAME=JOB # only static code analysis
47
- - stage : MPI-Threading-GSL-Python
48
- python : 3.6.10
49
- env : xTHREADING=1 xMPI=1 xSIONLIB=0 xGSL=1 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xLIBBOOST=1 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_BUILD_AND_TESTSUITE=1 CACHE_NAME=JOB
50
- - stage : MPI-Threading-GSL-Python
51
- python : 3.6.10
52
- env : xTHREADING=0 xMPI=1 xSIONLIB=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xLIBBOOST=1 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_BUILD_AND_TESTSUITE=1 CACHE_NAME=JOB # only MPI
53
- - stage : MPI-Threading-GSL-Python
54
- python : 3.6.10
55
- env : xTHREADING=1 xMPI=0 xSIONLIB=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xLIBBOOST=1 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_BUILD_AND_TESTSUITE=1 CACHE_NAME=JOB # only threading
56
- - stage : MPI-Threading-GSL-Python
57
- python : 3.6.10
58
- env : xTHREADING=0 xMPI=0 xSIONLIB=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xLIBBOOST=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_BUILD_AND_TESTSUITE=1 CACHE_NAME=JOB # Only Python
59
- - stage : Python-Full-build-Clang7-OsX
60
- python : 3.6.10
61
- env : xTHREADING=1 xMPI=1 xSIONLIB=1 xGSL=1 xLIBNEUROSIM=1 xLTDL=1 xREADLINE=1 xLIBBOOST=1 xPYTHON=1 xMUSIC=1 xSTATIC_ANALYSIS=0 xRUN_BUILD_AND_TESTSUITE=1 CACHE_NAME=JOB # full
62
- - stage : Python-Full-build-Clang7-OsX
42
+ - stage : Static-Code-Analysis
43
+ python : 3.8.2
44
+ env : CACHE_NAME=JOB xNEST_BUILD_TYPE=STATIC_CODE_ANALYSIS
45
+ - stage : Linux-GCC
46
+ python : 3.8.2
47
+ env : CACHE_NAME=JOB xNEST_BUILD_TYPE=MINIMAL
48
+ - stage : Linux-GCC
49
+ python : 3.8.2
50
+ env : CACHE_NAME=JOB xNEST_BUILD_TYPE=MPI_ONLY
51
+ - stage : Linux-GCC
52
+ python : 3.8.2
53
+ env : CACHE_NAME=JOB xNEST_BUILD_TYPE=OPENMP_ONLY
54
+ - stage : Linux-GCC
55
+ python : 3.8.2
56
+ env : CACHE_NAME=JOB xNEST_BUILD_TYPE=FULL
57
+ - stage : Linux-Clang
63
58
language : cpp
64
- env : MATRIX_EVAL="CC=clang-7 && CXX=clang++-7" xRUN_BUILD_AND_TESTSUITE=1
65
- - stage : Python-Full-build-Clang7-OsX
59
+ python : 3.6.10
60
+ env : CACHE_NAME=JOB xNEST_BUILD_TYPE=MINIMAL xNEST_BUILD_COMPILER=CLANG xNEST_PYTHON_VERSION=3.6.10
61
+ - stage : macOS
66
62
os : osx
67
- osx_image : xcode10.3 # Python 3.7.5 running on macOS 10.14.4
63
+ osx_image : xcode12 # Python 3.8.3 running on macOS 10.15.5
68
64
language : shell # language 'python' results in errors on macOS
69
- env : xTHREADING=1 xMPI=0 xGSL=1 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=0 xRUN_BUILD_AND_TESTSUITE=1 CACHE_NAME=JOB # Without MUSIC, MPI and Libneurosim
70
- # https://docs.travis-ci.com/user/installing-dependencies#Installing-Packages-with-the-APT-Addon
65
+ env : CACHE_NAME=JOB xNEST_BUILD_TYPE=FULL_NO_EXTERNAL_FEATURES
66
+ cache :
67
+ directories :
68
+ - $HOME/.cache
69
+ - $HOME/.pyenv/versions
70
+ - /usr/local/Homebrew
71
71
addons :
72
72
apt :
73
73
sources :
@@ -91,7 +91,6 @@ addons:
91
91
- pkg-config
92
92
- openmpi-bin
93
93
- libopenmpi-dev
94
- - python3-nose
95
94
- libpcre3
96
95
- libpcre3-dev
97
96
- llvm-9-dev
@@ -103,7 +102,6 @@ addons:
103
102
- libboost-python-dev
104
103
- libboost-program-options-dev
105
104
- libboost-test-dev
106
- - python3-mpi4py
107
105
cache :
108
106
directory :
109
107
- $HOME/.cache
@@ -130,23 +128,20 @@ before_install:
130
128
/usr/bin/c++ --version
131
129
fi
132
130
- |
133
- if [ "$xRUN_BUILD_AND_TESTSUITE" = "1 " ]; then
131
+ if [ "$xNEST_BUILD_TYPE" ! = "STATIC_CODE_ANALYSIS " ]; then
134
132
echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"
135
133
echo "+ P R E P A R E N E S T B U I L D E N V I R O N M E N T +"
136
134
echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"
137
- echo ${MATRIX_EVAL}
138
- eval "${MATRIX_EVAL}"
139
135
cp extras/install_csa-libneurosim.sh $HOME
140
136
cp extras/install_music.sh $HOME
141
137
cp extras/install_sionlib.sh $HOME
142
138
cp extras/install_libboost.sh $HOME
143
139
cd $HOME/build
144
140
echo $PATH
145
- # Upgrade pip and setuptools
146
- if [ MATRIX_EVAL="CC=clang-7 && CXX=clang++-7" ]; then
147
- pyenv install --list
148
- pyenv global 3.6.7
141
+ if [ "$xNEST_BUILD_COMPILER" = "CLANG" ]; then
142
+ pyenv global $xNEST_PYTHON_VERSION
149
143
fi
144
+
150
145
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
151
146
brew --version
152
147
brew update
@@ -158,32 +153,40 @@ before_install:
158
153
brew unlink gcc
159
154
brew install gcc@8
160
155
brew link gcc@8
161
- brew list
162
- brew leaves
163
- brew cask list
156
+ find /usr/local/Cellar/ -name Python\.h
157
+ find /usr/local/Cellar/ -name \*python\*dylib
164
158
fi
165
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
159
+
160
+ if [ "$TRAVIS_OS_NAME" != "osx" ]; then
161
+ # Upgrade pip and setuptools
166
162
pip install --upgrade pip setuptools
163
+ pip install nose
164
+ else
165
+ # updating pip breaks on osx, must install man-page free nose
166
+ wget https://arken.nmbu.no/~plesser/nose-1.3.7noman-py3-none-any.whl
167
+ pip install nose-1.3.7noman-py3-none-any.whl
167
168
fi
168
-
169
169
# Installing additional packages using pip as they only have
170
170
# outdated versions in the Travis package whitelist.
171
171
# terminaltables is required by parse_travis_log.py to create
172
172
# the build summary.
173
- pip install cython scipy matplotlib terminaltables
173
+ pip install cython scipy matplotlib terminaltables junitparser mpi4py
174
174
pip install numpy==1.16.5
175
+ pip list
175
176
fi
176
177
177
178
install :
178
179
- |
179
- if [ "$xRUN_BUILD_AND_TESTSUITE" = "1 " ]; then
180
+ if [ "$xNEST_BUILD_TYPE" ! = "STATIC_CODE_ANALYSIS " ]; then
180
181
which cython
181
182
cython --version
182
183
which python
183
184
python --version
184
185
which pip
185
186
pip list
186
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then which nosetests; nosetests --version; nosetests --plugins; fi
187
+ which nosetests
188
+ nosetests --version
189
+ nosetests --plugins
187
190
which cmake
188
191
cmake --version
189
192
echo ${CC}
@@ -199,13 +202,13 @@ script:
199
202
- set -o pipefail
200
203
- ./extras/travis_build.sh 2>&1 | tee travis_build.sh.log
201
204
- |
202
- if [ "$xRUN_BUILD_AND_TESTSUITE" = "1 " ]; then
205
+ if [ "$xNEST_BUILD_TYPE" ! = "STATIC_CODE_ANALYSIS " ]; then
203
206
python extras/parse_travis_log.py travis_build.sh.log ;
204
207
fi
205
208
206
209
before_deploy :
207
210
- |
208
- if [ "$xRUN_BUILD_AND_TESTSUITE" = "1 " ]; then
211
+ if [ "$xNEST_BUILD_TYPE" ! = "STATIC_CODE_ANALYSIS " ]; then
209
212
cd $TRAVIS_BUILD_DIR/build
210
213
tar -zcvf reports.tar.gz ./reports
211
214
tar -zcvf docs.tar.gz $TRAVIS_BUILD_DIR/result/share/doc/nest/*.*
@@ -215,19 +218,19 @@ before_deploy:
215
218
fi
216
219
217
220
# S3 Deployment (Uploading the Travis CI build artefacts to Amazon S3).
218
- deploy :
219
- provider : s3
220
- access_key_id :
221
- secure : $ARTIFACTS_KEY
222
- secret_access_key :
223
- secure : $ARTIFACTS_SECRET
224
- bucket : " nest-travis-artefacts"
225
- region : eu-central-1
226
- skip_cleanup : true
227
- on :
228
- repo : nest/nest-simulator
229
- branch : master
230
- condition : xRUN_BUILD_AND_TESTSUITE = 1
231
- local-dir : " $TRAVIS_BUILD_DIR/build/artefacts_upload"
232
- upload-dir : " $TRAVIS_REPO_SLUG/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER"
233
- acl : bucket_owner_full_control
221
+ # deploy:
222
+ # provider: s3
223
+ # access_key_id:
224
+ # secure: $ARTIFACTS_KEY
225
+ # secret_access_key:
226
+ # secure: $ARTIFACTS_SECRET
227
+ # bucket: "nest-travis-artefacts"
228
+ # region: eu-central-1
229
+ # skip_cleanup: true
230
+ # on:
231
+ # repo: nest/nest-simulator
232
+ # branch: master
233
+ # condition: $xNEST_BUILD_TYPE != STATIC_CODE_ANALYSIS
234
+ # local-dir: "$TRAVIS_BUILD_DIR/build/artefacts_upload"
235
+ # upload-dir: "$TRAVIS_REPO_SLUG/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER"
236
+ # acl: bucket_owner_full_control
0 commit comments