diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..1fc3602d2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: rust +sudo: false + +cache: cargo + +rust: + - nightly + +env: + - CHECK='cd collector && ./check-benchmarks.sh' + - CHECK='cargo build --verbose && cargo test --verbose' + +script: + - sh -x -c "$CHECK" diff --git a/Cargo.toml b/Cargo.toml index 5f4adb487..ecab94778 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,6 @@ [workspace] -members = [ - "collector", - "site", -] +members = ["site"] # do not add "collector", otherwise the exclude won't work. +exclude = ["collector/benchmarks"] [profile.release] debug = true diff --git a/collector/.travis.yml b/collector/.travis.yml deleted file mode 100644 index b32817253..000000000 --- a/collector/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: rust -rust: - - nightly - -script: - - ./check-benchmarks.sh diff --git a/collector/benchmarks/tuple-stress/makefile b/collector/benchmarks/tuple-stress/makefile index 9c635337b..649b67e60 100644 --- a/collector/benchmarks/tuple-stress/makefile +++ b/collector/benchmarks/tuple-stress/makefile @@ -2,3 +2,5 @@ all: $(CARGO) rustc $(CARGO_OPTS) -- $(CARGO_RUSTC_OPTS) +patches: + @echo '' \ No newline at end of file diff --git a/collector/check-benchmarks.sh b/collector/check-benchmarks.sh index 32a763e7b..7ac542c35 100755 --- a/collector/check-benchmarks.sh +++ b/collector/check-benchmarks.sh @@ -1,22 +1,30 @@ #!/bin/bash -# print what we're doing -set -x # fail if variables are unset set -u # exit if anything fails set -e -for dir in benchmarks/*; do - pwd; +cd benchmarks; +for dir in *; do if [[ -d "$dir" ]]; then - cd "$dir"; - patches=`make patches`; - for patch in "" $patches; do + cd "$dir" + patches=(`make patches`); + for patch in "${patches[@]:-}"; do + test_name="$dir${patch/@/_}" + echo "travis_fold:start:$test_name" + echo "travis_time:start:$test_name" + echo "Checking $dir$patch..." + start_time=$(date -u '+%s%N') CARGO=cargo \ RUSTC=rustc \ make "all$patch"; + end_time=$(date -u '+%s%N') + duration=$(($end_time-$start_time)) + echo + echo "travis_fold:end:$test_name" + echo "travis_time:end:$test_name:start=$start_time,finish=$end_time,duration=$duration" done; - cd ../..; + cd ..; fi done diff --git a/site/.travis.yml b/site/.travis.yml deleted file mode 100644 index 13b15d972..000000000 --- a/site/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -sudo: false -language: rust -cache: cargo -rust: - - nightly -script: - - cargo build --verbose - - cargo test --verbose diff --git a/site/tests/lib.rs b/site/tests/lib.rs index 6d097cf2e..4baa77520 100644 --- a/site/tests/lib.rs +++ b/site/tests/lib.rs @@ -1,3 +1,6 @@ +// This test is currently out-of-date. Disabled. See issue #165. +#![cfg(any())] + #[macro_use] extern crate lazy_static; #[macro_use]