diff --git a/.travis.yml b/.travis.yml index b554597..2f846ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,44 @@ language: rust -sudo: false +sudo: required cache: cargo rust: - 1.24.0 - stable - nightly + - beta os: - linux - osx env: - ARCH=x86_64 - - ARCH=i686 \ No newline at end of file + - ARCH=i686 + +matrix: + allow_failures: + - rust: nightly + +addons: + apt: + packages: + - libcurl4-openssl-dev + - libelf-dev + - libdw-dev + - cmake + - gcc + - binutils-dev + - libiberty-dev + +after_success: | + wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && + tar xzf master.tar.gz && + cd kcov-master && + mkdir build && + cd build && + cmake .. && + make && + make install DESTDIR=../../kcov-build && + cd ../.. && + rm -rf kcov-master && + for file in target/debug/dlopen-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done && + bash <(curl -s https://codecov.io/bash) && + echo "Uploaded code coverage" \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 5866f22..97ebfef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,6 +44,11 @@ branch = "master" [badges.is-it-maintained-open-issues] repository = "szymonwieloch/rust-dlopen" +[badges.codecov] +repository = "szymonwieloch/rust-dlopen" +branch = "master" +service = "github" + [[example]] name = "raw" crate-type = ["bin"] diff --git a/README.md b/README.md index ff4653b..248c3fe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # rust-dlopen -[![Travis CI][tcii]][tci] [![Appveyor CI][acii]][aci] [![Crates CI][ccii]][cci] +[![Travis CI][tcii]][tci] [![Appveyor CI][acii]][aci] [![Crates CI][ccii]][cci] [![Codedov CI][vcii]][vci] [tcii]: https://travis-ci.org/szymonwieloch/rust-dlopen.svg?branch=master [tci]: https://travis-ci.org/szymonwieloch/rust-dlopen @@ -8,6 +8,8 @@ [aci]: https://ci.appveyor.com/project/szymonwieloch/rust-dlopen [ccii]: https://img.shields.io/crates/v/dlopen.svg [cci]: https://crates.io/crates/dlopen +[vcii]: https://codecov.io/api/gh/szymonwieloch/rust-dlopen/branch/master/graph/badge.svg +[vci]: https://codecov.io/gh/szymonwieloch/rust-dlopen # Overview