Travis/Trust: revise tests (reduce); cleaner script

This commit is contained in:
Diggory Hardy 2018-02-27 14:41:15 +00:00
parent 360dcd72ce
commit 7485bd48ca
2 changed files with 26 additions and 49 deletions

View File

@ -1,90 +1,66 @@
language: rust
sudo: false
# We aim to test all the following in any combination:
# - standard tests, benches, documentation, all available features
# - pinned stable, latest stable, beta and nightly Rust releases
# - Linux, OS X, Android, iOS, bare metal (i.e. no_std)
# - x86_64, ARMv7, a Big-Endian arch (MIPS)
matrix:
include:
- rust: 1.22.0
install:
script:
- cargo test
- cargo build --no-default-features # we cannot exclude doc tests
- rust: stable
- cargo test --all --tests --no-default-features
- cargo test --all --features serde-1,log
- rust: stable
os: osx
install:
script:
- cargo test --all --tests --no-default-features
- cargo test --all --features serde-1,log
- rust: beta
install:
script:
- cargo test --all --tests --no-default-features
- rust: nightly
- rust: nightly
install:
before_script:
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
script:
- cargo doc --no-deps --all-features
- cargo test --benches
- cargo test --features nightly
- cargo test --tests --no-default-features --features=alloc
- cargo test --all --features serde-1,log,nightly
- cargo test --benches
- cargo doc --no-deps --all-features
after_success:
- travis-cargo --only nightly doc-upload
# Trust cross-built/emulated targets. We must repeat all non-default values.
- rust: nightly
sudo: required
dist: trusty
services: docker
install:
- sh utils/ci/install.sh
- source ~/.cargo/env || true
script:
- bash utils/ci/script.sh
env: TARGET=i686-unknown-linux-gnu NIGHTLY=1
- rust: stable
sudo: required
dist: trusty
services: docker
install:
- sh utils/ci/install.sh
- source ~/.cargo/env || true
script:
- bash utils/ci/script.sh
env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1
- rust: stable
sudo: required
dist: trusty
services: docker
install:
- sh utils/ci/install.sh
- source ~/.cargo/env || true
script:
- bash utils/ci/script.sh
env: TARGET=mips64-unknown-linux-gnuabi64
env: TARGET=mips-unknown-linux-gnuabi
- rust: stable
sudo: required
dist: trusty
services: docker
install:
- sh utils/ci/install.sh
- source ~/.cargo/env || true
script:
- bash utils/ci/script.sh
env: TARGET=armv7-linux-androideabi DISABLE_TESTS=1
- rust: stable
os: osx
sudo: required
dist: trusty
services: docker
install:
- sh utils/ci/install.sh
- source ~/.cargo/env || true
script:
- bash utils/ci/script.sh
env: TARGET=armv7-apple-ios DISABLE_TESTS=1
- rust: stable
sudo: required
dist: trusty
services: docker
install:
- sh utils/ci/install.sh
- source ~/.cargo/env || true
script:
- bash utils/ci/script.sh
# Bare metal target; no std
env: TARGET=thumbv6m-none-eabi DISABLE_TESTS=1 DISABLE_STD=1
@ -92,11 +68,12 @@ before_install:
- set -e
- rustup self update
# Used by all Trust targets; others must override:
install:
- sh utils/ci/install.sh
- source ~/.cargo/env || true
script:
- cargo test
- cargo test --tests --no-default-features
- cargo test --features serde-1,log
- cargo test --tests --no-default-features --features=serde-1
- bash utils/ci/script.sh
after_script: set +e

View File

@ -5,7 +5,7 @@ set -ex
main() {
if [ ! -z $DISABLE_TESTS ]; then
if [ ! -z $DISABLE_STD ]; then
cross build --all --no-default-features --target $TARGET
cross build --all --no-default-features --target $TARGET --release
else
cross build --all --features log,serde-1 --target $TARGET
fi