This repository was archived by the owner on May 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
169 lines (152 loc) · 4.97 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
sudo: required
dist: trusty
language: generic
addons:
apt:
sources: &commonsources
packages: &commonpackages
- cmake
- cmake-data
- doxygen
- texlive-base
- python-virtualenv
- libboost1.55-all-dev
- python-pip
- libtbb-dev
- ccache
- libsuitesparse-dev
- lcov
- curl
- ninja-build
- python3-requests
before_install:
- |-
: ${OPTS:="config.opts/travis.ninja"} && export OPTS
- |-
: ${BUILD_CMD:="ninja -k 10000 -j 2"} && export BUILD_CMD
# workaround for https://github.com/travis-ci/travis-ci/issues/5285
- sudo sed -i 's/us-central1.gce/us-central1.gce.clouds/' /etc/apt/sources.list && sudo apt-get update
- sudo -E apt-get install -y -q python-pip python3-pip
- sudo -E pip3 install virtualenv cpp-coveralls
- sudo -E pip install virtualenv cpp-coveralls
- export PATH=/usr/lib/ccache:$PATH
- cd $HOME
- test -d src || git clone --branch=testtools https://github.com/wwu-numerik/dune-stuff-demos.git src
- cd $HOME/src
- git submodule update --init --recursive
- git submodule status
- export DCTRL_ARG="--builddir=${DUNE_BUILD_DIR} --opts=${OPTS}"
# our local scripts look for an OPTS env entry
- ./local/bin/download_external_libraries.py
- ./local/bin/build_external_libraries.py
# ensures ${MY_MODULE} from travis own checkout is used
- echo removing modules ${MODULES_TO_DELETE}
- rm -rf ${MODULES_TO_DELETE} ${MY_MODULE}
# command to install dependencies
install:
- cd $HOME/src
#- export INST_DCTRL=$HOME/dune/bin/dunecontrol
- export SRC_DCTRL=$PWD/dune-common/bin/dunecontrol
- ${SRC_DCTRL} ${DCTRL_ARG} all
# move my travis checkout into this source tree
- cp -ra ${TRAVIS_BUILD_DIR} .
before_script:
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} configure
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ${BUILD_CMD}
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ${BUILD_CMD} test_binaries
script:
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ${BUILD_CMD} test
- ${TRAVIS_BUILD_DIR}/scripts/upload_test_logs.bash
- PYTHONPATH=$HOME/src/scripts/python/ python3 -c "import travis_report as tp; tp.clang_format_status(\"${TRAVIS_BUILD_DIR}\")"
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ${BUILD_CMD} headercheck
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ${BUILD_CMD} install | grep -v "Installing"
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ${BUILD_CMD} package_source
# runs independent of 'script' failure/success
after_script:
# reset for ctest
- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec make clean
- export CTEST_ARG="--output-on-failure -S ${TRAVIS_BUILD_DIR}/.travis.ctest"
# ctest errors on coverage gathering, this should NOT fail our entire build
#- ${SRC_DCTRL} ${DCTRL_ARG} --only=${MY_MODULE} bexec ctest ${CTEST_ARG} || echo "CTest Failed"
notifications:
email:
on_success: change
on_failure: change
webhooks:
- https://buildtimetrend.herokuapp.com/travis
#after_success:
#- coveralls
branches:
except:
- gh-pages
cache:
directories:
- $HOME/.ccache
env:
global:
- MY_MODULE=dune-stuff DUNE_BUILD_DIR=${HOME}/dune_build/ INSTALL_DIR=$HOME/dune CTEST_OUTPUT_ON_FAILURE=1
matrix:
include:
- os: linux
compiler: gcc
addons: &gcc49
apt:
sources:
- *commonsources
- 'ubuntu-toolchain-r-test'
packages:
- *commonpackages
- ['g++-4.9', 'gcc-4.9']
env: CXX=g++-4.9 CC=gcc-4.9
- os: linux
compiler: gcc
addons: *gcc49
env: CXX=g++-4.9 CC=gcc-4.9 MODULES_TO_DELETE="dune-fem dune-pdelab dune-typetree dune-grid dune-istl"
- os: linux
compiler: gcc
addons: *gcc49
env: CXX=g++-4.9 CC=gcc-4.9 MODULES_TO_DELETE="dune-fem dune-pdelab"
- os: linux
compiler: gcc
addons:
apt:
sources:
- *commonsources
- 'ubuntu-toolchain-r-test'
packages:
- *commonpackages
- ['g++-5', 'gcc-5']
env: CXX=g++-5 CC=gcc-5
- os: linux
compiler: clang
addons:
apt:
sources:
- *commonsources
- ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7']
packages:
- *commonpackages
- ['clang-3.7']
env: CXX=clang++-3.7 CC=clang-3.7
- os: linux
compiler: clang
addons:
apt:
sources:
- *commonsources
- ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7']
packages:
- *commonpackages
- ['clang-3.7']
env: OPTS=config.opts/travis.make BUILD_CMD="make -k -j2" CXX=clang++-3.7 CC=clang-3.7
#- os: linux
#compiler: clang
#addons:
#apt:
#sources:
#- *commonsources
#- ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.8']
#packages:
#- *commonpackages
#- ['clang-3.8']
#env: CXX=clang++-3.8 CC=clang-3.8