-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.44 KB
/
Copy pathbuild-macos.yml
File metadata and controls
51 lines (43 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: build-macos
# macOS best-effort build-only check.
# The Rust port platform matrix is Linux x86_64 + aarch64 first-class;
# macOS gets a non-blocking build check so contributors on Apple Silicon
# detect compile breaks early. The parity gate is NOT run on macOS;
# Windows is non-goal.
on:
pull_request:
branches: ["**"]
push:
branches: [main]
jobs:
build-macos:
name: cargo build (macos, non-blocking)
runs-on: macos-14
timeout-minutes: 15
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Skip when no Cargo workspace present
id: detect
run: |
if [ ! -f Cargo.toml ]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
echo "No Cargo.toml; build-macos has nothing to do."
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
- name: Install Rust toolchain
if: steps.detect.outputs.skip == 'false'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.85.0"
components: rustfmt, clippy
- name: cargo build
if: steps.detect.outputs.skip == 'false'
run: cargo build --workspace --all-features
- name: cargo fmt --check
if: steps.detect.outputs.skip == 'false'
run: cargo fmt --all -- --check
- name: cargo clippy
if: steps.detect.outputs.skip == 'false'
run: cargo clippy --workspace --all-features -- -D warnings