Skip to content

Commit

Permalink
travis.sh: Add benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 committed Dec 31, 2015
1 parent 32f986a commit 9ad74a2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ set -e
info() { echo "Info: $1"; }

info "Build in release mode."
cargo build --release
cargo build --verbose --release

info "Test in release mode."
cargo test --release
cargo test --verbose --release

if [ "$TRAVIS_RUST_VERSION" = nightly ]; then
info "Benchmark."
cargo bench --verbose
fi

info "Download kcov."
wget -q https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
Expand All @@ -21,9 +26,10 @@ mkdir kcov-master/build
)

info "Test in debug mode with coverage."
cargo test --no-run
cargo test --verbose --no-run
find target/debug -maxdepth 1 -type f -perm /u+x -printf '%P\n' |
while IFS= read -r test; do
info "Run $test"
./kcov-master/build/src/kcov --verify --include-path=src/ \
target/kcov-"$test" ./target/debug/"$test"
done; unset test
Expand Down

0 comments on commit 9ad74a2

Please sign in to comment.