-
Notifications
You must be signed in to change notification settings - Fork 36
/
.travis.yml
85 lines (71 loc) · 1.71 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
language: cpp
sudo: required
dist: bionic
services: docker
compiler:
- gcc
- clang
os:
- linux
- osx
osx_image:
- xcode12.2
env:
- DOCKERFILE=archlinux
- DOCKERFILE=ub1804
matrix:
exclude:
- os: osx
compiler: gcc
- os: osx
env: DOCKERFILE=ub1804
addons:
homebrew:
packages:
- cmake
- boost
- cppunit
- hdf5
update: false
before_cache:
- brew cleanup
cache:
directories:
- $HOME/Library/Caches/Homebrew
before_install:
- if [[ "$TRAVIS_COMPILER" == "gcc" ]];
then
export CC=gcc;
export CXX=g++;
export GCOV=gcov;
export CTEST_ARGS=-V;
else
export CC=clang;
export CXX=clang++;
export GCOV=gcov;
export CTEST_ARGS=-VV;
fi
install:
- if [ "$TRAVIS_OS_NAME" == "linux" ];
then
./contrib/make-env.sh /tmp/docker.env;
docker build -f ./dockerfiles/${DOCKERFILE}.Dockerfile . -t local/nixio;
docker run --env-file /tmp/docker.env -d -i -t -v $(pwd):/src --name nixbuilder local/nixio;
docker exec nixbuilder ${CXX} --version;
fi
script:
- if [ "$TRAVIS_OS_NAME" == "linux" ];
then
docker exec nixbuilder ctest ${CTEST_ARGS} --output-on-failure -S .travis.ctest;
else
$CXX --version;
ctest ${CTEST_ARGS} --output-on-failure -S .travis.ctest;
fi
after_success:
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$DOCKERFILE" == "archlinux" && "$CXX" == "g++" ]]; then
echo "Submitting code coverage report";
docker exec nixbuilder lcov -q --capture --directory . --no-extern --output-file coverage.info;
bash <(curl -s https://codecov.io/bash) -f coverage.info -Z;
fi
notifications:
irc: "chat.freenode.net#gnode"