2014-07-31 02:04:48 +10:00
|
|
|
language: rust
|
2014-08-03 17:25:30 +10:00
|
|
|
|
2017-10-09 00:51:55 +11:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
# Linux 32bit
|
|
|
|
- env: TARGET=i686-unknown-linux-gnu
|
|
|
|
os: linux
|
|
|
|
rust: nightly
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
# Cross compiler and cross compiled C libraries
|
|
|
|
packages: &i686_packages
|
|
|
|
- gcc-multilib
|
|
|
|
- env: TARGET=i686-unknown-linux-gnu
|
|
|
|
os: linux
|
|
|
|
rust: stable
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages: *i686_packages
|
|
|
|
|
|
|
|
# Linux 64bit
|
|
|
|
- env: TARGET=x86_64-unknown-linux-gnu
|
|
|
|
os: linux
|
|
|
|
rust: nightly
|
|
|
|
- env: TARGET=x86_64-unknown-linux-gnu
|
|
|
|
os: linux
|
|
|
|
rust: stable
|
|
|
|
|
|
|
|
# macOS
|
|
|
|
- env: TARGET=x86_64-apple-darwin
|
|
|
|
os: osx
|
|
|
|
rust: nightly
|
|
|
|
- env: TARGET=x86_64-apple-darwin
|
|
|
|
os: osx
|
|
|
|
rust: stable
|
|
|
|
|
2019-08-01 17:30:05 +10:00
|
|
|
# iOS x86_64
|
2017-10-09 00:51:55 +11:00
|
|
|
- env: TARGET=x86_64-apple-ios
|
|
|
|
os: osx
|
|
|
|
rust: nightly
|
|
|
|
- env: TARGET=x86_64-apple-ios
|
|
|
|
os: osx
|
|
|
|
rust: stable
|
|
|
|
|
2019-08-01 17:30:05 +10:00
|
|
|
# iOS armv7
|
|
|
|
- env: TARGET=armv7-apple-ios
|
|
|
|
os: osx
|
|
|
|
rust: nightly
|
|
|
|
- env: TARGET=armv7-apple-ios
|
|
|
|
os: osx
|
|
|
|
rust: stable
|
|
|
|
|
|
|
|
# iOS arm64
|
|
|
|
- env: TARGET=aarch64-apple-ios
|
|
|
|
os: osx
|
|
|
|
rust: nightly
|
|
|
|
- env: TARGET=aarch64-apple-ios
|
|
|
|
os: osx
|
|
|
|
rust: stable
|
|
|
|
|
2019-10-13 14:44:30 +11:00
|
|
|
# wasm stdweb
|
|
|
|
- env: TARGET=wasm32-unknown-unknown WEB=web FEATURES=stdweb
|
|
|
|
os: linux
|
|
|
|
rust: stable
|
|
|
|
- env: TARGET=wasm32-unknown-unknown WEB=web FEATURES=stdweb
|
|
|
|
os: linux
|
|
|
|
rust: nightly
|
|
|
|
# wasm web-sys
|
|
|
|
- env: TARGET=wasm32-unknown-unknown FEATURES=web-sys
|
|
|
|
os: linux
|
|
|
|
rust: stable
|
|
|
|
- env: TARGET=wasm32-unknown-unknown FEATURES=web-sys
|
|
|
|
os: linux
|
|
|
|
rust: nightly
|
|
|
|
|
2016-12-14 00:37:13 +11:00
|
|
|
install:
|
2017-09-05 16:26:05 +10:00
|
|
|
- rustup self update
|
2017-10-09 00:51:55 +11:00
|
|
|
- rustup target add $TARGET; true
|
2019-07-28 19:09:31 +10:00
|
|
|
- rustup toolchain install stable
|
|
|
|
- rustup component add rustfmt --toolchain stable
|
2016-12-14 00:37:13 +11:00
|
|
|
|
2014-10-05 04:17:02 +11:00
|
|
|
script:
|
2019-07-28 19:09:31 +10:00
|
|
|
- cargo +stable fmt --all -- --check
|
2019-10-13 14:44:30 +11:00
|
|
|
# Install cargo-web to build stdweb
|
|
|
|
- if [[ $WEB = "web" ]]; then cargo install -f cargo-web; fi
|
|
|
|
# Build without serde then with serde
|
|
|
|
- if [[ -z "$FEATURES" ]]; then
|
|
|
|
cargo $WEB build --target $TARGET --verbose;
|
|
|
|
else
|
|
|
|
cargo $WEB build --target $TARGET --features $FEATURES --verbose;
|
|
|
|
fi
|
|
|
|
- cargo $WEB build --target $TARGET --features serde,$FEATURES --verbose
|
2019-08-01 17:30:05 +10:00
|
|
|
# Running iOS apps on macOS requires the Simulator so we skip that for now
|
2019-10-13 14:44:30 +11:00
|
|
|
# The web targets also don't support running tests
|
|
|
|
- if [[ $TARGET != *-apple-ios && $TARGET != wasm32-* ]]; then cargo test --target $TARGET --verbose; fi
|
|
|
|
- if [[ $TARGET != *-apple-ios && $TARGET != wasm32-* ]]; then cargo test --target $TARGET --features serde --verbose; fi
|
2014-12-17 20:33:49 +11:00
|
|
|
|
2016-12-14 00:28:30 +11:00
|
|
|
after_success:
|
2015-02-16 00:05:08 +11:00
|
|
|
- |
|
2015-02-16 00:58:47 +11:00
|
|
|
[ $TRAVIS_BRANCH = master ] &&
|
|
|
|
[ $TRAVIS_PULL_REQUEST = false ] &&
|
|
|
|
cargo publish --token ${CRATESIO_TOKEN}
|