kcov run moved to a separate job
@@ -107,14 +107,25 @@ jobs:
- touch target/std/primitive.usize.html
- cargo deadlinks --dir target/doc
- # Clippy linting.
- - name: clippy
- rust: nightly-2018-10-23
+ # Run kcov.
+ - name: kcov
install:
- - cargo clippy --version | rustup component add clippy-preview --toolchain=nightly-2018-10-23
- - cargo clippy --version
+ - wget https://github.com/SimonKagstrom/kcov/archive/v36.tar.gz
+ - tar xzf v36.tar.gz
+ - cd kcov-36
+ - mkdir build
+ - cd build
+ - cmake ..
+ - make
+ - make install DESTDIR=../../kcov-build
+ - cd ../..
+ - rm -rf kcov-36
script:
- - cargo clippy --all -- -D warnings
+ - cargo test --no-run
+ - cd $TRAVIS_BUILD_DIR
+ - for file in `find target/debug/ -maxdepth 1 -type f | egrep "*-([a-zA-Z0-9]{16}$)"`; 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"
# Tests.
- name: test
@@ -157,21 +168,15 @@ jobs:
# - cd $TRAVIS_BUILD_DIR/examples/cryptocurrency/examples && ./test.sh
# - cd $TRAVIS_BUILD_DIR/examples/cryptocurrency/examples && ./test.ps1
# - cd $TRAVIS_BUILD_DIR/testkit/server/src && npm run test:unix
- after_success: |
- cd $TRAVIS_BUILD_DIR
- wget https://github.com/SimonKagstrom/kcov/archive/v36.tar.gz &&
- tar xzf v36.tar.gz &&
- cd kcov-36 &&
- mkdir build &&
- cd build &&
- cmake .. &&
- make &&
- make install DESTDIR=../../kcov-build &&
- cd ../.. &&
- rm -rf kcov-36 &&
- for file in `find target/debug/ -maxdepth 1 -type f | egrep "*-([a-zA-Z0-9]{16}$)"`; 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"
+
+ # Clippy linting.
+ - name: clippy
+ rust: nightly-2018-10-23
+ install:
+ - cargo clippy --version | rustup component add clippy-preview --toolchain=nightly-2018-10-23
+ - cargo clippy --version
+ script:
+ - cargo clippy --all -- -D warnings
# Benchmarks (compilation only).
- name: benchmarks
@@ -191,3 +196,5 @@ notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/9599da7e3a500810190d
+
+
