forked from Tazura/CMake-codecov
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (53 loc) · 1.22 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
# This file is part of CMake-codecov.
#
# Copyright (c)
# 2015-2019 RWTH Aachen University, Federal Republic of Germany
#
# See the LICENSE file in the package base directory for details
#
# Written by Alexander Haase, alexander.haase@rwth-aachen.de
#
language: c
matrix:
include:
- os: linux
dist: xenial
compiler: gcc
- os: linux
dist: xenial
compiler: clang
- os: linux
dist: bionic
compiler: gcc
- os: linux
dist: bionic
compiler: clang
- os: osx
compiler: clang
addons:
apt:
packages:
- cmake
- lcov
- gfortran
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]];
then
brew update --quiet >& /dev/null;
fi
# The following solution was inspired by http://stackoverflow.com/a/20802381
- if [[ "$TRAVIS_OS_NAME" == "osx" ]];
then
for pkg in gcc cmake lcov; do
if brew list -1 | grep -q "^${pkg}\$"; then
brew outdated $pkg || brew upgrade $pkg;
else
brew install $pkg;
fi
done
fi
script:
- mkdir build && cd build
- cmake .. -DENABLE_COVERAGE=On && make && make test gcov lcov
after_success:
- bash <(curl -s https://codecov.io/bash) -X gcov