-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
106 lines (94 loc) · 3.18 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
dist: xenial
language: c++
services:
- docker
addons:
apt:
packages:
- valgrind
- libgsl-dev
homebrew:
update: true
packages:
- gsl
matrix:
include:
- os: linux # travis ubuntu xenial
env:
- MYCXX="g++"
- USE_DOCKER="FALSE"
- USE_GCOV="TRUE"
- os: linux # arch linux docker
env:
- MYCXX="g++"
- USE_DOCKER="TRUE"
- USE_GCOV="FALSE"
- os: osx
osx_image: xcode11
env:
- MYCXX="g++"
- USE_DOCKER="FALSE"
- USE_GCOV="FALSE"
- os: osx
osx_image: xcode11
env:
- MYCXX="clang++"
- USE_DOCKER="FALSE"
- USE_GCOV="FALSE"
before_install:
- |
if [[ "$USE_DOCKER" == "TRUE" ]]; then
docker pull nnvmc/base;
else
${MYCXX} -v;
fi;
echo "CXX_COMPILER=${MYCXX}" >> config.sh;
echo "CXX_FLAGS=\"-O0 -g -Wall -Wno-unused-function ${configopt}\"" >> config.sh;
if [[ "$USE_GCOV" == "TRUE" ]]; then
echo "USE_COVERAGE=1" >> config.sh;
else
echo "USE_COVERAGE=0" >> config.sh;
fi;
echo "USE_MPI=0" >> config.sh;
echo "MCI_ROOT=MCIntegratorPlusPlus/" >> config.sh;
echo "NFM_ROOT=NoisyFunMin/" >> config.sh;
echo "GSL_ROOT=" >> config.sh;
- |
if [[ "$USE_DOCKER" == "TRUE" ]]; then
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo && git clone https://github.com/DCM-UPB/MCIntegratorPlusPlus.git && cp config.sh MCIntegratorPlusPlus/ && cd MCIntegratorPlusPlus && ./build.sh" || exit 1;
else
git clone https://github.com/DCM-UPB/MCIntegratorPlusPlus.git && cp config.sh MCIntegratorPlusPlus/ && cd MCIntegratorPlusPlus && ./build.sh && cd .. || exit 1;
fi;
- |
if [[ "$USE_DOCKER" == "TRUE" ]]; then
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo && git clone https://github.com/DCM-UPB/NoisyFunMin.git && cp config.sh NoisyFunMin/ && cd NoisyFunMin && ./build.sh" || exit 1;
else
git clone https://github.com/DCM-UPB/NoisyFunMin.git && cp config.sh NoisyFunMin/ && cd NoisyFunMin && ./build.sh && cd .. || exit 1;
fi;
script:
- |
if [[ "$USE_DOCKER" == "TRUE" ]]; then
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo && ./build.sh" || exit 1;
else
./build.sh || exit 1;
fi;
- |
if [[ "$USE_DOCKER" == "TRUE" ]]; then
if [[ "$USE_GCOV" == "TRUE" ]]; then
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/build && make test";
docker run -e TRAVIS=$TRAVIS -e TRAVIS_JOB_ID=$TRAVIS_JOB_ID -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "pip install cpp-coveralls && cd /root/repo/build && coveralls -b ./ -r ../ -i include -i src -x .cpp -x .hpp --gcov-options '\-lp'";
else
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/test && ./run.sh";
fi;
else
if [[ "$USE_GCOV" == "TRUE" ]]; then
cd build && make test;
sudo pip install cpp-coveralls && coveralls -b ./ -r ../ -i include -i src -x .cpp -x .hpp --gcov-options '\-lp' && cd .. ;
else
cd test && ./run.sh && cd .. ;
fi;
fi;
notifications:
email:
on_success: change
on_failure: change