forked from MRChemSoft/mrchem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
120 lines (111 loc) · 3.66 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
language: cpp
dist: bionic
ruby: 2.5.3
notifications:
slack:
secure: PSksBCDscyT65LOQbb5rk/ArV+QD5RJ0WANZYX2j3ONwcbNWv5LfbosnpORcXeD/OSQQi62jk2geOtGI+FGZbSy80nEwl3xk4JB7y0y+wLzYz4453l+OGWxndGpMUea2HNJu6DJsUVimin1y+4KHRakL3gvWkrbnwWFiWE+awnQw5I4zlxCC+IZ/7xhmA74tLIFq+PbqjvscrPv8hUwcpU6j3Cu0jvs4mpIi4/fgUCoMBJ0Cu+5ZZeraYHCjcB25zGpJlcZPUJP3qMQxCclXPIBTNEMNuYYU2Q6C5I8PiU/w+3Jwi7MDYTWlQ9UIdKz7xUzBQV6PDPm5Z46YNJKO2TJuVWOOdZ7BRivfnfX2gFA+oKCJ/ViBNK0WyK9guzcW6k7b0AHu/8Mgu7+QqRdap85XT4hNBYNlMJwx8lKMoMXIy7WL1ijCI9q0SvL7bb1jrEGPeFlSBYW3cVlhvPQc1duy6XqlzxHl55ZRbC7vKbPbfOTFG5uKg7u7YdCxxaKJ050EK4p94Vvocg0wO5aeMZOmH3cioK3yJZOKlGAJoGsAHWlU3aHzhH6NSO+2+T7ro+pXrZy7ZQ3SILGIXzPsTMsi1lR78Be4x2F7qjl0CWMeilfornGbI5VC/7iKYOKZ2JyP7fhjeX+BQb8DuDXzyW9wb3/w4zwb0BDfxQJMmYw=
matrix:
fast_finish: true
include:
- os: linux
addons: &1
apt:
packages:
- g++
- gcc
- lcov
env:
- BUILD_TYPE='release'
- CXX_COMPILER='g++'
- C_COMPILER='gcc'
- RUN_DANGER=false
- os: linux
addons: *1
env:
- BUILD_TYPE='release'
- CXX_COMPILER='g++'
- C_COMPILER='gcc'
- OPENMP='--omp'
- RUN_DANGER=false
- os: linux
addons: *1
env:
- BUILD_TYPE='debug'
- CXX_COMPILER='g++'
- C_COMPILER='gcc'
- COVERAGE='--coverage'
- RUN_DANGER=false
- os: linux
addons: &2
apt:
packages:
- clang
- clang-format
env:
- BUILD_TYPE='release'
- CXX_COMPILER='clang++'
- C_COMPILER='clang'
- RUN_DANGER=true
env:
global:
- LC_ALL="en_US.UTF-8"
- LANG="en_US.UTF-8"
- LANGUAGE="en_US.UTF-8"
- PYTHONIOENCODING=UTF-8
- OMP_NUM_THREADS=2
- CMAKE_VERSION="3.12.4"
cache:
timeout: 1000
pip: true
directories:
- $HOME/Deps/cmake/$CMAKE_VERSION
- $HOME/Deps/eigen
before_install:
# Dependencies are downloaded in $HOME/Downloads and installed in $HOME/Deps
- mkdir -p $HOME/Downloads $HOME/Deps
install:
- ./.ci/cmake.sh
- export PATH=$HOME/Deps/cmake/$CMAKE_VERSION/bin${PATH:+:$PATH}
- pip install --user pipenv --upgrade
- pipenv install --three
- pipenv run python --version
before_script:
- test -n $CC && unset CC
- test -n $CXX && unset CXX
- test -n $FC && unset FC
- source $(pipenv --venv)/bin/activate
- |
if [[ "${RUN_DANGER}" = true ]]; then
bundle install --gemfile=.ci/Gemfile
BUNDLE_GEMFILE=.ci/Gemfile bundle exec danger --dangerfile=.ci/Dangerfile
fi
script:
- ./.ci/report_versions.sh
- |
python ./setup \
--type=${BUILD_TYPE} \
--prefix=${HOME}/Software/MRChem \
--cxx=${CXX_COMPILER} \
${COVERAGE} \
${OPENMP} \
--cmake-options="-DCMAKE_C_COMPILER=${C_COMPILER} -DPYTHON_EXECUTABLE=$(type -P python)"
- cmake --build build --target install -- VERBOSE=1 -j2
- cd build
- |
if [[ "${COVERAGE}" = "--coverage" ]]; then
travis_wait 60 ctest --output-on-failure --verbose -L "unit" -LE "exchange_hessian"
else
ctest --output-on-failure --verbose
fi
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