forked from root-project/rootbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
129 lines (114 loc) · 5.47 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
#Xenial is still not supported by Travis
#dist: xenial
dist: trusty
sudo: required
language: generic
services:
- docker
notifications:
email:
on_failure: never
cache:
- apt
- ccache
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"
# GCC 5
- env: CXX=g++ CC=gcc BUILD_TYPE=Debug
- env: CXX=g++ CC=gcc BUILD_TYPE=Release
# GCC 6
- env: CXX=g++-6 CC=gcc-6 BUILD_TYPE=Debug EXTRA_OPTS="-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
- env: CXX=g++-6 CC=gcc-6 BUILD_TYPE=Release
# GCC 7
# FIXME: gcc8 should be added after Ubuntu will fix missing includes in the package
- env: CXX=g++-7 CC=gcc-7 BUILD_TYPE=Debug EXTRA_OPTS="-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
- env: CXX=g++-7 CC=gcc-7 BUILD_TYPE=Release
# Clang 5
- env: CXX=clang++-5.0 CC=clang-5.0 BUILD_TYPE=Debug EXTRA_OPTS="-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON" EXTRA_FLAGS="-v"
- env: CXX=clang++-5.0 CC=clang-5.0 BUILD_TYPE=Release
# Clang 6
- env: CXX=clang++-6.0 CC=clang-6.0 BUILD_TYPE=Debug EXTRA_OPTS="-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
- env: CXX=clang++-6.0 CC=clang-6.0 BUILD_TYPE=Release
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
- sudo mkdir -p /cvmfs/sft.cern.ch
- sudo mount -t cvmfs sft.cern.ch /cvmfs/sft.cern.ch
- ls /cvmfs/sft.cern.ch
# Time to docker
- docker pull ubuntu:16.04
- docker run --privileged -d -v $(pwd):/travis/rootbench -v $HOME/.ccache:/root/.ccache -v /cvmfs/sft.cern.ch:/cvmfs/sft.cern.ch -w /travis/rootbench --name xenial ubuntu:16.04 tail -f /dev/null
- docker exec xenial apt-get -y update
- docker exec xenial apt-get -y upgrade
- docker exec xenial apt-get install -y software-properties-common ccache cmake libtbb-dev wget ruby ruby-dev python curl git unzip g++ gfortran libatlas3-base libatlas-base-dev libgsl0-dev libfreetype6-dev
- docker exec xenial add-apt-repository -y ppa:ubuntu-toolchain-r/test
- docker exec -t xenial /bin/bash -c "wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -"
- docker exec xenial apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
- docker exec xenial apt-get -y update
- docker exec -t xenial /bin/bash -c "echo '/usr/lib/atlas-base' | tee /etc/ld.so.conf.d/atlas-lib.conf && ldconfig"
- |
if [ "${CXX}" == "g++-6" ]; then
docker exec xenial apt-get install -y gcc-6 g++-6
fi
- |
if [ "${CXX}" == "g++-7" ]; then
docker exec xenial apt-get install -y gcc-7 g++-7
fi
- |
if [ "${CXX}" == "clang++-5.0" ]; then
docker exec xenial apt-get install -y clang-5.0
fi
- |
if [ "${CXX}" == "clang++-6.0" ]; then
docker exec xenial apt-get install -y clang-6.0
fi
- docker exec -t xenial /bin/bash -c "export HOME_FOLDER=/travis/ && . /travis/rootbench/travis-scripts/before-install.sh"
script:
- |
if [ "${EXTRA_OPTS}" == "-Dcoverage=ON" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
docker exec -t xenial /bin/bash -c "export HOME_FOLDER=/travis/ && . /travis/rootbench/travis-scripts/rootgcno.sh";
fi
- docker exec -t xenial /bin/bash -c "source /travis/.bashrc && export HOME_FOLDER=/travis/ && export CC=${CC} && export CXX=${CXX} && export BUILD_TYPE=${BUILD_TYPE} && export EXTRA_OPTS=${EXTRA_OPTS} && export EXTRA_FLAGS=${EXTRA_FLAGS} && . /travis/rootbench/travis-scripts/configure.sh"
- |
if [ "${EXTRA_OPTS}" == "-Dcoverage=ON" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
docker exec -t xenial /bin/bash -c "export HOME_FOLDER=/travis/ && . /travis/rootbench/travis-scripts/lcov-part1.sh";
fi
- |
if [ "${EXTRA_OPTS}" == "-Dcoverage=ON" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
docker exec -t xenial /bin/bash -c "export HOME_FOLDER=/travis/ && . /travis/rootbench/travis-scripts/lcov-part2.sh";
fi
- docker exec -t xenial /bin/bash -c "source /travis/.bashrc && export RB_TEMP_FS=/travis/ && export HOME_FOLDER=/travis/ && cd /travis/build && ctest --output-on-failure -L short"
- |
if [ "${EXTRA_OPTS}" == "-Dcoverage=ON" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
docker exec -t xenial /bin/bash -c "export HOME_FOLDER=/travis/ && . /travis/rootbench/travis-scripts/lcov-info-part1.sh";
fi
- |
if [ "${EXTRA_OPTS}" == "-Dcoverage=ON" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
docker exec -t xenial /bin/bash -c "export HOME_FOLDER=/travis/ && . /travis/rootbench/travis-scripts/lcov-info-part2.sh";
fi
after_success:
- |
if [ "${EXTRA_OPTS}" == "-Dcoverage=ON" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
docker exec -t xenial /bin/bash -c "export HOME_FOLDER=/travis/ && . /travis/rootbench/travis-scripts/coveralls.sh";
fi
on_failure:
-|
echo "Showing current directory contents"
ls -la