]>
Commit | Line | Data |
---|---|---|
8bb4bdeb XL |
1 | #!/bin/sh |
2 | ||
3 | # This is the main CI script for testing the regex crate and its sub-crates. | |
4 | ||
0531ce1d | 5 | set -ex |
8bb4bdeb XL |
6 | |
7 | # Builds the regex crate and runs tests. | |
8 | cargo build --verbose | |
9 | cargo doc --verbose | |
2c00a5a8 | 10 | |
0531ce1d | 11 | # Run tests. If we have nightly, then enable our nightly features. |
8bb4bdeb | 12 | if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then |
0531ce1d | 13 | cargo test --verbose --features unstable |
8bb4bdeb | 14 | else |
0531ce1d | 15 | cargo test --verbose |
8bb4bdeb XL |
16 | fi |
17 | ||
18 | # Run a test that confirms the shootout benchmarks are correct. | |
19 | ci/run-shootout-test | |
20 | ||
21 | # Run tests on regex-syntax crate. | |
22 | cargo test --verbose --manifest-path regex-syntax/Cargo.toml | |
23 | cargo doc --verbose --manifest-path regex-syntax/Cargo.toml | |
24 | ||
25 | # Run tests on regex-capi crate. | |
26 | cargo build --verbose --manifest-path regex-capi/Cargo.toml | |
2c00a5a8 XL |
27 | (cd regex-capi/ctest && ./compile && LD_LIBRARY_PATH=../../target/debug ./test) |
28 | (cd regex-capi/examples && ./compile && LD_LIBRARY_PATH=../../target/debug ./iter) | |
8bb4bdeb XL |
29 | |
30 | # Make sure benchmarks compile. Don't run them though because they take a | |
0531ce1d | 31 | # very long time. Also, check that we can build the regex-debug tool. |
8bb4bdeb | 32 | if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then |
0531ce1d | 33 | cargo build --verbose --manifest-path regex-debug/Cargo.toml |
8bb4bdeb | 34 | for x in rust rust-bytes pcre1 onig; do |
0531ce1d | 35 | (cd bench && ./run $x --no-run --verbose) |
8bb4bdeb XL |
36 | done |
37 | fi |