2
2
3
3
# This is the main CI script for testing the regex crate and its sub-crates.
4
4
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
6
12
7
13
# Builds the regex crate and runs tests.
8
14
cargo build --verbose
@@ -17,11 +23,11 @@ if [ "$TRAVIS_RUST_VERSION" = "1.12.0" ]; then
17
23
exit
18
24
fi
19
25
26
+ # Run tests. If we have nightly, then enable our nightly features.
20
27
if [ " $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'
23
29
else
24
- cargo test --verbose --jobs 4
30
+ cargo test --verbose
25
31
fi
26
32
27
33
# Run a test that confirms the shootout benchmarks are correct.
@@ -37,9 +43,10 @@ cargo build --verbose --manifest-path regex-capi/Cargo.toml
37
43
(cd regex-capi/examples && ./compile && LD_LIBRARY_PATH=../../target/debug ./iter)
38
44
39
45
# 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.
41
47
if [ " $TRAVIS_RUST_VERSION " = " nightly" ]; then
48
+ cargo build --verbose --manifest-path regex-debug/Cargo.toml
42
49
for x in rust rust-bytes pcre1 onig; do
43
- (cd bench && ./run $x --no-run)
50
+ (cd bench && ./run $x --no-run --verbose )
44
51
done
45
52
fi
0 commit comments