This repository has been archived by the owner on Nov 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
114 lines (105 loc) · 2.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
language: cpp
sudo: false
dist: trusty
ruby: 2.2.0
env:
global:
- USE_CCACHE=1
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=200M
- CCACHE_CPP2=1
- PIPENV_VENV_IN_PROJECT=1
- PIPENV_IGNORE_VIRTUALENVS=1
- LC_ALL="en_US.UTF-8"
- LANG="en_US.UTF-8"
- LANGUAGE="en_US.UTF-8"
- PYTHONIOENCODING=UTF-8
- CMAKE_VERSION="3.6.3"
matrix:
include:
- os: linux
addons: &1
apt:
packages:
- g++-4.8
- gcc-4.8
- gfortran-4.8
- clang-format-3.9
- libboost-all-dev
- lcov
env:
- CXX_COMPILER='g++-4.8'
- C_COMPILER='gcc-4.8'
- Fortran_COMPILER='gfortran-4.8'
- PYTHON='--three'
- RUN_DANGER=true
- os: linux
addons: *1
env:
- CXX_COMPILER='g++-4.8'
- C_COMPILER='gcc-4.8'
- Fortran_COMPILER='gfortran-4.8'
- PYTHON='--two'
- os: linux
addons: *1
env:
- CXX_COMPILER='g++-4.8'
- C_COMPILER='gcc-4.8'
- Fortran_COMPILER='gfortran-4.8'
- PYTHON='--two'
- COVERAGE='--type=debug --coverage'
- os: osx
env:
- CXX_COMPILER='clang++'
- C_COMPILER='clang'
- Fortran_COMPILER='gfortran-7'
- BOOST_ROOT='/usr/local/opt/[email protected]'
- PYTHON='--two'
cache:
timeout: 1000
bundler: true
pip: true
directories:
- $HOME/Deps/cmake/$CMAKE_VERSION
before_install:
# Dependencies are downloaded in $HOME/Downloads and installed in $HOME/Deps
- mkdir -p $HOME/Downloads $HOME/Deps
before_install:
- test -n $CC && unset CC
- test -n $CXX && unset CXX
- test -n $FC && unset FC
install:
- ./.ci/install.sh
- ./.ci/cmake.sh
- export PATH=$HOME/Deps/cmake/$CMAKE_VERSION/bin${PATH:+:$PATH}
- pipenv $PYTHON install
- pipenv run python --version
before_script:
- source $(pipenv --venv)/bin/activate
- cd $TRAVIS_BUILD_DIR
- echo 'Build set up summary'
- |
if [[ "$RUN_DANGER" = true ]]; then
bundle install --gemfile=.ci/Gemfile
fi
script:
- |
if [[ "$RUN_DANGER" = true ]]; then
BUNDLE_GEMFILE=.ci/Gemfile bundle exec danger --dangerfile=.ci/Dangerfile --verbose
fi
- |
pipenv run python setup --cxx=$CXX_COMPILER $COVERAGE --prefix=$HOME/getkw
- cd build
- cmake --build . --target install -- jobs=2 VERBOSE=1
- ctest --output-on-failure --verbose --parallel 2
after_success:
- |
if [[ "$COVERAGE" = "--type=debug --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 '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