Skip to content

Commit

Permalink
Merge pull request #415 from ferdnyc/coverage-build
Browse files Browse the repository at this point in the history
Use Codecov.io for coverage reporting
  • Loading branch information
ferdnyc authored Jan 12, 2020
2 parents 0bc87c0 + 6b16162 commit 49972b2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 36 deletions.
66 changes: 30 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ addons:
- doxygen
- graphviz
- curl
- jq
packages: &ff_common # Common set of FFmpeg packages
- *p_common
- libfdk-aac-dev
Expand All @@ -34,28 +33,13 @@ addons:
- libswresample-dev

matrix:

include:
- name: "FFmpeg 2 GCC (Ubuntu 16.04 Xenial)"
env:
- BUILD_VERSION=ffmpeg2
- CMAKE_EXTRA_ARGS=""
- TEST_TARGET="os_test"
os: linux
dist: xenial
addons:
apt:
sources:
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
packages:
- *ff_common

- name: "FFmpeg 3 GCC (Ubuntu 18.04 Bionic)"
- name: "Coverage (Ubuntu 18.04 Bionic)"
env:
- BUILD_VERSION=ffmpeg3
- CMAKE_EXTRA_ARGS=""
- TEST_TARGET=test
- BUILD_VERSION=coverage_ffmpeg3
- CMAKE_EXTRA_ARGS="-DENABLE_COVERAGE=1"
- TEST_TARGET=coverage
os: linux
dist: bionic
addons:
Expand All @@ -66,7 +50,8 @@ matrix:
packages:
- *ff_common
- qt5-default
- libjsoncpp-dev
- lcov
- binutils-common # For c++filt

- name: "FFmpeg 4 GCC (Ubuntu 18.04 Bionic)"
env:
Expand Down Expand Up @@ -95,14 +80,13 @@ matrix:
- libavresample4
- libswresample3

- name: "FFmpeg 3 Clang (Ubuntu 18.04 Bionic)"
- name: "FFmpeg 3 GCC (Ubuntu 18.04 Bionic)"
env:
- BUILD_VERSION=clang_ffmpeg3
- BUILD_VERSION=ffmpeg3
- CMAKE_EXTRA_ARGS=""
- TEST_TARGET=test
os: linux
dist: bionic
compiler: clang
addons:
apt:
sources:
Expand All @@ -111,16 +95,16 @@ matrix:
packages:
- *ff_common
- qt5-default
- libomp-dev

- libjsoncpp-dev

- name: "Coverage (Ubuntu 18.04 Bionic)"
- name: "FFmpeg 3 Clang (Ubuntu 18.04 Bionic)"
env:
- BUILD_VERSION=coverage_ffmpeg3
- CMAKE_EXTRA_ARGS="-DENABLE_COVERAGE=1"
- TEST_TARGET=coverage
- BUILD_VERSION=clang_ffmpeg3
- CMAKE_EXTRA_ARGS=""
- TEST_TARGET=test
os: linux
dist: bionic
compiler: clang
addons:
apt:
sources:
Expand All @@ -129,12 +113,22 @@ matrix:
packages:
- *ff_common
- qt5-default
- lcov
- binutils-common # For c++filt
- libomp-dev

before_script:
- CODACY_VERSION="$(curl -Ls https://api.bintray.com/packages/codacy/Binaries/codacy-coverage-reporter/versions/_latest | jq -r .name)"
- 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
- name: "FFmpeg 2 GCC (Ubuntu 16.04 Xenial)"
env:
- BUILD_VERSION=ffmpeg2
- CMAKE_EXTRA_ARGS=""
- TEST_TARGET="os_test"
os: linux
dist: xenial
addons:
apt:
sources:
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
packages:
- *ff_common

script:
- mkdir -p build; cd build;
Expand All @@ -145,4 +139,4 @@ script:
- cd ..

after_success:
- if [ "x${TEST_TARGET}" = "xcoverage" ]; then ./codacy-coverage-reporter report -l CPP -r build/coverage.info; fi
- 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
15 changes: 15 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
codecov:
branch: default
coverage:
status:
project:
default:
base: pr # Only post a status to pull requests
informational: true # Don't block PRs based on coverage stats (yet?)
ignore:
- "/src/examples"
- "/src/Qt/demo"
- "/thirdparty"
- "/doc"
- "/cmake"
- "/*.md"

0 comments on commit 49972b2

Please sign in to comment.