stages:
- stage1
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
before_script:
- rustc --version && cargo --version
- du -sh target/ cargo/ || true
after_script:
- du -sh target/ cargo/ || true
cache:
key: $CI_JOB_NAME-$CI_COMMIT_BRANCH-gen1
paths:
- target/
- cargo/
rust-latest:
stage: stage1
image: rust:latest
script:
- cargo fmt --version || rustup component add rustfmt
- cargo clippy --version || rustup component add clippy
- ./check.sh
- cargo run --example opinion || true
- DEV_LOG_FORMAT=plain cargo run --example opinion || true
- DEV_LOG_FORMAT=full cargo run --example opinion || true
- DEV_LOG_FORMAT=compact cargo run --example opinion || true
rust-beta:
stage: stage1
image: instrumentisto/rust:beta
script:
- ./check.sh
- cargo run --example opinion || true
- DEV_LOG_FORMAT=plain cargo run --example opinion || true
- DEV_LOG_FORMAT=full cargo run --example opinion || true
- DEV_LOG_FORMAT=compact cargo run --example opinion || true
rust-nightly:
stage: stage1
image: rustlang/rust:nightly
variables:
CFG_RELEASE_CHANNEL: nightly
CFG_RELEASE: nightly
script:
- cargo fmt --version || rustup component add rustfmt || cargo +nightly install --git https://github.com/rust-lang/rustfmt.git --branch master --force --features "rustfmt cargo-fmt" rustfmt-nightly
- cargo clippy --version || rustup component add clippy || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
- ./check.sh
- cargo run --example opinion || true
- DEV_LOG_FORMAT=plain cargo run --example opinion || true
- DEV_LOG_FORMAT=full cargo run --example opinion || true
- DEV_LOG_FORMAT=compact cargo run --example opinion || true
allow_failure: true