travis: do coverage on nightly rust

This commit is contained in:
Joseph Birr-Pixton 2017-07-22 20:19:10 +01:00
parent d7ae542376
commit fb7020f961
2 changed files with 10 additions and 6 deletions

View File

@ -1,18 +1,22 @@
language: rust
group: deprecated-2017Q3
rust:
- stable
- nightly
matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx
rust: stable
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install openssl ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pip install --upgrade pip ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then admin/build-lcov ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then gem install coveralls-lcov ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install libclang-common-3.8-dev llvm-3.8-dev ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_RUST_VERSION" == "nightly" ]]; then admin/build-lcov ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_RUST_VERSION" == "nightly" ]]; then gem install coveralls-lcov ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_RUST_VERSION" == "nightly" ]]; then sudo apt-get install libclang-common-3.8-dev llvm-3.8-dev ; fi
script:
- cargo build
- RUST_BACKTRACE=1 cargo test
@ -23,5 +27,5 @@ script:
- ( cd bogo && ./runme )
- cargo build --no-default-features
- cargo test --no-default-features --no-run
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./admin/coverage ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then coveralls-lcov final.info ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_RUST_VERSION" == "nightly" ]]; then ./admin/coverage ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_RUST_VERSION" == "nightly" ]]; then coveralls-lcov final.info ; fi

View File

@ -5,7 +5,7 @@ import glob
import subprocess
LLVM_PATH = glob.glob('/usr/lib/llvm-3.8/lib/clang/3.8.[0-9]/lib/linux/')[0]
COVERAGE_OPTIONS = '-Ccodegen-units=1 -Clink-dead-code -Cpasses=insert-gcov-profiling -L%s -lclang_rt.profile-x86_64' % LLVM_PATH
COVERAGE_OPTIONS = '-Ccodegen-units=1 -Clink-dead-code -Cpasses=insert-gcov-profiling -Zno-landing-pads -L%s -lclang_rt.profile-x86_64' % LLVM_PATH
LCOVOPTS = '--gcov-tool ./admin/llvm-gcov --rc lcov_branch_coverage=1 --rc lcov_excl_line=assert'.split()
def lcov_exe(*args):