Skip to content

Commit 49972b2

Browse files
authored
Merge pull request #415 from ferdnyc/coverage-build
Use Codecov.io for coverage reporting
2 parents 0bc87c0 + 6b16162 commit 49972b2

File tree

2 files changed

+45
-36
lines changed

2 files changed

+45
-36
lines changed

.travis.yml

Lines changed: 30 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ addons:
1919
- doxygen
2020
- graphviz
2121
- curl
22-
- jq
2322
packages: &ff_common # Common set of FFmpeg packages
2423
- *p_common
2524
- libfdk-aac-dev
@@ -34,28 +33,13 @@ addons:
3433
- libswresample-dev
3534

3635
matrix:
37-
3836
include:
39-
- name: "FFmpeg 2 GCC (Ubuntu 16.04 Xenial)"
40-
env:
41-
- BUILD_VERSION=ffmpeg2
42-
- CMAKE_EXTRA_ARGS=""
43-
- TEST_TARGET="os_test"
44-
os: linux
45-
dist: xenial
46-
addons:
47-
apt:
48-
sources:
49-
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
50-
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
51-
packages:
52-
- *ff_common
5337

54-
- name: "FFmpeg 3 GCC (Ubuntu 18.04 Bionic)"
38+
- name: "Coverage (Ubuntu 18.04 Bionic)"
5539
env:
56-
- BUILD_VERSION=ffmpeg3
57-
- CMAKE_EXTRA_ARGS=""
58-
- TEST_TARGET=test
40+
- BUILD_VERSION=coverage_ffmpeg3
41+
- CMAKE_EXTRA_ARGS="-DENABLE_COVERAGE=1"
42+
- TEST_TARGET=coverage
5943
os: linux
6044
dist: bionic
6145
addons:
@@ -66,7 +50,8 @@ matrix:
6650
packages:
6751
- *ff_common
6852
- qt5-default
69-
- libjsoncpp-dev
53+
- lcov
54+
- binutils-common # For c++filt
7055

7156
- name: "FFmpeg 4 GCC (Ubuntu 18.04 Bionic)"
7257
env:
@@ -95,14 +80,13 @@ matrix:
9580
- libavresample4
9681
- libswresample3
9782

98-
- name: "FFmpeg 3 Clang (Ubuntu 18.04 Bionic)"
83+
- name: "FFmpeg 3 GCC (Ubuntu 18.04 Bionic)"
9984
env:
100-
- BUILD_VERSION=clang_ffmpeg3
85+
- BUILD_VERSION=ffmpeg3
10186
- CMAKE_EXTRA_ARGS=""
10287
- TEST_TARGET=test
10388
os: linux
10489
dist: bionic
105-
compiler: clang
10690
addons:
10791
apt:
10892
sources:
@@ -111,16 +95,16 @@ matrix:
11195
packages:
11296
- *ff_common
11397
- qt5-default
114-
- libomp-dev
115-
98+
- libjsoncpp-dev
11699

117-
- name: "Coverage (Ubuntu 18.04 Bionic)"
100+
- name: "FFmpeg 3 Clang (Ubuntu 18.04 Bionic)"
118101
env:
119-
- BUILD_VERSION=coverage_ffmpeg3
120-
- CMAKE_EXTRA_ARGS="-DENABLE_COVERAGE=1"
121-
- TEST_TARGET=coverage
102+
- BUILD_VERSION=clang_ffmpeg3
103+
- CMAKE_EXTRA_ARGS=""
104+
- TEST_TARGET=test
122105
os: linux
123106
dist: bionic
107+
compiler: clang
124108
addons:
125109
apt:
126110
sources:
@@ -129,12 +113,22 @@ matrix:
129113
packages:
130114
- *ff_common
131115
- qt5-default
132-
- lcov
133-
- binutils-common # For c++filt
116+
- libomp-dev
134117

135-
before_script:
136-
- CODACY_VERSION="$(curl -Ls https://api.bintray.com/packages/codacy/Binaries/codacy-coverage-reporter/versions/_latest | jq -r .name)"
137-
- if [ "x${TEST_TARGET}" = "xcoverage" ]; then curl -Ls -o codacy-coverage-reporter "https://dl.bintray.com/codacy/Binaries/${CODACY_VERSION}/codacy-coverage-reporter-linux"; chmod +x codacy-coverage-reporter; fi
118+
- name: "FFmpeg 2 GCC (Ubuntu 16.04 Xenial)"
119+
env:
120+
- BUILD_VERSION=ffmpeg2
121+
- CMAKE_EXTRA_ARGS=""
122+
- TEST_TARGET="os_test"
123+
os: linux
124+
dist: xenial
125+
addons:
126+
apt:
127+
sources:
128+
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
129+
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
130+
packages:
131+
- *ff_common
138132

139133
script:
140134
- mkdir -p build; cd build;
@@ -145,4 +139,4 @@ script:
145139
- cd ..
146140

147141
after_success:
148-
- if [ "x${TEST_TARGET}" = "xcoverage" ]; then ./codacy-coverage-reporter report -l CPP -r build/coverage.info; fi
142+
- if [ "x$TEST_TARGET" = "xcoverage" ]; then bash <(curl -s https://codecov.io/bash) -f build/coverage.info || echo "Codecov did not collect coverage reports"; fi

codecov.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
codecov:
2+
branch: default
3+
coverage:
4+
status:
5+
project:
6+
default:
7+
base: pr # Only post a status to pull requests
8+
informational: true # Don't block PRs based on coverage stats (yet?)
9+
ignore:
10+
- "/src/examples"
11+
- "/src/Qt/demo"
12+
- "/thirdparty"
13+
- "/doc"
14+
- "/cmake"
15+
- "/*.md"

0 commit comments

Comments
 (0)