Update CI to run benches as tests

parent c7cc0ef8
image: "rust:latest"
stages:
- build
- test
- bench
- build
- test
before_script:
- rustup toolchain add $toolchain
- rustup toolchain add $toolchain
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
cache:
paths:
- target/
key: rusttype-global-cache
- target/
- cargo/
build:stable:
stage: build
variables:
toolchain: stable
script:
- cargo +stable build --verbose
- cargo +stable build -v
test:stable:
stage: test
variables:
toolchain: stable
dependencies:
- build:stable
- build:stable
script:
- cargo +stable test --verbose
- cargo +stable test -v
build:stable:gpu_cache:
stage: build
variables:
toolchain: stable
script:
- cargo +stable build --verbose --features 'gpu_cache'
- cargo +stable build -v --features 'gpu_cache'
test:stable:gpu_cache:
stage: test
variables:
toolchain: stable
dependencies:
- build:stable:gpu_cache
- build:stable:gpu_cache
script:
- cargo +stable test --verbose --features 'gpu_cache'
- cargo +stable test -v --features 'gpu_cache'
build:nightly:
stage: build
variables:
toolchain: nightly
script:
- cargo +nightly build --verbose
- cargo +nightly build -v
test:nightly:
stage: test
variables:
toolchain: nightly
dependencies:
- build:nightly
- build:nightly
script:
- cargo +nightly test --verbose
- cargo +nightly test -v
bench:nightly:
stage: bench
test:benches:
stage: test
variables:
toolchain: nightly
dependencies:
- build:nightly
- test:nightly
- build:nightly
script:
- cargo +nightly bench --no-run --all-features
- cargo +nightly test --bench cache --all-features
- cargo +nightly test --bench draw --all-features
build:nightly:gpu_cache:
stage: build
variables:
toolchain: nightly
script:
- cargo +nightly build --verbose --features 'gpu_cache'
- cargo +nightly build -v --features 'gpu_cache'
test:nightly:gpu_cache:
stage: test
variables:
toolchain: nightly
dependencies:
- build:nightly:gpu_cache
- build:nightly:gpu_cache
script:
- cargo +nightly test --verbose --all-features
- cargo +nightly test -v --all-features
build:redox:
stage: build
variables:
toolchain: nightly
script:
- rustup target add x86_64-unknown-redox --toolchain nightly
- cargo +nightly build --target=x86_64-unknown-redox --verbose
- rustup target add x86_64-unknown-redox --toolchain nightly
- cargo +nightly build --target=x86_64-unknown-redox -v
......@@ -10,14 +10,14 @@ matrix:
fast_finish: true
script: |
#!/bin/bash
cargo build --verbose
cargo test --verbose
cargo build --verbose --features 'gpu_cache'
cargo build -v
cargo test -v
cargo build -v --features 'gpu_cache'
if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then
# test nightly-only bench code
cargo test --all-features
# compile ./benches
cargo bench --no-run --all-features
cargo test --bench cache --all-features
cargo test --bench draw --all-features
else
cargo test --features 'gpu_cache'
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment