From 81ddeb59a4a8b31a2d26abbf9413205421e4d36a Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Tue, 11 Jun 2019 17:48:04 -0400 Subject: [PATCH 1/6] Add code coverage --- .travis.yml | 7 ++++++- scripts/all-tests.sh | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 97b4d1fa4..7f2984e5a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,11 +28,16 @@ branches: addons: apt: packages: + - libssl-dev - libopenblas-dev - gfortran +before_cache: | + if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then + cargo install cargo-tarpaulin -f + fi before_script: - rustup component add rustfmt script: - | cargo fmt --all -- --check && - ./scripts/all-tests.sh "$FEATURES" "$IS_NIGHTLY" + ./scripts/all-tests.sh "$FEATURES" "$IS_NIGHTLY" \ No newline at end of file diff --git a/scripts/all-tests.sh b/scripts/all-tests.sh index 5ad7306ab..5c8742ee7 100755 --- a/scripts/all-tests.sh +++ b/scripts/all-tests.sh @@ -15,3 +15,4 @@ cargo test --manifest-path=serialization-tests/Cargo.toml --verbose cargo test --manifest-path=blas-tests/Cargo.toml --verbose CARGO_TARGET_DIR=target/ cargo test --manifest-path=numeric-tests/Cargo.toml --verbose ([ "$IS_NIGHTLY" != 1 ] || cargo bench --no-run --verbose --features "$FEATURES") +([ "$TRAVIS_RUST_VERSION" == stable ] || cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID ) \ No newline at end of file From 4d05b2eda984f8148125e6ba3310cc368d2404dd Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Tue, 11 Jun 2019 21:10:22 -0400 Subject: [PATCH 2/6] bashful --- scripts/all-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/all-tests.sh b/scripts/all-tests.sh index 5c8742ee7..0beedef0f 100755 --- a/scripts/all-tests.sh +++ b/scripts/all-tests.sh @@ -15,4 +15,4 @@ cargo test --manifest-path=serialization-tests/Cargo.toml --verbose cargo test --manifest-path=blas-tests/Cargo.toml --verbose CARGO_TARGET_DIR=target/ cargo test --manifest-path=numeric-tests/Cargo.toml --verbose ([ "$IS_NIGHTLY" != 1 ] || cargo bench --no-run --verbose --features "$FEATURES") -([ "$TRAVIS_RUST_VERSION" == stable ] || cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID ) \ No newline at end of file +([ "$TRAVIS_RUST_VERSION" != stable ] || cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID ) \ No newline at end of file From 318d9d6ba95e397ed6ae07e31e1f55e37701850c Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Tue, 11 Jun 2019 22:00:04 -0400 Subject: [PATCH 3/6] move cargo install into before_script --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7f2984e5a..18d0263c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,12 +31,9 @@ addons: - libssl-dev - libopenblas-dev - gfortran -before_cache: | - if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then - cargo install cargo-tarpaulin -f - fi before_script: - rustup component add rustfmt + - cargo install cargo-tarpaulin script: - | cargo fmt --all -- --check && From 4f459303cc85c768a09002455b33ca623100b5de Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Wed, 12 Jun 2019 10:37:17 -0400 Subject: [PATCH 4/6] only install tarpaulin if rustc >= 1.32 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 18d0263c4..bbe7e0d21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ addons: - gfortran before_script: - rustup component add rustfmt - - cargo install cargo-tarpaulin + - '[ $(rustc --version) -lt "rustc 1.32" ] || cargo install cargo-tarpaulin' script: - | cargo fmt --all -- --check && From 302323062bc4bb580325e78a66979c8a852624c8 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Wed, 12 Jun 2019 11:06:34 -0400 Subject: [PATCH 5/6] ok bash --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bbe7e0d21..afb0e367e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ addons: - gfortran before_script: - rustup component add rustfmt - - '[ $(rustc --version) -lt "rustc 1.32" ] || cargo install cargo-tarpaulin' + - '[ "$TRAVIS_RUST_VERSION" != stable ] || cargo install cargo-tarpaulin' script: - | cargo fmt --all -- --check && From 8e800e90cd289f578a3d93f41704da44afa26427 Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Fri, 21 Jun 2019 17:17:37 +0900 Subject: [PATCH 6/6] Copy cargo-tarpaulin setting from ndarray-stats --- .travis.yml | 12 ++++++++++-- scripts/all-tests.sh | 1 - 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index afb0e367e..ba2799749 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,10 +31,18 @@ addons: - libssl-dev - libopenblas-dev - gfortran +before_cache: | + if [[ "$TRAVIS_RUST_VERSION" == nightly ]]; then + RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin -f + fi before_script: - rustup component add rustfmt - - '[ "$TRAVIS_RUST_VERSION" != stable ] || cargo install cargo-tarpaulin' script: - | cargo fmt --all -- --check && - ./scripts/all-tests.sh "$FEATURES" "$IS_NIGHTLY" \ No newline at end of file + ./scripts/all-tests.sh "$FEATURES" "$IS_NIGHTLY" +after_success: | + if [[ "$TRAVIS_RUST_VERSION" == nightly ]]; then + cargo tarpaulin --run-types Tests Doctests --out Xml + bash <(curl -s https://codecov.io/bash) + fi diff --git a/scripts/all-tests.sh b/scripts/all-tests.sh index 0beedef0f..5ad7306ab 100755 --- a/scripts/all-tests.sh +++ b/scripts/all-tests.sh @@ -15,4 +15,3 @@ cargo test --manifest-path=serialization-tests/Cargo.toml --verbose cargo test --manifest-path=blas-tests/Cargo.toml --verbose CARGO_TARGET_DIR=target/ cargo test --manifest-path=numeric-tests/Cargo.toml --verbose ([ "$IS_NIGHTLY" != 1 ] || cargo bench --no-run --verbose --features "$FEATURES") -([ "$TRAVIS_RUST_VERSION" != stable ] || cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID ) \ No newline at end of file