1 file changed
+51
.github/workflows/ci.yml
new
+51
@@ -0,0 +1,51 @@
1
+name: CI
2
+
3
+# Runs on every push.
4
+# Covers fmt (aarch64 only — platform-agnostic), clippy, and tests
5
+# on both supported macOS targets.
6
+
7
+on: push
8
+
9
+env:
10
+ CARGO_TERM_COLOR: always
11
+
12
+jobs:
13
+ ci:
14
+ name: ${{ matrix.name }}
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ include:
20
+ - name: macOS aarch64 — fmt / clippy / test
21
+ os: macos-26
22
+ target: aarch64-apple-darwin
23
+
24
+ - name: macOS x86_64 — clippy / test
25
+ os: macos-26-intel
26
+ target: x86_64-apple-darwin
27
+
28
+ steps:
29
+ - name: Checkout
30
+ uses: actions/checkout@v4
31
+
32
+ - name: Install Rust toolchain
33
+ uses: dtolnay/rust-toolchain@stable
34
+ with:
35
+ components: rustfmt, clippy
36
+
37
+ - name: Setup Rust cache
38
+ uses: Swatinem/rust-cache@v2
39
+ with:
40
+ key: ci-${{ matrix.target }}
41
+
42
+ # fmt output is identical on every platform — only run it once.
43
+ - name: Check formatting
44
+ if: matrix.target == 'aarch64-apple-darwin'
45
+ run: cargo fmt -- --check
46
+
47
+ - name: Clippy
48
+ run: cargo clippy --tests -- -D warnings
49
+
50
+ - name: Test
51
+ run: cargo test --locked