Skip to content

Commit

Permalink
Merge pull request #166 from kennytm/fix-travis
Browse files Browse the repository at this point in the history
Reenable Travis CI.
  • Loading branch information
Mark-Simulacrum authored Nov 2, 2017
2 parents 6b34046 + 24dfad0 commit bbcfded
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 26 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 2 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 0 additions & 6 deletions collector/.travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions collector/benchmarks/tuple-stress/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

all:
$(CARGO) rustc $(CARGO_OPTS) -- $(CARGO_RUSTC_OPTS)
patches:
@echo ''
24 changes: 16 additions & 8 deletions collector/check-benchmarks.sh
Original file line number Diff line number Diff line change
@@ -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
8 changes: 0 additions & 8 deletions site/.travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions site/tests/lib.rs
Original file line number Diff line number Diff line change
@@ -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]
Expand Down

0 comments on commit bbcfded

Please sign in to comment.