-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
130 lines (119 loc) · 3.44 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
language: cpp
sudo: false
dist: xenial
git:
depth: false
cache:
bundler: true
pip: true
directories:
- $HOME/Deps/eigen
env:
global:
- PIPENV_VENV_IN_PROJECT=1
- PIPENV_IGNORE_VIRTUALENVS=1
jobs:
include:
- os: linux
addons:
apt:
packages:
- clang
- cmake
- gfortran
- libboost-math-dev
env:
- CXX_COMPILER='clang++'
- C_COMPILER='clang'
- Fortran_COMPILER='gfortran'
- BUILD_TYPE='release'
- os: linux
addons:
apt:
packages:
- g++
- gcc
- cmake
- gfortran
- libboost-math-dev
env:
- CXX_COMPILER='g++'
- C_COMPILER='gcc'
- Fortran_COMPILER='gfortran'
- BUILD_TYPE='release'
- STATIC='--static'
- os: linux
addons:
apt:
packages:
- cmake
- g++
- gcc
- gfortran
- lcov
- libboost-math-dev
env:
- CXX_COMPILER='g++'
- C_COMPILER='gcc'
- Fortran_COMPILER='gfortran'
- BUILD_TYPE='debug'
- COVERAGE='--coverage'
- stage: Danger Bot
ruby: 2.5.3
addons:
apt:
packages:
- clang-format
if: commit_message !~ /(skip bot|bot skip|skip danger|danger skip)/
script:
- |
bundle install --gemfile=.ci/Gemfile
BUNDLE_GEMFILE=.ci/Gemfile bundle exec danger --dangerfile=.ci/Dangerfile
before_install:
- test -n $CC && unset CC
- test -n $CXX && unset CXX
- test -n $FC && unset FC
# Dependencies are downloaded in $HOME/Downloads and installed in $HOME/Deps
- mkdir -p $HOME/Downloads $HOME/Deps
install:
- ./.ci/eigen.sh
- pip install --user pipenv --upgrade
- pipenv install --three
before_script:
- ./.ci/report_versions.sh
- cd $TRAVIS_BUILD_DIR
- echo 'Build set up summary'
script:
- |
pipenv run cmake -H. -Bbuild \
-DCMAKE_CXX_COMPILER=$CXX_COMPILER \
-DCMAKE_C_COMPILER=$C_COMPILER \
-DCMAKE_Fortran_COMPILER=$Fortran_COMPILER \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$HOME/Software/pcmsolver \
-DEigen3_DIR=${HOME}/Deps/eigen/share/eigen3/cmake
#- |
# pipenv run python setup.py --cxx=$CXX_COMPILER \
# --cc=$C_COMPILER \
# --fc=$Fortran_COMPILER \
# --type=$BUILD_TYPE \
# $STATIC \
# $COVERAGE \
# --prefix=$HOME/Software/pcmsolver
- |
pipenv run cmake --build build --target install -- --jobs=2 VERBOSE=1
- cd build
- travis_wait 40 pipenv run python ../.ci/ci_test.py ctest --output-on-failure --verbose --parallel 2
- pipenv run python ../.ci/ci_print_failing.py
after_success:
- |
if [[ "$COVERAGE" = "--coverage" ]]; then
cd $TRAVIS_BUILD_DIR
lcov --version
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
lcov --remove coverage.info 'external/*' --output-file coverage.info
lcov --remove coverage.info 'tests/*' --output-file coverage.info
lcov --list coverage.info
bash <(curl -s https://codecov.io/bash) -X gcov || echo "Codecov did not collect coverage reports"
fi