Skip to content

Commit c7bc06f

Browse files
committed
Reorganize CI testing.
Writing all of the testing scripts inside the .travis.yml file was becoming painful, and parts of it were wrong by allowing for some commands to fail without failing the entire build. This also fixes the Github token (again).
1 parent 0788aad commit c7bc06f

File tree

10 files changed

+260
-156
lines changed

10 files changed

+260
-156
lines changed

Diff for: .travis.yml

+10-35
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,28 @@
1+
dist: trusty
2+
sudo: false
13
language: rust
24
rust:
35
- 1.12.0
46
- stable
57
- beta
68
- nightly
7-
sudo: false
8-
script:
9-
- cargo build --verbose
10-
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
11-
cargo build --verbose --manifest-path=regex-debug/Cargo.toml;
12-
RUSTFLAGS="-C target-feature=+ssse3" cargo test --verbose --features 'simd-accel pattern' --jobs 2;
13-
else
14-
travis_wait cargo test --verbose --jobs 2;
15-
fi
16-
- ./run-shootout-test
17-
- cargo doc --verbose
18-
- cargo test --verbose --manifest-path=regex-syntax/Cargo.toml
19-
- cargo doc --verbose --manifest-path=regex-syntax/Cargo.toml
20-
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
21-
(cd regex-capi && cargo build --verbose);
22-
(cd regex-capi/ctest && ./compile && LD_LIBRARY_PATH=../target/debug ./test);
23-
(cd regex-capi/examples && ./compile && LD_LIBRARY_PATH=../target/release ./iter);
24-
(cd bench && travis_wait ./run rust);
25-
(cd bench && travis_wait ./run rust-bytes --no-run);
26-
(cd bench && travis_wait ./run pcre1 --no-run);
27-
(cd bench && travis_wait ./run onig --no-run);
28-
travis_wait cargo test --verbose --manifest-path=regex_macros/Cargo.toml;
29-
fi
9+
script: ci/script.sh
3010
addons:
3111
apt:
3212
packages:
3313
- libcurl4-openssl-dev
3414
- libelf-dev
3515
- libdw-dev
3616
- binutils-dev
37-
after_success: |
38-
[ $TRAVIS_BRANCH = master ] &&
39-
[ $TRAVIS_PULL_REQUEST = false ] &&
40-
[ $TRAVIS_RUST_VERSION = nightly ] &&
41-
echo '<meta http-equiv=refresh content=0;url=regex/index.html>' > target/doc/index.html &&
42-
pip install ghp-import --user $USER &&
43-
$HOME/.local/bin/ghp-import -n target/doc &&
44-
git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages &&
45-
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
46-
tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build && cmake .. && make && make install DESTDIR=../tmp && cd ../.. &&
47-
PATH="./kcov-master/tmp/usr/local/bin:$PATH" ./run-kcov --coveralls-id $TRAVIS_JOB_ID
17+
- wget
18+
- clang-3.6
19+
- cmake
20+
- python
21+
- python-virtualenv
22+
after_success: ci/after_success.sh
4823
env:
4924
global:
50-
secure: "ii5NwZiArNTxFuVnjXDHrYutkp82116hqBbzsCv/v53O5gCn1GKbCRyusFYHjr+ytymEPKH171cAQ7doGt3QPyFs2jdzK6+xz4obwCBfAPwgbtuFu9P/lIasG1ja2i/2T61g12DSlzAVTCkLnHNTLad4FWsyDyqJLpY4I4JFvcE="
25+
secure: "GdGE0kFYiJGccVZligur7JlWRCy49eH6uWPl71mrnaaW8jLHmkva0jVb0LB9e5ol3YMaMCgrwM2pcj3Uk2C08YcGIoEKOLlDVho351KaD6XfclZ29CQTAPMz4Xut2IcB4YeuZlDrOnM26guTIOtn2NAjeQgOhpM/ErzVBgkB+wQ="
5126
notifications:
5227
email:
5328
on_success: never

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ utf8-ranges = "1"
3030
# For examples.
3131
lazy_static = "0.2.2"
3232
# For property based tests.
33-
quickcheck = "0.4.1"
33+
quickcheck = { version = "0.4.1", default-features = false }
3434
# For generating random test data.
3535
rand = "0.3.15"
3636

Diff for: appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ install:
1414
build: false
1515

1616
test_script:
17-
- cargo test --verbose
17+
- cargo test --verbose --jobs 4

Diff for: bench/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ build = "build.rs"
1414
docopt = "0.6"
1515
lazy_static = "0.1"
1616
libc = "0.2"
17-
onig = { version = "0.4", optional = true }
17+
onig = { version = "1.2", optional = true }
1818
libpcre-sys = { version = "0.2", optional = true }
1919
memmap = "0.2"
2020
regex = { version = "0.2.0", path = "..", features = ["simd-accel"] }

0 commit comments

Comments
 (0)