forked from OpenSCAP/openscap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
36 lines (28 loc) · 1.23 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
sudo: required
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y cmake lcov libdbus-1-dev libdbus-glib-1-dev libcurl4-openssl-dev libgcrypt-dev libselinux1-dev libgconf2-dev libacl1-dev libblkid-dev libcap-dev libxml2-dev swig libxml-parser-perl libxml-xpath-perl libperl-dev librpm-dev swig librtmp-dev
language: c
before_script:
- export CC=gcc-7 GCOV=gcov-7
- cd build
script:
- CFLAGS="--coverage -ftest-coverage -fprofile-arcs" LDFLAGS=-lgcov cmake -DCMAKE_BUILD_TYPE=Debug ../
- build-wrapper-linux-x86-64 --out-dir bw-output make all || true # Will always fail builds on forked repositories.
- make all
- CTEST_OUTPUT_ON_FAILURE=1 ctest || { test "$SEND_COVERAGE_EVEN_IF_TESTS_FAIL" = yes && curl -s https://codecov.io/bash > cov.sh && bash cov.sh -x "$GCOV"; }
- bash ../tests/recursively_generate_gcov.sh . || true # Failures that occur here are harmless
- cd .. && sonar-scanner || true # Will always fail builds on forked repositories.
after_success:
- curl -s https://codecov.io/bash > cov.sh && bash cov.sh -x "$GCOV"
addons:
sonarcloud:
organization: "openscap"
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
cache:
directories:
- '$HOME/.sonar/cache'