Browse Source

chore(travis): Combine code coverage build with full build

Saves time on the CI job, and the produced binary isn't used for releases
so it's uneeded to keep it unmodified.
reviewable/pr6317/r2
Anthony Bilinski 4 years ago
parent
commit
f97135aac5
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 4
      .travis.yml
  2. 11
      .travis/build-ubuntu-16-04.sh

4
.travis.yml

@ -47,12 +47,12 @@ jobs:
env: JOB=build-ubuntu-16-04 env: JOB=build-ubuntu-16-04
addons: addons:
apt: apt:
packages: packages:
- lcov - lcov
script: "./.travis/$JOB.sh" script: "./.travis/$JOB.sh"
after_success: after_success:
# Create lcov report # Create lcov report
- lcov --directory _debug --capture --output-file coverage.info - lcov --directory _build --capture --output-file coverage.info
# Filter out system headers and test sources # Filter out system headers and test sources
- lcov --remove coverage.info '/usr/*' '*/test/*' '*/*_autogen/*' --output-file coverage.info - lcov --remove coverage.info '/usr/*' '*/test/*' '*/*_autogen/*' --output-file coverage.info
# Upload report to codecov.io # Upload report to codecov.io

11
.travis/build-ubuntu-16-04.sh

@ -198,20 +198,15 @@ build_qtox() {
echo '*** BUILDING "FULL" VERSION ***' echo '*** BUILDING "FULL" VERSION ***'
cmake -H. -B"$BUILDDIR" \ cmake -H. -B"$BUILDDIR" \
-DUPDATE_CHECK=ON \ -DUPDATE_CHECK=ON \
-DSTRICT_OPTIONS=ON -DSTRICT_OPTIONS=ON \
-DCODE_COVERAGE=ON
bdir bdir
} }
test_qtox() { test_qtox() {
local BUILDDIR=_debug local BUILDDIR=_build
cmake -H. -B"$BUILDDIR" \
-DUPDATE_CHECK=ON \
-DSTRICT_OPTIONS=ON \
-DCODE_COVERAGE=ON
cd $BUILDDIR cd $BUILDDIR
make -j$(nproc)
make test make test
cd - cd -
} }

Loading…
Cancel
Save