ci: merge all-feature and no-feature tests on Cirrus (#847)
Since it is a more limited platform for the public free tier, particularly for macOS VMs, it seems better to combine the testing scripts rather than using a matrix.
This commit is contained in:
parent
fc90c549ef
commit
f9732bbb9e
40
.cirrus.yml
40
.cirrus.yml
|
@ -11,11 +11,6 @@ task:
|
||||||
only_if: $CIRRUS_BRANCH == "master" || $CIRRUS_PR != ""
|
only_if: $CIRRUS_BRANCH == "master" || $CIRRUS_PR != ""
|
||||||
freebsd_instance:
|
freebsd_instance:
|
||||||
image_family: freebsd-13-1
|
image_family: freebsd-13-1
|
||||||
matrix:
|
|
||||||
- env:
|
|
||||||
FEATURES: "--all-features"
|
|
||||||
- env:
|
|
||||||
FEATURES: "--no-default-features"
|
|
||||||
setup_script:
|
setup_script:
|
||||||
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
|
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
|
||||||
- sh rustup.sh --default-toolchain stable -y
|
- sh rustup.sh --default-toolchain stable -y
|
||||||
|
@ -31,13 +26,18 @@ task:
|
||||||
fingerprint_script:
|
fingerprint_script:
|
||||||
- . $HOME/.cargo/env && rustc --version
|
- . $HOME/.cargo/env && rustc --version
|
||||||
- md5 Cargo.lock
|
- md5 Cargo.lock
|
||||||
- echo $FEATURES
|
test_all_feature_script:
|
||||||
test_script:
|
|
||||||
- . $HOME/.cargo/env
|
- . $HOME/.cargo/env
|
||||||
- cargo fmt --all -- --check
|
- cargo fmt --all -- --check
|
||||||
- cargo test --no-run --locked $FEATURES
|
- cargo test --no-run --locked --all-features
|
||||||
- cargo test --no-fail-fast $FEATURES -- --nocapture --quiet
|
- cargo test --no-fail-fast --all-features -- --nocapture --quiet
|
||||||
- cargo clippy --all-targets --workspace $FEATURES -- -D warnings
|
- cargo clippy --all-targets --workspace --all-features -- -D warnings
|
||||||
|
test_no_feature_script:
|
||||||
|
- . $HOME/.cargo/env
|
||||||
|
- cargo fmt --all -- --check
|
||||||
|
- cargo test --no-run --locked --no-default-features
|
||||||
|
- cargo test --no-fail-fast --no-default-features -- --nocapture --quiet
|
||||||
|
- cargo clippy --all-targets --workspace --no-default-features -- -D warnings
|
||||||
before_cache_script:
|
before_cache_script:
|
||||||
- rm -rf $HOME/.cargo/registry/index
|
- rm -rf $HOME/.cargo/registry/index
|
||||||
- rm -f ./target/.rustc_info.json
|
- rm -f ./target/.rustc_info.json
|
||||||
|
@ -48,11 +48,6 @@ task:
|
||||||
only_if: $CIRRUS_BRANCH == "master" || $CIRRUS_PR != ""
|
only_if: $CIRRUS_BRANCH == "master" || $CIRRUS_PR != ""
|
||||||
macos_instance:
|
macos_instance:
|
||||||
image: ghcr.io/cirruslabs/macos-monterey-base:latest
|
image: ghcr.io/cirruslabs/macos-monterey-base:latest
|
||||||
matrix:
|
|
||||||
- env:
|
|
||||||
FEATURES: "--all-features"
|
|
||||||
- env:
|
|
||||||
FEATURES: "--no-default-features"
|
|
||||||
setup_script:
|
setup_script:
|
||||||
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
|
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
|
||||||
- sh rustup.sh --default-toolchain stable -y
|
- sh rustup.sh --default-toolchain stable -y
|
||||||
|
@ -68,13 +63,18 @@ task:
|
||||||
fingerprint_script:
|
fingerprint_script:
|
||||||
- source $HOME/.cargo/env && rustc --version
|
- source $HOME/.cargo/env && rustc --version
|
||||||
- md5 Cargo.lock
|
- md5 Cargo.lock
|
||||||
- echo $FEATURES
|
test_all_feature_script:
|
||||||
test_script:
|
|
||||||
- . $HOME/.cargo/env
|
- . $HOME/.cargo/env
|
||||||
- cargo fmt --all -- --check
|
- cargo fmt --all -- --check
|
||||||
- cargo test --no-run --locked $FEATURES
|
- cargo test --no-run --locked --all-features
|
||||||
- cargo test --no-fail-fast $FEATURES -- --nocapture --quiet
|
- cargo test --no-fail-fast --all-features -- --nocapture --quiet
|
||||||
- cargo clippy --all-targets --workspace $FEATURES -- -D warnings
|
- cargo clippy --all-targets --workspace --all-features -- -D warnings
|
||||||
|
test_no_feature_script:
|
||||||
|
- . $HOME/.cargo/env
|
||||||
|
- cargo fmt --all -- --check
|
||||||
|
- cargo test --no-run --locked --no-default-features
|
||||||
|
- cargo test --no-fail-fast --no-default-features -- --nocapture --quiet
|
||||||
|
- cargo clippy --all-targets --workspace --no-default-features -- -D warnings
|
||||||
before_cache_script:
|
before_cache_script:
|
||||||
- rm -rf $HOME/.cargo/registry/index
|
- rm -rf $HOME/.cargo/registry/index
|
||||||
- rm -f ./target/.rustc_info.json
|
- rm -f ./target/.rustc_info.json
|
||||||
|
|
Loading…
Reference in New Issue