forked from root-project/rootbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
173 lines (156 loc) · 4.86 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
sudo: true
language: cpp
addons: &addons
apt:
packages: &common_deps
- cmake
- libtbb-dev
sources: &sources
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
- llvm-toolchain-trusty-5.0
cache:
apt: true
# ccache: true
# directories:
# - $BUILD_DEPS
# Do not build our sync branch.
branches:
only:
- master
- "*Travis*"
matrix:
include:
# There seems to be a hard limit to how many machines a Travis build will
# across all platforms. By interleaving OS X, the hope is to get in the
# queue faster while not blocking Linux builds from occuring.
# Coverage
- env: CXX=g++ CC=gcc BUILD_TYPE=Debug EXTRA_OPTS="-DCoverage=On"
compiler: gcc
addons:
apt:
sources: *sources
packages: [*common_deps, 'lcov']
# GCC 5
- env: CXX=g++-5 CC=gcc BUILD_TYPE=Debug
compiler: gcc
addons:
apt:
sources: *sources
packages: [*common_deps, 'g++-5', 'g++-5-multilib', 'libc6-dbg']
- env: CXX=g++-5 CC=gcc BUILD_TYPE=Release
compiler: gcc
addons:
apt:
sources: *sources
packages: [*common_deps, 'g++-5', 'g++-5-multilib', 'libc6-dbg']
# GCC 6
- env: CXX=g++-6 CC=gcc BUILD_TYPE=Debug
compiler: gcc
addons:
apt:
sources: *sources
packages: [*common_deps, 'g++-6', 'g++-6-multilib', 'libc6-dbg']
- env: CXX=g++-6 CC=gcc BUILD_TYPE=Release
compiler: gcc
addons:
apt:
sources: *sources
packages: [*common_deps, 'g++-6', 'g++-6-multilib', 'libc6-dbg']
# Clang 4
- env: CXX=clang++-4.0 CC=clang-4.0 BUILD_TYPE=Debug
compiler: clang
addons:
apt:
sources: *sources
packages: [*common_deps, 'clang-4.0', 'g++-multilib', 'libc6-dbg']
- env: CXX=clang++-4.0 CC=clang-4.0 BUILD_TYPE=Release
compiler: gcc
addons:
apt:
sources: *sources
packages: [*common_deps, 'clang-4.0', 'g++-multilib', 'libc6-dbg']
# Clang 5
- env: CXX=clang++-5.0 CC=clang-5.0 BUILD_TYPE=Debug
compiler: clang
addons:
apt:
sources: *sources
packages: [*common_deps, 'clang-5.0', 'g++-multilib', 'libc6-dbg']
- env: CXX=clang++-5.0 CC=clang-5.0 BUILD_TYPE=Release
compiler: clang
addons:
apt:
sources: *sources
packages: [*common_deps, 'clang-5.0', 'g++-multilib', 'libc6-dbg']
before_install:
- wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb
- sudo dpkg -i cvmfs-release-latest_all.deb
- sudo apt-get update
- sudo apt-get install cvmfs cvmfs-config-default
- rm -f cvmfs-release-latest_all.deb
- sudo mkdir -p /etc/cvmfs/
- echo "CVMFS_REPOSITORIES=sft.cern.ch,projects.cern.ch" > default.local
- echo "CVMFS_HTTP_PROXY=DIRECT" >> default.local
- sudo mv default.local /etc/cvmfs/
- sudo /etc/init.d/autofs stop
- sudo cvmfs_config setup
- sudo mkdir -p /cvmfs/sft-nightlies.cern.ch
- sudo mount -t cvmfs sft-nightlies.cern.ch /cvmfs/sft-nightlies.cern.ch
- ls /cvmfs/sft-nightlies.cern.ch
# Install GSL 2.0
# FIXME: We should have it somewhere in cvmfs.
- sudo add-apt-repository -y ppa:tsvetko.tsvetkov/trusty-backports && sudo apt-get update
- sudo apt-get install libgsl2
install:
- |
pwd
HOME_FOLDER=$(pwd)/../
if [ "${EXTRA_OPTS}" == "-DCoverage=On" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
export GCOV_PREFIX="$HOME_FOLDER/ROOT-gcov/"
mkdir -p $GCOV_PREFIX
#export GCOV_PREFIX_STRIP=16
PATH=~/.local/bin:${PATH};
pip install --user --upgrade pip;
pip install --user cpp-coveralls;
fi
script:
- echo "Downloading Latest ROOT binaries."
- |
# Go one level up from REPO_SLUG/rootbench
cd $HOME_FOLDER
mkdir root
d=$(date +%a)
for i in `seq 1 7`; do
ROOT_LOCATION=/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/rootcov/$d/ROOT/
ROOT_THISROOT=$ROOT_LOCATION/HEAD-a512e/x86_64-ubuntu1404-gcc48-opt/bin/thisroot.sh
if ls $ROOT_THISROOT ; then
break;
fi
d=$(date +%a -d "$d - 1 day")
done;
- |
cd root
echo "Initializing ROOT $ROOT_THISROOT"
source $ROOT_THISROOT
which root
cd $HOME_FOLDER
- mkdir $HOME_FOLDER/build
- cd $HOME_FOLDER/build
- cmake -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_FLAGS="${EXTRA_FLAGS}" \
${EXTRA_OPTS} ../rootbench
- cmake --build .
- ctest -V --output-on-failure
- find $GCOV_PREFIX
- #find $HOME_FOLDER
after_success:
- |
# FIXME: Figure out the right coveralls arguments to send the reports.
if [ "${EXTRA_OPTS}" == "-DCoverage=On" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
coveralls --verbose --gcov-options '\-lp' --root $HOME_FOLDER --build-root $HOME_FOLDER;
fi
on_failure:
-|
echo "Showing current directory contents"
ls -la