]> git.proxmox.com Git - rustc.git/blob - src/vendor/regex/ci/script.sh
New upstream version 1.25.0+dfsg1
[rustc.git] / src / vendor / regex / ci / script.sh
1 #!/bin/sh
2
3 # This is the main CI script for testing the regex crate and its sub-crates.
4
5 set -e
6
7 # Builds the regex crate and runs tests.
8 cargo build --verbose
9 cargo doc --verbose
10
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.
14 #
15 # This isn't ideal. It's a compromise.
16 if [ "$TRAVIS_RUST_VERSION" = "1.12.0" ]; then
17 exit
18 fi
19
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
23 else
24 cargo test --verbose --jobs 4
25 fi
26
27 # Run a test that confirms the shootout benchmarks are correct.
28 ci/run-shootout-test
29
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
33
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)
38
39 # Make sure benchmarks compile. Don't run them though because they take a
40 # very long time.
41 if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
42 for x in rust rust-bytes pcre1 onig; do
43 (cd bench && ./run $x --no-run)
44 done
45 fi