forked from nest/nest-simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
150 lines (137 loc) · 4.79 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
# .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: python
sudo: required
dist: bionic
env:
global:
- MAKEFLAGS="-j 2"
stages:
- Static-Code-Analysis
jobs:
# list of build stages to run. Stages with the same name get run in parallel.
include:
- stage: Static-Code-Analysis
python: 3.8.2
env: CACHE_NAME=JOB xNEST_BUILD_TYPE=STATIC_CODE_ANALYSIS
cache:
directories:
- $HOME/.cache
- $HOME/.pyenv/versions
- /usr/local/Homebrew
addons:
apt:
sources:
- *BASE_SOURCES
- ubuntu-toolchain-r-test
packages:
- *BASE_PACKAGES
- gcc-8
- g++-8
- clang-7
- build-essential
- cmake
- libltdl-dev
- libreadline6-dev
- libncurses5-dev
- libgsl0-dev
- python3-all-dev
- ipython3
- pkg-config
- openmpi-bin
- libopenmpi-dev
- libpcre3
- libpcre3-dev
- llvm-9-dev
- jq
- pep8
- libboost-filesystem-dev
- libboost-regex-dev
- libboost-wave-dev
- libboost-python-dev
- libboost-program-options-dev
- libboost-test-dev
cache:
directory:
- $HOME/.cache
before_install:
- export SOURCEDIR=$PWD
# select the right C++ compiler version (gcc8) -- note that update-alternatives is not available on MacOS
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
ls -lh /usr/bin/g++*
ls -lh /usr/bin/gcc*
ls -lh /usr/bin/c++*
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10
sudo update-alternatives --auto g++
sudo update-alternatives --list g++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 20
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10
sudo update-alternatives --auto gcc
sudo update-alternatives --list gcc
sudo update-alternatives --list c++
sudo update-alternatives --auto c++
g++ --version
/usr/bin/c++ --version
fi
- |
if [ "$xNEST_BUILD_TYPE" != "STATIC_CODE_ANALYSIS" ]; then
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 "+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"
cp extras/install_csa-libneurosim.sh $HOME
cp extras/install_music.sh $HOME
cp extras/install_sionlib.sh $HOME
cp extras/install_libboost.sh $HOME
cd $HOME/build
echo $PATH
if [ "$xNEST_BUILD_COMPILER" = "CLANG" ]; then
pyenv global $xNEST_PYTHON_VERSION
fi
# Upgrade pip and setuptools
pip install --upgrade pip setuptools
# Installing additional packages using pip as they only have
# outdated versions in the Travis package whitelist.
# terminaltables is required by parse_build_log.py to create
# the build summary.
pip install scipy junitparser mpi4py
if [ "$TRAVIS_OS_NAME" != "osx" ]; then
pip3 install numpy nose
pip3 install cython matplotlib terminaltables
else
# Due to the issue with numpy C-extensions, have to stick to a specific version on OsX
#https://numpy.org/devdocs/user/troubleshooting-importerror.html
pip3 install numpy==1.19.3
pip3 install cython matplotlib terminaltables
# nose must be installed user-only to avoid permissions conflict for man-pages
wget https://files.pythonhosted.org/packages/15/d8/dd071918c040f50fa1cf80da16423af51ff8ce4a0f2399b7bf8de45ac3d9/nose-1.3.7-py3-none-any.whl
pip3 install --user nose-1.3.7-py3-none-any.whl
fi
pip list
fi
#install:
before_script:
# Change directory back to the NEST source code directory.
- cd $SOURCEDIR
- chmod +x extras/travis_build.sh
script:
- set -o pipefail
- ./extras/travis_build.sh 2>&1 | tee travis_build.sh.log