Skip to content

Commit

Permalink
Update travis
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang committed Dec 31, 2019
1 parent a7e64d6 commit 8e61f34
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 4,39 @@ rust:
- beta
- nightly
os:
- windows
- osx
- linux
env:
- RUST_BACKTRACE=1
matrix:
- osx
- windows
jobs:
allow_failures:
- rust: nightly
fast_finish: true
- env: TARGET=x86_64-pc-windows-gnu # Seems to cause problems. TODO: Add test for it, but keep allow fail.

before_install:
- export RUST_BACKTRACE=1
- |
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
export TARGET=x86_64-unknown-linux-gnu;
elif [[ $TRAVIS_OS_NAME == "windows" ]]; then
export TARGET=x86_64-pc-windows-msvc;
elif [[ $TRAVIS_OS_NAME == "osx" ]]; then
export TARGET=x86_64-apple-darwin;
fi
before_script: rustup target add $TARGET
script:
- cargo build --release --target $TARGET
- cargo test --verbose --target $TARGET

# Need to cache the whole `.cargo` directory to keep .crates.toml for cargo-update to work
cache:
directories:
- /home/travis/.cargo

# But don't cache the cargo registry.
before_cache:
- rm -rf /home/travis/.cargo/git
- rm -rf /home/travis/.cargo/registry

notifications:
email: false
email:
on_success: never

0 comments on commit 8e61f34

Please sign in to comment.