22
33# This is the main CI script for testing the regex crate and its sub-crates.
44
5- set -e
5+ set -ex
6+
7+ if [ " $TRAVIS_RUST_VERSION " = " nightly" ]; then
8+ # We set this once so that all invocations share this setting. This should
9+ # help with build times by avoiding excessive re-compiles.
10+ export RUSTFLAGS=" -C target-feature=+ssse3"
11+ fi
612
713# Builds the regex crate and runs tests.
814cargo build --verbose
@@ -17,11 +23,11 @@ if [ "$TRAVIS_RUST_VERSION" = "1.12.0" ]; then
1723 exit
1824fi
1925
26+ # Run tests. If we have nightly, then enable our nightly features.
2027if [ " $TRAVIS_RUST_VERSION " = " nightly" ]; then
21- cargo build --verbose --manifest-path regex-debug/Cargo.toml
22- RUSTFLAGS=" -C target-feature=+ssse3" cargo test --verbose --features ' simd-accel pattern' --jobs 4
28+ cargo test --verbose --features ' simd-accel pattern'
2329else
24- cargo test --verbose --jobs 4
30+ cargo test --verbose
2531fi
2632
2733# Run a test that confirms the shootout benchmarks are correct.
@@ -37,9 +43,10 @@ cargo build --verbose --manifest-path regex-capi/Cargo.toml
3743(cd regex-capi/examples && ./compile && LD_LIBRARY_PATH=../../target/debug ./iter)
3844
3945# Make sure benchmarks compile. Don't run them though because they take a
40- # very long time.
46+ # very long time. Also, check that we can build the regex-debug tool.
4147if [ " $TRAVIS_RUST_VERSION " = " nightly" ]; then
48+ cargo build --verbose --manifest-path regex-debug/Cargo.toml
4249 for x in rust rust-bytes pcre1 onig; do
43- (cd bench && ./run $x --no-run)
50+ (cd bench && ./run $x --no-run --verbose )
4451 done
4552fi
0 commit comments