2019-06-18 13:06:16 +00:00
|
|
|
dist: xenial
|
|
|
|
|
2018-01-22 15:05:13 +00:00
|
|
|
language:
|
|
|
|
- rust
|
|
|
|
- cpp
|
2019-06-18 13:06:16 +00:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
include:
|
|
|
|
- rust: nightly
|
|
|
|
- rust: stable
|
|
|
|
- rust: stable
|
|
|
|
env: TARGET=armv7-unknown-linux-gnueabihf
|
2018-02-05 14:36:53 +00:00
|
|
|
|
2018-01-26 13:47:30 +00:00
|
|
|
install:
|
2018-05-24 13:31:15 +00:00
|
|
|
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then rustup target add wasm32-unknown-unknown; fi
|
2019-06-18 13:06:16 +00:00
|
|
|
- if [ -n "$TARGET" ]; then rustup target add "$TARGET" && sudo apt-get install --yes qemu-user-static; fi
|
|
|
|
- if [ "$TARGET" == "armv7-unknown-linux-gnueabihf" ]; then sudo apt-get install --yes crossbuild-essential-armhf && export QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf; fi
|
2019-01-02 22:50:38 +00:00
|
|
|
- rustup component add rustfmt
|
2019-06-18 13:06:16 +00:00
|
|
|
- sudo apt-get install --yes cmake
|
|
|
|
|
2018-01-22 15:05:13 +00:00
|
|
|
script:
|
2019-01-02 22:50:38 +00:00
|
|
|
- cargo fmt --all -- --check
|
2018-06-12 11:00:57 +00:00
|
|
|
# Make sure nightly targets are not broken.
|
2018-05-24 13:31:15 +00:00
|
|
|
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cargo check --tests --manifest-path=fuzz/Cargo.toml; fi
|
|
|
|
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cargo check --benches --manifest-path=benches/Cargo.toml; fi
|
2018-10-29 10:16:55 +00:00
|
|
|
# Make sure `no_std` version checks.
|
|
|
|
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cargo +nightly check --no-default-features --features core; fi
|
2019-07-08 11:53:04 +00:00
|
|
|
# Check that `vec_memory` feature works.
|
|
|
|
- cargo check --features vec_memory
|
2019-06-18 13:06:16 +00:00
|
|
|
- travis_wait 60 ./test.sh
|
2018-01-31 19:13:50 +00:00
|
|
|
- ./doc.sh
|
2019-06-18 13:06:16 +00:00
|
|
|
|
2018-01-22 15:55:47 +00:00
|
|
|
after_success: |
|
2018-01-26 13:47:30 +00:00
|
|
|
# Build documentation and deploy it to github pages.
|
2018-01-22 15:55:47 +00:00
|
|
|
[ $TRAVIS_BRANCH = master ] &&
|
|
|
|
[ $TRAVIS_PULL_REQUEST = false ] &&
|
|
|
|
echo "<meta http-equiv=refresh content=0;url=`echo $TRAVIS_REPO_SLUG | cut -d '/' -f 2`/index.html>" > target/doc/index.html &&
|
|
|
|
sudo pip install ghp-import &&
|
|
|
|
ghp-import -n target/doc &&
|
2018-01-22 17:13:38 +00:00
|
|
|
git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
|
2019-06-18 13:06:16 +00:00
|
|
|
|
2018-01-22 17:13:38 +00:00
|
|
|
cache: cargo
|
|
|
|
before_cache:
|
|
|
|
# Travis can't cache files that are not readable by "others"
|
|
|
|
- chmod -R a+r $HOME/.cargo
|