forked from OpenSCAP/openscap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (29 loc) · 1.27 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
sudo: required
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y autoconf automake libtool 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 xsltproc
language: c
before_script:
- export CC=gcc-7 GCOV=gcov-7
- ./autogen.sh
- mkdir build
- cd build
script:
- ../configure CFLAGS="--coverage -ftest-coverage -fprofile-arcs" LDFLAGS=-lgcov --enable-debug
- build-wrapper-linux-x86-64 --out-dir bw-output make all || true # Will always fail builds on forked repositories.
- make -k check VERBOSE=true || { 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'