forked from llr-cta/calin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
258 lines (249 loc) · 7.28 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
# Build script for Travis CI container-based architecture
# Stephen Fegan - [email protected] - 2015-11-01
dist: trusty
#sudo: false
language: cpp
addons:
apt:
sources: &common_sources
- ubuntu-toolchain-r-test
packages: &common_packages
- gsl-bin
- libgsl0-dev
- libfftw3-dev
- python-numpy
- libzmq3-dev
- python3
- python3-dev
- python3-numpy
- libxerces-c-dev
matrix:
include:
- compiler: gcc-4.8
env: BUILD_CC=gcc-4.8 BUILD_CXX=g++-4.8 BUILD_ARCH=generic BUILD_CXXFLAGS=-fabi-version=0
addons: &gcc48_addons
apt:
sources:
- *common_sources
packages:
- *common_packages
- g++-4.8
- compiler: gcc-4.9
env: BUILD_CC=gcc-4.9 BUILD_CXX=g++-4.9 BUILD_CXXFLAGS=-fabi-version=0
addons: &gcc49_addons
apt:
sources:
- *common_sources
packages:
- *common_packages
- g++-4.9
# - compiler: gcc-4.9
# env: BUILD_TYPE=Release GEANT4=TRUE BUILD_CC=gcc-4.9 BUILD_CXX=g++-4.9
# addons:
# <<: *gcc49_addons
# - compiler: gcc-4.9
# env: BUILD_CC=gcc-4.9 BUILD_CXX=g++-4.9
# addons:
# <<: *gcc49_addons
- compiler: gcc-5
env: BUILD_CC=gcc-5 BUILD_CXX=g++-5
addons: &gcc5_addons
apt:
sources:
- *common_sources
packages:
- *common_packages
- g++-5
# - compiler: gcc-5
# env: BUILD_TYPE=Release GEANT4=TRUE BUILD_CC=gcc-5 BUILD_CXX=g++-5
# addons:
# <<: *gcc5_addons
# - compiler: gcc-5
# env: BUILD_TYPE=Release GEANT4=TRUE BUILD_CC=gcc-5 BUILD_CXX=g++-5
# addons:
# <<: *gcc5_addons
- compiler: gcc-6
env: BUILD_CC=gcc-6 BUILD_CXX=g++-6
addons: &gcc6_addons
apt:
sources:
- *common_sources
packages:
- *common_packages
- g++-6
- compiler: gcc-7
env: BUILD_CC=gcc-7 BUILD_CXX=g++-7
addons: &gcc7_addons
apt:
sources:
- *common_sources
packages:
- *common_packages
- g++-7
- compiler: gcc-8
env: BUILD_CC=gcc-8 BUILD_CXX=g++-8
addons: &gcc8_addons
apt:
sources:
- *common_sources
packages:
- *common_packages
- g++-8
# - compiler: clang-3.9
# env: BUILD_TYPE=Debug GEANT4=FALSE BUILD_CC=clang-3.9 BUILD_CXX=clang++-3.9
# addons: &clang39_addons
# apt:
# sources:
# - *common_sources
# - llvm-toolchain-trusty-3.9
# packages:
# - *common_packages
# - clang-3.9
- compiler: clang-4.0
env: BUILD_CC=clang-4.0 BUILD_CXX=clang++-4.0
addons: &clang40_addons
apt:
sources:
- *common_sources
- llvm-toolchain-trusty-4.0
packages:
- *common_packages
- clang-4.0
- compiler: clang-5.0
env: BUILD_CC=clang-5.0 BUILD_CXX=clang++-5.0
addons: &clang50_addons
apt:
sources:
- *common_sources
- llvm-toolchain-trusty-5.0
packages:
- *common_packages
- clang-5.0
- compiler: clang-6.0
env: BUILD_CC=clang-6.0 BUILD_CXX=clang++-6.0
addons: &clang60_addons
apt:
sources:
- *common_sources
- llvm-toolchain-trusty-6.0
packages:
- *common_packages
- clang-6.0
- compiler: clang-7
env: BUILD_CC=clang-7 BUILD_CXX=clang++-7
addons: &clang7_addons
apt:
sources:
- *common_sources
- llvm-toolchain-trusty-7
packages:
- *common_packages
- clang-7
cache:
directories:
- $HOME/local
before_install:
- if test -n "$BUILD_CC"; then export CC="$BUILD_CC"; fi
- if test -n "$BUILD_CFLAGS"; then export CFLAGS="$BUILD_CFLAGS"; fi
- if test -n "$BUILD_CXX"; then export CXX="$BUILD_CXX"; fi
- if test -n "$BUILD_CXXFLAGS"; then export CXXFLAGS="$BUILD_CXXFLAGS"; fi
- if test -z "$BUILD_ARCH"; then export BUILD_ARCH="broadwell"; fi
- if test -z "$BUILD_TYPE"; then export BUILD_Type="Release"; fi
- if test -z "$GEANT4"; then export GEANT4="FALSE"; fi
- export LOCAL=$HOME/local/$CC
- export PATH=$LOCAL/bin:$PATH
- export LD_LIBRARY_PATH=$LOCAL/lib64:$LOCAL/lib:$LD_LIBRARY_PATH
# Build SWIG-3, protobuf-3 and Geant4-10 if not available in the cache
# Download and unpack Geant4 data files if necessary
install:
- |
echo $HOME
if [ -d $HOME ]; then ls -l $HOME ; fi
echo $HOME/local
if [ -d $HOME/local ]; then ls -l $HOME/local ; fi
echo $LOCAL
if [ -d $LOCAL ]; then ls -l $LOCAL ; fi
echo $LOCAL/bin
if [ -d $LOCAL/bin ]; then ls -l $LOCAL/bin ; fi
# - |
# if [ ! -f $LOCAL/bin/cmake ];
# then (
# wget --no-check-certificate https://cmake.org/files/v3.9/cmake-3.9.6.tar.gz &&
# tar zxf cmake-3.9.6.tar.gz &&
# cd cmake-3.9.6 &&
# ./bootstrap --parallel=3 --prefix=$LOCAL &&
# make -j3 &&
# make install > /dev/null &&
# touch $HOME/suppress_geant_build
# ); fi
- |
if [ ! -f $LOCAL/bin/swig ]
then (
wget https://github.com/swig/swig/archive/rel-3.0.12.tar.gz &&
tar zxf rel-3.0.12.tar.gz &&
cd swig-rel-3.0.12 &&
./autogen.sh &&
./configure --prefix=$LOCAL --without-alllang --with-python &&
make -j3 &&
make install > /dev/null &&
touch $HOME/suppress_geant_build
); fi
- |
if [ ! -f $LOCAL/bin/protoc ]
then (
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protobuf-cpp-3.6.1.tar.gz &&
tar zxf protobuf-cpp-3.6.1.tar.gz &&
cd protobuf-3.6.1 &&
./configure --prefix=$LOCAL &&
make -j3 &&
make install > /dev/null &&
touch $HOME/suppress_geant_build
); fi
- |
if [ "x$GEANT4" == "xTRUE" -a ! -f $LOCAL/bin/geant4.sh -a ! -f $HOME/suppress_geant_build ]
then (
wget http://geant4.cern.ch/support/source/geant4.10.04.tar.gz &&
tar zxf geant4.10.04.tar.gz &&
cd geant4.10.04 &&
mkdir mybuild &&
cd mybuild &&
cmake -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$LOCAL -DGEANT4_INSTALL_DATA=ON .. &&
make -j3 &&
make install > /dev/null
); fi
- |
if [ "x$GEANT4" == "xTRUE" -a -f $LOCAL/bin/geant4.sh ]
then
NO_GEANT4=""
. $LOCAL/bin/geant4.sh
else
NO_GEANT4=-DNO_GEANT4:BOOLEAN=TRUE
fi
before_script:
- swig -version
- cmake -version
- $CC -v
- python -V
- python3 -V
script:
- |
mkdir mybuild-travis &&
cd mybuild-travis &&
cmake -DCMAKE_PREFIX_PATH=$LOCAL \
-DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX \
-DCMAKE_CXX_FLAGS=$CXXFLAGS \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCALIN_BUILD_ARCH=$BUILD_ARCH \
-DPYTHON_EXECUTABLE=`which python3` \
$NO_GEANT4 \
-DCMAKE_INSTALL_PREFIX=build .. &&
make -j3 &&
make install | tail &&
./src/bin/write_system_info &&
make test
./unit_tests/simulation/test_vcl_raytracer
# ./unit_tests/math/speedtest_rng &&
# ./unit_tests/math/test_rng_vcl &&
# ./unit_tests/math/test_rng
#after_failure:
# - cat CMakeFiles/CMakeError.log