Skip to content

Commit e647157

Browse files
committed
Add macOS to CI and x86_64 to release workflow
Split CI into lint (Linux-only) and test (Linux + macOS) jobs. Add macOS x86_64 (macos-13) build target to release workflow.
1 parent a5f0aa8 commit e647157

2 files changed

Lines changed: 27 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
ci:
13+
lint:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
@@ -28,14 +28,35 @@ jobs:
2828
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2929
restore-keys: ${{ runner.os }}-cargo-
3030

31-
- name: Build
32-
run: cargo build
33-
3431
- name: Format
3532
run: cargo fmt -- --check
3633

3734
- name: Clippy
3835
run: cargo clippy -- -D warnings
3936

37+
test:
38+
strategy:
39+
matrix:
40+
include:
41+
- runner: ubuntu-latest
42+
- runner: macos-latest
43+
runs-on: ${{ matrix.runner }}
44+
steps:
45+
- uses: actions/checkout@v4
46+
47+
- uses: dtolnay/rust-toolchain@stable
48+
49+
- uses: actions/cache@v4
50+
with:
51+
path: |
52+
~/.cargo/registry
53+
~/.cargo/git
54+
target
55+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
56+
restore-keys: ${{ runner.os }}-cargo-
57+
58+
- name: Build
59+
run: cargo build
60+
4061
- name: Test
4162
run: cargo test

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
runner: ubuntu-latest
1818
- target: aarch64-apple-darwin
1919
runner: macos-latest
20+
- target: x86_64-apple-darwin
21+
runner: macos-13
2022
runs-on: ${{ matrix.runner }}
2123
steps:
2224
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)