stages:
- test
- comprehensive
default:
before_script:
- rustc --version ||true
- cargo --version ||true
- export STDERRTEST_CARGO_OPTIONS=--locked
image: "rust:bookworm"
cargo-check-deps:
stage: test
script:
- cargo check --locked --verbose --all-features
cargo-check:
stage: test
script:
- cargo check --locked --workspace --verbose --all-features
cargo-check-minfeatures:
stage: test
script:
- cargo check --locked --verbose --no-default-features --features=minimal-1
cargo-fmt:
stage: test
script:
- rustup component add rustfmt
- maint/rustfmt --verbose --check
maint-check-bizarre:
stage: test
script:
- maint/update-bizarre --check
maint-check-test-deps:
stage: test
script:
- apt-get -y update
- apt-get -y install libtoml-perl git
- maint/check-test-deps
maint-check-todos:
stage: comprehensive
script:
- maint/check-blocking-todos
check-doc-tocs:
stage: test
allow_failure: true
script:
- maint/update-tocs --check
check-keywords-documented:
stage: test
allow_failure: true
script:
- maint/check-keywords-documented >&2
cargo-test:
stage: test
image: rustlang/rust@sha256:ee4511e23bbd1d06ed24bed884e9df6ac4dc858d2e188b49c199bf56a7ece3f3
script:
- ./maint/via-cargo-install-in-ci cargo-expand --locked --version=1.0.67 --features=prettyplease
- cargo test --locked --workspace --verbose --all-features -- --skip directly::check_examples
cache:
when: 'always'
paths:
- cache/*
check-doc-examples:
stage: comprehensive
image: rustlang/rust@sha256:ee4511e23bbd1d06ed24bed884e9df6ac4dc858d2e188b49c199bf56a7ece3f3
allow_failure: true
script:
- cargo test --locked -p derive-adhoc-tests --verbose --all-features -- --nocapture directly::check_examples
every-commit:
stage: comprehensive
image: rustlang/rust@sha256:ee4511e23bbd1d06ed24bed884e9df6ac4dc858d2e188b49c199bf56a7ece3f3
script:
- ./maint/via-cargo-install-in-ci cargo-expand --locked --version=1.0.67 --features=prettyplease
- maint/for-every-commit cargo test --locked --workspace --verbose --all-features -- --skip directly::check_examples
cache:
when: 'always'
paths:
- cache/*
cargo-test-minfeatures:
stage: comprehensive
image: rustlang/rust@sha256:ee4511e23bbd1d06ed24bed884e9df6ac4dc858d2e188b49c199bf56a7ece3f3
script:
- cargo test --locked -p derive-adhoc-tests --no-default-features --features=derive-adhoc-tests/recent -- --skip directly::check_examples
stable:
stage: comprehensive
script:
- cargo test --locked --workspace --verbose --features=derive-adhoc-tests/recent,derive-adhoc-tests/full
stable-minfeatures:
stage: comprehensive
script:
- cargo test --locked -p derive-adhoc-tests --no-default-features --features=derive-adhoc-tests/recent
stable-user-clippy:
stage: comprehensive
script:
- rustup component add clippy
- cargo clippy --locked -p pub-a -p pub-b --no-deps --all-features -- -Dwarnings
cargo-doc:
stage: comprehensive
script:
- cargo doc --locked --workspace --verbose --features=full
cargo-doc-all:
stage: comprehensive
allow_failure: true
script:
- apt-get update
- apt-get -y install jq
- cargo doc --locked --workspace --verbose --features=full --document-private-items --message-format=json >rustdoc.json
- jq --raw-output '. | select(.message.level) | .message.rendered' <rustdoc.json |tee rustdoc.errors
- test ! -s rustdoc.errors
check-doc-links:
stage: comprehensive
allow_failure: true
script:
- apt-get update
- apt-get -y install linklint
- maint/check-doc-links
minimal-versions:
stage: comprehensive
image: "rust:1.56.0"
script:
- mv Cargo.lock.minimal Cargo.lock
- cargo +1.56.0 test --locked --workspace --no-default-features --features=derive-adhoc-tests/full
minimal-versions-minfeatures:
stage: comprehensive
image: "rust:1.56.0"
script:
- mv Cargo.lock.minimal Cargo.lock
- cargo +1.56.0 test --locked -p derive-adhoc-tests --no-default-features