Improve ci times
This commit is contained in:
parent
1b005eb92d
commit
3a56dffb9d
@ -12,7 +12,12 @@ rust:
|
||||
- nightly
|
||||
|
||||
script:
|
||||
- ./prepare.sh && ./test.sh
|
||||
- ./prepare.sh
|
||||
- ./test.sh --release
|
||||
|
||||
env:
|
||||
- RUST_BACKTRACE=1
|
||||
global:
|
||||
# Enable backtraces for easier debugging.
|
||||
- RUST_BACKTRACE=1
|
||||
# Reduce amount of benchmark runs as they are slow.
|
||||
- COMPILE_RUNS=2 RUN_RUNS=2
|
||||
|
11
test.sh
11
test.sh
@ -58,10 +58,13 @@ echo "[TEST] rust-lang/regex example shootout-regex-dna"
|
||||
cat examples/regexdna-input.txt | ../cargo.sh run --example shootout-regex-dna > res.txt
|
||||
diff -u res.txt examples/regexdna-output.txt
|
||||
|
||||
echo "[TEST] rust-lang/regex standalone tests"
|
||||
echo "[TEST] rust-lang/regex tests"
|
||||
../cargo.sh test --tests -- --exclude-should-panic --test-threads 1 -Zunstable-options
|
||||
popd
|
||||
|
||||
echo
|
||||
echo "[BENCH COMPILE] mod_bench"
|
||||
|
||||
COMPILE_MOD_BENCH_INLINE="$RUSTC example/mod_bench.rs --crate-type bin -Zmir-opt-level=3 -O --crate-name mod_bench_inline"
|
||||
COMPILE_MOD_BENCH_LLVM_0="rustc example/mod_bench.rs --crate-type bin -Copt-level=0 -o target/out/mod_bench_llvm_0 -Cpanic=abort"
|
||||
COMPILE_MOD_BENCH_LLVM_1="rustc example/mod_bench.rs --crate-type bin -Copt-level=1 -o target/out/mod_bench_llvm_1 -Cpanic=abort"
|
||||
@ -69,10 +72,10 @@ COMPILE_MOD_BENCH_LLVM_2="rustc example/mod_bench.rs --crate-type bin -Copt-leve
|
||||
COMPILE_MOD_BENCH_LLVM_3="rustc example/mod_bench.rs --crate-type bin -Copt-level=3 -o target/out/mod_bench_llvm_3 -Cpanic=abort"
|
||||
|
||||
# Use 100 runs, because a single compilations doesn't take more than ~150ms, so it isn't very slow
|
||||
hyperfine --runs 100 "$COMPILE_MOD_BENCH_INLINE" "$COMPILE_MOD_BENCH_LLVM_0" "$COMPILE_MOD_BENCH_LLVM_1" "$COMPILE_MOD_BENCH_LLVM_2" "$COMPILE_MOD_BENCH_LLVM_3"
|
||||
hyperfine --runs ${COMPILE_RUNS:-100} "$COMPILE_MOD_BENCH_INLINE" "$COMPILE_MOD_BENCH_LLVM_0" "$COMPILE_MOD_BENCH_LLVM_1" "$COMPILE_MOD_BENCH_LLVM_2" "$COMPILE_MOD_BENCH_LLVM_3"
|
||||
|
||||
echo
|
||||
echo "[Bench] mod_bench"
|
||||
hyperfine ./target/out/mod_bench{,_inline} ./target/out/mod_bench_llvm_*
|
||||
echo "[BENCH RUN] mod_bench"
|
||||
hyperfine --runs ${RUN_RUNS:-10} ./target/out/mod_bench{,_inline} ./target/out/mod_bench_llvm_*
|
||||
|
||||
cat target/out/log.txt | sort | uniq -c
|
||||
|
Loading…
x
Reference in New Issue
Block a user