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
This commit is contained in:
parent
99e4fa95d3
commit
530f6bf3b3
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue