diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..8e51d238 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,38 @@ +branches: + only: + # This is where pull requests from "bors r+" are built. + - staging + # This is where pull requests from "bors try" are built. + - trying + # Enable building pull requests. + - master + +language: rust +sudo: false +env: + global: + - RUST_BACKTRACE=1 + - RUSTFLAGS="-D warnings" +cache: cargo + +rust: + +matrix: + include: + # This build uses stable and checks rustfmt and clippy. + # We don't check them on nightly since their lints and formatting may differ. + - rust: stable + install: + - rustup component add rustfmt-preview + - rustup component add clippy-preview + before_script: + - cargo fmt --all -- --check + - cargo clippy --all -- -D clippy + # Since many users will use nightlies, also test that. + - rust: nightly + + +script: + - cargo test --all -- --nocapture + # Validate benches still work. + - cargo bench --all -- --test diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..9f9bfcb3 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,32 @@ +branches: + only: + # This is where pull requests from "bors r+" are built. + - staging + # This is where pull requests from "bors try" are built. + - trying + # Enable building pull requests. + - master + +environment: + matrix: + - TARGET: x86_64-pc-windows-gnu + RUST_VERSION: stable + - TARGET: x86_64-pc-windows-gnu + RUST_VERSION: nightly + +install: + - curl -sSf -o rustup-init.exe https://win.rustup.rs/ + - rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION% + - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin + - rustc -Vv + - cargo -V + +# Building is done in the test phase, so we disable Appveyor's build phase. +build: false + +cache: + - C:\Users\appveyor\.cargo\registry + - target + +test_script: + - cargo test