forked from kahypar/kahypar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
149 lines (132 loc) · 4.67 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
# Travis-CI build script for KaHyPar
language: cpp
# Ubuntu 14.04 Trusty support
dist: bionic
addons:
matrix:
include:
# gcc 9 - Debug Build
- env: CMAKE_CC="gcc-9" CMAKE_CXX="g++-9" BUILD_TYPE="Debug" COV="OFF" SONAR="OFF"
os: linux
addons: &gcc9
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
- gcovr
- cppcheck
- libpython3-all-dev
sonarcloud:
organization: "sebastianschlag-github"
before_install:
- sudo add-apt-repository -y ppa:mhier/libboost-latest
- sudo apt-get -q update
- sudo apt-get -y install libboost1.70-dev
# gcc 9 - Release Build
- env: CMAKE_CC="gcc-9" CMAKE_CXX="g++-9" BUILD_TYPE="Release" COV="OFF" SONAR="OFF"
os: linux
addons: *gcc9
before_install:
- sudo add-apt-repository -y ppa:mhier/libboost-latest
- sudo apt-get -q update
- sudo apt-get -y install libboost1.70-dev
# gcc 9 - CodeCov
- env: CMAKE_CC="gcc-7" CMAKE_CXX="g++-7" BUILD_TYPE="Debug" COV="ON" SONAR="OFF"
os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- lcov
- gcovr
- cppcheck
- libpython3-all-dev
before_install:
- sudo add-apt-repository -y ppa:mhier/libboost-latest
- sudo apt-get -q update
- sudo apt-get -y install libboost1.70-dev
# gcc 9 - SonarCube
- env: CMAKE_CC="gcc-9" CMAKE_CXX="g++-9" BUILD_TYPE="Debug" COV="OFF" SONAR="ON"
os: linux
addons: *gcc9
before_install:
- sudo add-apt-repository -y ppa:mhier/libboost-latest
- sudo apt-get -q update
- sudo apt-get -y install libboost1.70-dev
# clang 3.7 on MacOSX
#- env: CMAKE_CC="clang" CMAKE_CXX="clang++" BUILD_TYPE="Debug" COV="OFF"
# os: osx
# before_install:
# - brew update
# - HOMEBREW_NO_AUTO_UPDATE=1 brew install cppcheck
#- env: CMAKE_CC="clang" CMAKE_CXX="clang++" BUILD_TYPE="Release" COV="OFF"
# os: osx
# before_install:
# - brew update
# - HOMEBREW_NO_AUTO_UPDATE=1 brew install cppcheck
install:
- export DEPS_DIR="${HOME}/deps"
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
- echo ${TRAVIS_OS_NAME}
- |
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
export CMAKE_URL="https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0-Linux-x86_64.tar.gz";
mkdir cmake;
travis_retry wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake;
export PATH=${DEPS_DIR}/cmake/bin:${PATH};
echo ${PATH};
else
brew install cmake || brew upgrade cmake;
fi
- cmake --version
before_script:
# print out some version numbers
- $CMAKE_CXX --version
# configure
- cd "${TRAVIS_BUILD_DIR}"
- mkdir build; cp sonar-project.properties build; cd build
- export TRAVIS_ENV=1
- if [ "$BUILD_TYPE" = "Debug" ]; then export PREPROC_ASSERT=0; else PREPROC_ASSERT=1; fi
- echo "PREPROC_ASSERT=$PREPROC_ASSERT"
- cmake
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DKAHYPAR_ENABLE_HEAVY_PREPROCESSING_ASSERTIONS="$PREPROC_ASSERT"
-DCMAKE_C_COMPILER="$CMAKE_CC" -DCMAKE_CXX_COMPILER="$CMAKE_CXX" -DKAHYPAR_USE_GCOV="$COV"
-DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS"
$CMAKE_ARGS ..
script:
- |
if [ "$BUILD_TYPE" = "Debug" ] && [ "$CMAKE_CXX" = "g++-9" ] && [ "$COV" = "OFF" ]; then
make clean all;
elif [ "$BUILD_TYPE" = "Debug" ] && [ "$CMAKE_CXX" = "g++-7" ] && [ "$COV" = "ON" ]; then
make clean all;
lcov --directory . --capture --output-file coverage.info;
lcov --remove coverage.info '/usr/*' --output-file coverage.info;
lcov --list coverage.info;
gcovr -r ../ -x > report.xml;
elif [ "$BUILD_TYPE" = "Debug" ] && [ "$CMAKE_CXX" = "g++-9" ] && [ "$SONAR" = "ON" ]; then
build-wrapper-linux-x86-64 --out-dir bw-output make clean all;
sonar-scanner;
elif [ "$BUILD_TYPE" = "Release" ] && [ "$CMAKE_CXX" = "g++-9" ]; then
build-wrapper-linux-x86-64 --out-dir bw-output make integration_tests; sonar-scanner;
../scripts/run_regression_tests.sh;
else
make clean all;
fi
after_success:
- |
if [ "$BUILD_TYPE" = "Debug" ] && [ "$CMAKE_CXX" = "g++-7" ] && [ "$COV" = "ON" ]; then
cd ${TRAVIS_BUILD_DIR};
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports";
fi
#cache:
# directories:
# - '$HOME/.sonar/cache'
#language: ruby
#rvm:
# - 2.4
#script:
# - "bundle install"
# - "bundle exec jekyll build"