x86_64-gnulinux:
image: amd64/rust:1
variables:
TARGET: x86_64
script:
- rustup install beta-$TARGET stable-$TARGET nightly-$TARGET 1.31.1-$TARGET
- rustup component add --toolchain beta-$TARGET rustfmt clippy
- cargo +beta-$TARGET clippy --all-targets --features fail-on-warnings
- cargo +beta-$TARGET test --features fail-on-warnings
- cargo +beta-$TARGET test --release --features fail-on-warnings
- cargo +beta-$TARGET fmt -- --check
- cargo +stable-$TARGET test --features fail-on-warnings
- cargo +stable-$TARGET test --release --features fail-on-warnings
- cargo +nightly-$TARGET test --features fail-on-warnings
- cargo +nightly-$TARGET test --release --features fail-on-warnings
- cargo +1.31.1-$TARGET test --features fail-on-warnings
- cargo +1.31.1-$TARGET test --release --features fail-on-warnings
i686-gnulinux:
image: i386/rust:1
variables:
TARGET: i686
script:
- rustup install beta-$TARGET stable-$TARGET nightly-$TARGET 1.31.1-$TARGET
- rustup component add --toolchain beta-$TARGET rustfmt clippy
- cargo +beta-$TARGET clippy --all-targets --features fail-on-warnings
- cargo +beta-$TARGET test --features fail-on-warnings
- cargo +beta-$TARGET test --release --features fail-on-warnings
- cargo +beta-$TARGET fmt -- --check
- cargo +stable-$TARGET test --features fail-on-warnings
- cargo +stable-$TARGET test --release --features fail-on-warnings
- cargo +nightly-$TARGET test --features fail-on-warnings
- cargo +nightly-$TARGET test --release --features fail-on-warnings
- cargo +1.31.1-$TARGET test --features fail-on-warnings
- cargo +1.31.1-$TARGET test --release --features fail-on-warnings
x86_64-gnulinux-tarpaulin:
image: amd64/rust:1
variables:
REQ_COVERAGE: "98.0"
cache:
key: $CI_JOB_NAME
paths:
- cargo/
script:
- if [ -d cargo/registry/cache ]; then rm -rf $CARGO_HOME/registry/cache; mkdir -p $CARGO_HOME/registry; cp -R cargo/registry/cache $CARGO_HOME/registry/; echo Copied registry/cache; fi
- if [ -d $CARGO_HOME/registry/cache ]; then (cd $CARGO_HOME/registry; find cache -name \*.crate) fi
- cargo install --version 0.12.3 --locked cargo-tarpaulin
- stdbuf -oL cargo tarpaulin -v --ignore-tests | tee tarpaulin.log
- echo "Check that coverage not less than $REQ_COVERAGE%"
- tail -1 tarpaulin.log | awk '{ if ($1 < '$REQ_COVERAGE') { exit 1 } }'
- if [ -d $CARGO_HOME/registry/cache ]; then (cd $CARGO_HOME/registry; find cache -name \*.crate) fi
- rm -rf cargo
- mkdir -p cargo/registry
- if [ -d $CARGO_HOME/registry/cache ]; then cp -R $CARGO_HOME/registry/cache cargo/registry/; echo Updated registry/cache; fi