diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2022-10-20 01:27:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-20 01:27:14 -0400 |
commit | 530f6bf3b322343a107297e3b2fff9a9d4004b95 (patch) | |
tree | a2b13093922753b267010dbbf0c194f96ce09443 /.cirrus.yml | |
parent | 99e4fa95d3c4186dbf1da9eea25cec1bf43ba7d2 (diff) |
ci: add basic Cirrus CI testing for FreeBSD + M1 (#827)
* ci: add basic Cirrus CI testing for FreeBSD + M1
* add env vars
* remove curl installation from macos script
* add caching
Diffstat (limited to '.cirrus.yml')
-rw-r--r-- | .cirrus.yml | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 00000000..fde8dee3 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,58 @@ +# Configuration for CirrusCI. This is primarily used for +# FreeBSD and macOS M1 testing and building. + +env: + CARGO_INCREMENTAL: 0 + CARGO_PROFILE_DEV_DEBUG: 0 + CARGO_HUSKY_DONT_INSTALL_HOOKS: true + +task: + name: FreeBSD 13 Test + freebsd_instance: + image_family: freebsd-13-1 + setup_script: + - pkg install -y curl + - curl https://sh.rustup.rs -sSf --output rustup.sh + - sh rustup.sh --default-toolchain stable -y + - . $HOME/.cargo/env + - rustc --version + registry_cache: + folder: $CARGO_HOME/registry + fingerprint_script: cat Cargo.lock + target_cache: + folder: target + fingerprint_script: + - . $HOME/.cargo/env && rustc --version + - cat Cargo.lock + test_script: + - . $HOME/.cargo/env + - cargo fmt --all -- --check + - cargo test --no-run --locked + - cargo test --no-fail-fast -- --nocapture --quiet + - cargo clippy --all-targets --workspace -- -D warnings + before_cache_script: rm -rf $CARGO_HOME/registry/index + +task: + name: macOS M1 Test + macos_instance: + image: ghcr.io/cirruslabs/macos-monterey-base:latest + setup_script: + - curl https://sh.rustup.rs -sSf --output rustup.sh + - sh rustup.sh --default-toolchain stable -y + - source $HOME/.cargo/env + - rustc --version + registry_cache: + folder: $CARGO_HOME/registry + fingerprint_script: cat Cargo.lock + target_cache: + folder: target + fingerprint_script: + - source $HOME/.cargo/env && rustc --version + - cat Cargo.lock + test_script: + - source $HOME/.cargo/env + - cargo fmt --all -- --check + - cargo test --no-run --locked + - cargo test --no-fail-fast -- --nocapture --quiet + - cargo clippy --all-targets --workspace -- -D warnings + before_cache_script: rm -rf $CARGO_HOME/registry/index |