summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2022-10-20 01:27:14 -0400
committerGitHub <noreply@github.com>2022-10-20 01:27:14 -0400
commit530f6bf3b322343a107297e3b2fff9a9d4004b95 (patch)
treea2b13093922753b267010dbbf0c194f96ce09443
parent99e4fa95d3c4186dbf1da9eea25cec1bf43ba7d2 (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
-rw-r--r--.cirrus.yml58
-rw-r--r--.github/workflows/ci.yml7
2 files changed, 59 insertions, 6 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
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 44cc2824..eb24e061 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -48,12 +48,7 @@ jobs:
target: "x86_64-pc-windows-msvc",
cross: false,
}
- features: [
- "--all-features",
- # "--features battery",
- # "--features gpu",
- "--no-default-features",
- ]
+ features: ["--all-features", "--no-default-features"]
steps:
- name: Check if this action should be skipped
id: skip_check