forked from nest/nest-simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
175 lines (148 loc) · 6.24 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
# .travis.yaml
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# NEST is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with NEST. If not, see <http://www.gnu.org/licenses/>.
# This is the Travis CI top-level script to setup and run the NEST build and test environment.
language: minimal
# Required for Ubuntu Trusty (14.04 LTS).
sudo: required
dist: trusty
#https://blog.travis-ci.com/2017-06-19-trusty-updates-2017-Q2
env:
matrix:
# We don't have to run a full matrix here, because most of the options are
# independent. This means we only need a minimal and maximal configuration
# and some additional jobs for interdependent options.
# See also https://docs.travis-ci.com/user/caching/#Caches-and-build-matrices
- xTHREADING=0 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB # minimal
- xTHREADING=0 xMPI=1 xGSL=0 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB # only MPI
- xTHREADING=1 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=1 xREADLINE=1 xPYTHON=0 xMUSIC=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB # only threading
- xTHREADING=1 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB # Python & Threading
- xTHREADING=0 xMPI=1 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB # Python & MPI
- xTHREADING=0 xMPI=0 xGSL=0 xLIBNEUROSIM=0 xLTDL=0 xREADLINE=0 xPYTHON=1 xMUSIC=0 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB # only Python
- xTHREADING=1 xMPI=1 xGSL=1 xLIBNEUROSIM=1 xLTDL=1 xREADLINE=1 xPYTHON=1 xMUSIC=1 xSTATIC_ANALYSIS=1 CACHE_NAME=JOB # full
matrix:
# Do notify immediately about it when a job of a build fails.
fast_finish: true
cache:
directory:
- $HOME/.cache
before_install:
- echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"
- 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 +"
- echo "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"
- export SOURCEDIR=$PWD
- cd $HOME/build
- echo $PATH
# Update package repository status (-qq is more quiet).
- sudo rm -rf /var/lib/apt/lists/*
- ls /etc/apt/sources.list.d/
- sudo apt-get update -qq
# Remove automatically all unused packages.
- sudo apt-get autoremove
# Install packages required by NEST.
# (Please see also: http://www.nest-simulator.org/installation/#standard-configuration)
- sudo apt-get install -y build-essential cmake libltdl7-dev libreadline6-dev libncurses5-dev libgsl0-dev python-all-dev python-numpy python-scipy python-matplotlib ipython
# Install pip and Cython.
- wget https://bootstrap.pypa.io/get-pip.py
- sudo python get-pip.py
- sudo pip install -U setuptools
- pip install --user cython==0.23.4
# Install package terminaltables required by parse_travis_log.py to create the build summary.
- sudo pip install terminaltables
# Install OpenMPI.
- sudo apt-get install -y openmpi-bin libopenmpi-dev
# Install nose framework for the Python testsuite.
# (Please note that the nose-capturestderr plugin is needed to suppress NEST output to stderr which may interfere
# with the nosetests output hindering correct log-parsing. stdout it captured by default.)
- sudo apt-get install -y python-nose
- sudo pip install "nose-capturestderr==1.2"
# Install boost libraries required for VERA++ static code analysis.
- sudo apt-get install -y libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-wave-dev libboost-python-dev
# Install pep8 for static code analysis.
- sudo apt-get install -y pep8
# Required for building cppcheck-1.69.
- sudo apt-get install -y libpcre3 libpcre3-dev
# Install jq to process JSON output from GitHub API.
- sudo apt-get install -y jq
# Install libneurosim
- git clone https://github.com/INCF/libneurosim.git
- pushd libneurosim
- ./autogen.sh
- ./configure --prefix=$HOME/.cache/libneurosim.install --with-mpi
- make
- make install
- popd
# Install csa
- git clone https://github.com/INCF/csa.git
- pushd csa
- ./autogen.sh
- ./configure --with-libneurosim=$HOME/.cache/libneurosim.install --prefix=$HOME/.cache/csa.install
- make
- make install
- popd
# Install MUSIC
- sudo apt-get install -y python-mpi4py
- git clone https://github.com/INCF/MUSIC.git music
- pushd music
- ./autogen.sh
- ./configure --prefix=$HOME/.cache/music.install
- make
- make install
- popd
# Change directory back to the NEST source code directory.
- cd $SOURCEDIR
install:
- which cython
- cython --version
- which python
- python --version
- which pip
- which nosetests
- nosetests --version
- nosetests --plugins
- which cmake
- cmake --version
before_script:
- chmod +x build.sh
script:
- set -o pipefail
- ./build.sh 2>&1 | tee build.sh.log
- python extras/parse_travis_log.py build.sh.log
before_deploy:
- cd $TRAVIS_BUILD_DIR/build
- tar -zcvf reports.tar.gz ./reports
- tar -zcvf docs.tar.gz $TRAVIS_BUILD_DIR/result/share/doc/nest/*.*
- mkdir -p $TRAVIS_BUILD_DIR/build/artefacts_upload
- mv docs.tar.gz $TRAVIS_BUILD_DIR/build/artefacts_upload
- mv reports.tar.gz $TRAVIS_BUILD_DIR/build/artefacts_upload
# S3 Deployment (Uploading the Travis CI build artefacts to Amazon S3).
deploy:
provider: s3
access_key_id:
secure: $ARTIFACTS_KEY
secret_access_key:
secure: $ARTIFACTS_SECRET
bucket: "nest-travis-artefacts"
region: eu-central-1
skip_cleanup: true
on:
repo: nest/nest-simulator
branch: master
local-dir: "$TRAVIS_BUILD_DIR/build/artefacts_upload"
upload-dir: "$TRAVIS_REPO_SLUG/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER"
acl: bucket_owner_full_control