2019-09-13 23:12:01 +00:00
|
|
|
language: rust
|
|
|
|
rust:
|
2019-11-07 19:55:24 +00:00
|
|
|
- stable
|
|
|
|
- beta
|
2019-09-13 23:12:01 +00:00
|
|
|
- nightly
|
2019-12-31 03:01:34 +00:00
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
- windows
|
2019-12-07 04:52:28 +00:00
|
|
|
jobs:
|
|
|
|
allow_failures:
|
|
|
|
- rust: nightly
|
2019-12-31 03:39:49 +00:00
|
|
|
- env: TARGET=x86_64-pc-windows-gnu # Seems to cause problems. TODO: Add test for it, but keep allow fail.
|
2020-01-03 05:20:47 +00:00
|
|
|
fast_finish: true
|
2019-12-31 02:25:20 +00:00
|
|
|
|
2019-12-31 03:01:34 +00:00
|
|
|
before_install:
|
|
|
|
- export RUST_BACKTRACE=1
|
2019-12-31 03:09:35 +00:00
|
|
|
- |
|
|
|
|
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
|
|
|
export TARGET=x86_64-unknown-linux-gnu;
|
2019-12-31 03:01:34 +00:00
|
|
|
elif [[ $TRAVIS_OS_NAME == "windows" ]]; then
|
2019-12-31 03:09:35 +00:00
|
|
|
export TARGET=x86_64-pc-windows-msvc;
|
2019-12-31 03:17:03 +00:00
|
|
|
elif [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
2019-12-31 03:09:35 +00:00
|
|
|
export TARGET=x86_64-apple-darwin;
|
2019-12-31 03:01:34 +00:00
|
|
|
fi
|
2019-12-31 02:25:20 +00:00
|
|
|
before_script: rustup target add $TARGET
|
2019-12-31 00:40:45 +00:00
|
|
|
script:
|
2020-01-03 05:20:47 +00:00
|
|
|
- cargo build --verbose --target $TARGET
|
2019-12-31 02:25:20 +00:00
|
|
|
- cargo test --verbose --target $TARGET
|
2019-10-10 20:36:29 +00:00
|
|
|
|
2019-12-31 01:56:10 +00:00
|
|
|
# Need to cache the whole `.cargo` directory to keep .crates.toml for cargo-update to work
|
2019-12-27 23:30:35 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- /home/travis/.cargo
|
2019-12-16 07:31:49 +00:00
|
|
|
|
2019-12-31 01:56:10 +00:00
|
|
|
# But don't cache the cargo registry.
|
2019-12-27 23:30:35 +00:00
|
|
|
before_cache:
|
2019-12-31 00:40:45 +00:00
|
|
|
- rm -rf /home/travis/.cargo/git
|
2019-12-27 23:30:35 +00:00
|
|
|
- rm -rf /home/travis/.cargo/registry
|
2019-12-16 07:31:49 +00:00
|
|
|
|
2019-10-10 20:36:29 +00:00
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
on_success: never
|