2022-10-20 05:27:14 +00:00
|
|
|
# Configuration for CirrusCI. This is primarily used for
|
2022-10-20 07:19:29 +00:00
|
|
|
# FreeBSD and macOS M1 tests and builds.
|
2022-10-20 05:27:14 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
CARGO_PROFILE_DEV_DEBUG: 0
|
|
|
|
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
|
|
|
|
|
|
|
|
task:
|
2022-10-20 07:19:29 +00:00
|
|
|
name: "FreeBSD 13 Test"
|
|
|
|
only_if: $CIRRUS_BRANCH == "master" || $CIRRUS_PR != ""
|
2022-10-20 05:27:14 +00:00
|
|
|
freebsd_instance:
|
|
|
|
image_family: freebsd-13-1
|
|
|
|
setup_script:
|
2022-10-20 10:24:04 +00:00
|
|
|
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
|
2022-10-20 05:27:14 +00:00
|
|
|
- sh rustup.sh --default-toolchain stable -y
|
|
|
|
- . $HOME/.cargo/env
|
|
|
|
- rustc --version
|
|
|
|
registry_cache:
|
2022-10-20 07:19:29 +00:00
|
|
|
folder: $HOME/.cargo/registry
|
|
|
|
reupload_on_changes: true
|
|
|
|
fingerprint_script: md5 Cargo.lock
|
2022-10-20 05:27:14 +00:00
|
|
|
target_cache:
|
|
|
|
folder: target
|
2022-10-20 07:19:29 +00:00
|
|
|
reupload_on_changes: true
|
2022-10-20 05:27:14 +00:00
|
|
|
fingerprint_script:
|
|
|
|
- . $HOME/.cargo/env && rustc --version
|
2022-10-20 07:19:29 +00:00
|
|
|
- md5 Cargo.lock
|
2022-10-20 10:41:20 +00:00
|
|
|
test_all_feature_script:
|
2022-10-20 05:27:14 +00:00
|
|
|
- . $HOME/.cargo/env
|
|
|
|
- cargo fmt --all -- --check
|
2022-10-20 10:41:20 +00:00
|
|
|
- cargo test --no-run --locked --all-features
|
|
|
|
- cargo test --no-fail-fast --all-features -- --nocapture --quiet
|
|
|
|
- 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
|
2022-10-20 07:19:29 +00:00
|
|
|
before_cache_script:
|
|
|
|
- rm -rf $HOME/.cargo/registry/index
|
|
|
|
- rm -f ./target/.rustc_info.json
|
|
|
|
- find ./target/debug -maxdepth 1 -type f -delete # Delete stray files
|
2022-10-20 05:27:14 +00:00
|
|
|
|
|
|
|
task:
|
2022-10-20 07:19:29 +00:00
|
|
|
name: "macOS M1 Test"
|
|
|
|
only_if: $CIRRUS_BRANCH == "master" || $CIRRUS_PR != ""
|
2022-10-20 05:27:14 +00:00
|
|
|
macos_instance:
|
|
|
|
image: ghcr.io/cirruslabs/macos-monterey-base:latest
|
|
|
|
setup_script:
|
2022-10-20 10:24:04 +00:00
|
|
|
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
|
2022-10-20 05:27:14 +00:00
|
|
|
- sh rustup.sh --default-toolchain stable -y
|
|
|
|
- source $HOME/.cargo/env
|
|
|
|
- rustc --version
|
|
|
|
registry_cache:
|
2022-10-20 07:19:29 +00:00
|
|
|
folder: $HOME/.cargo/registry
|
|
|
|
reupload_on_changes: true
|
|
|
|
fingerprint_script: md5 Cargo.lock
|
2022-10-20 05:27:14 +00:00
|
|
|
target_cache:
|
|
|
|
folder: target
|
2022-10-20 07:19:29 +00:00
|
|
|
reupload_on_changes: true
|
2022-10-20 05:27:14 +00:00
|
|
|
fingerprint_script:
|
|
|
|
- source $HOME/.cargo/env && rustc --version
|
2022-10-20 07:19:29 +00:00
|
|
|
- md5 Cargo.lock
|
2022-10-20 10:41:20 +00:00
|
|
|
test_all_feature_script:
|
|
|
|
- . $HOME/.cargo/env
|
|
|
|
- cargo fmt --all -- --check
|
|
|
|
- cargo test --no-run --locked --all-features
|
|
|
|
- cargo test --no-fail-fast --all-features -- --nocapture --quiet
|
|
|
|
- cargo clippy --all-targets --workspace --all-features -- -D warnings
|
|
|
|
test_no_feature_script:
|
2022-10-20 07:19:29 +00:00
|
|
|
- . $HOME/.cargo/env
|
2022-10-20 05:27:14 +00:00
|
|
|
- cargo fmt --all -- --check
|
2022-10-20 10:41:20 +00:00
|
|
|
- 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
|
2022-10-20 07:19:29 +00:00
|
|
|
before_cache_script:
|
|
|
|
- rm -rf $HOME/.cargo/registry/index
|
|
|
|
- rm -f ./target/.rustc_info.json
|
|
|
|
- find ./target/debug -maxdepth 1 -type f -delete # Delete stray files
|