88 strategy :
99 matrix :
1010 include :
11- - os : ubuntu-latest
12- features : vulkan
13- - os : windows-latest
14- features : vulkan,d3d12
11+ - os : ubuntu-latest
12+ features : vulkan
13+ - os : windows-latest
14+ features : vulkan,d3d12
15+ - os : macos-latest
16+ features : vulkan,metal
1517 runs-on : ${{ matrix.os }}
1618 steps :
1719 - uses : actions/checkout@v4
@@ -23,10 +25,12 @@ jobs:
2325 strategy :
2426 matrix :
2527 include :
26- - os : ubuntu-latest
27- features : vulkan,visualizer
28- - os : windows-latest
29- features : vulkan,visualizer,d3d12,public-winapi
28+ - os : ubuntu-latest
29+ features : vulkan,visualizer
30+ - os : windows-latest
31+ features : vulkan,visualizer,d3d12,public-winapi
32+ - os : macos-latest
33+ features : vulkan,visualizer,metal
3034 runs-on : ${{ matrix.os }}
3135 steps :
3236 - uses : actions/checkout@v4
@@ -48,10 +52,12 @@ jobs:
4852 strategy :
4953 matrix :
5054 include :
51- - os : ubuntu-latest
52- features : vulkan,visualizer
53- - os : windows-latest
54- features : vulkan,visualizer,d3d12,public-winapi
55+ - os : ubuntu-latest
56+ features : vulkan,visualizer
57+ - os : windows-latest
58+ features : vulkan,visualizer,d3d12,public-winapi
59+ - os : macos-latest
60+ features : vulkan,visualizer,metal
5561 runs-on : ${{ matrix.os }}
5662 steps :
5763 - uses : actions/checkout@v4
@@ -62,13 +68,27 @@ jobs:
6268 uses : dtolnay/rust-toolchain@nightly
6369 - name : Generate lockfile with minimal dependency versions
6470 run : cargo +nightly generate-lockfile -Zminimal-versions
71+ - name : Bump `libc 0.1` version to `0.2` via `malloc_buf 0.0.6`
72+ if : ${{ runner.os == 'macOS' }}
73+ run : |
74+ # The 7-year-unmaintained malloc_buf (depended on via metal-rs->objc)
75+ # only allows using libc 0.2 since the 0.0.6 release, which is necessary
76+ # since the libc 0.1 range no longer compiles. Fortunately objc which
77+ # is also unmaintained for 4 years depends on malloc_buf >=0.0,<0.1.0,
78+ # allowing the 0.0.6 release to be used (but not the 1.0.0 release).
79+ cargo update -p malloc_buf --precise 0.0.6
80+ # Force 0.1.2, as older versions use the broken `gcc` crate
81+ cargo update -p objc_exception --precise 0.1.2
6582 - name : Cargo clippy with minimal-versions
6683 run : cargo +stable clippy --workspace --all-targets --features ${{ matrix.features }} --no-default-features -- -D warnings
6784
6885 doc :
6986 name : Build documentation
70- # Windows supports the entire feature surface
71- runs-on : windows-latest
87+ strategy :
88+ matrix :
89+ # Rely on Windows and Mac to also compile the Vulkan portion (via --all-features)
90+ os : [windows-latest, macos-latest]
91+ runs-on : ${{ matrix.os }}
7292 env :
7393 RUSTDOCFLAGS : -Dwarnings
7494 steps :
0 commit comments