Add Windows to Travis build matrix
-os: osx
+os:
+ - osx
+ - windows
language: rust
rust:
- nightly-2019-05-22
before_install:
-- curl -L https://github.com/mozilla/grcov/releases/download/v0.4.3/grcov-osx-x86_64.tar.bz2 | tar jxf -
+- if [ "$TRAVIS_OS_NAME" = "osx" ]; then curl -L https://github.com/mozilla/grcov/releases/download/v0.4.3/grcov-osx-x86_64.tar.bz2 | tar jxf -; fi
before_script:
# install formatter
@@ -14,7 +16,7 @@ before_script:
# install audit
- cargo install --force cargo-audit || true
# install z3
-- cp binaries/libz3.dylib /usr/local/lib
+- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cp binaries/libz3.dylib /usr/local/lib; fi
script:
# Exit immediately if a command exits with a non-zero status.
@@ -30,10 +32,10 @@ script:
# Run unit and integration tests
- RUST_BACKTRACE=1 cargo test
# Run code coverage tests
-- export CARGO_INCREMENTAL=0
-- export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"
-- cargo build
-- cargo test
-- zip -0 ccov.zip `find . \( -name "mirai*.gc*" \) -print`
-- ./grcov ccov.zip --ignore-not-existing --llvm --ignore-dir "/*" -t lcov > lcov.info
-- bash <(curl -s https://codecov.io/bash) -f lcov.info
+- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export CARGO_INCREMENTAL=0; fi
+- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"; fi
+- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cargo build; fi
+- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cargo test; fi
+- if [ "$TRAVIS_OS_NAME" = "osx" ]; then zip -0 ccov.zip `find . \( -name "mirai*.gc*" \) -print`; fi
+- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./grcov ccov.zip --ignore-not-existing --llvm --ignore-dir "/*" -t lcov > lcov.info; fi
+- if [ "$TRAVIS_OS_NAME" = "osx" ]; then bash <(curl -s https://codecov.io/bash) -f lcov.info; fi
