language: rust
rust:
- stable
# remove once https://github.com/rustwasm/wasm-pack/issues/611 is resolved
install:
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install v10.5
- npm install -g chromedriver
- which chromedriver
os:
# - windows # firefox problem
- osx
- linux
# https://levans.fr/rust_travis_cache.html
cache:
directories:
- $HOME/.cargo
before_cache:
- rm -rf $HOME/.cargo/registry
addons:
firefox: latest
chrome: stable
env:
global:
- RUST_BACKTRACE=1
matrix:
allow_failures:
- rust: nightly
script:
- cargo install --force cargo-make # remove --force in the future (https://github.com/rust-lang/cargo/pull/6798)
- cargo make verify_only # includes `test_h firefox`
- cargo make test_h chrome
# TODO: make it faster ; useful links:
# https://www.reddit.com/r/rust/comments/9zpyww/idea_a_local_cache_of_compiled_dependencies_in/
# https://doc.rust-lang.org/cargo/reference/environment-variables.html - CARGO_TARGET_DIR
# https://github.com/holmgr/cargo-sweep
# https://github.com/matthiaskrgr/cargo-cache
# https://github.com/mozilla/sccache
# https://github.com/alexcrichton/cargo-vendor