3 # This is the main CI script for testing the regex crate and its sub-crates.
7 # Builds the regex crate and runs tests.
11 # If we're testing on an older version of Rust, then only check that we
12 # can build the crate. This is because the dev dependencies might be updated
13 # more frequently, and therefore might require a newer version of Rust.
15 # This isn't ideal. It's a compromise.
16 if [ "$TRAVIS_RUST_VERSION" = "1.12.0" ]; then
20 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
24 cargo
test --verbose --jobs 4
27 # Run a test that confirms the shootout benchmarks are correct.
30 # Run tests on regex-syntax crate.
31 cargo
test --verbose --manifest-path regex-syntax
/Cargo.toml
32 cargo doc
--verbose --manifest-path regex-syntax
/Cargo.toml
34 # Run tests on regex-capi crate.
35 cargo build
--verbose --manifest-path regex-capi
/Cargo.toml
36 (cd regex-capi
/ctest
&& .
/compile
&& LD_LIBRARY_PATH
=..
/..
/target
/debug .
/test)
37 (cd regex-capi
/examples
&& .
/compile
&& LD_LIBRARY_PATH
=..
/..
/target
/debug .
/iter
)
39 # Make sure benchmarks compile. Don't run them though because they take a
41 if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
42 for x
in rust rust-bytes pcre1 onig
; do
43 (cd bench
&& .
/run
$x --no-run)