|
82 | 82 | $Platforms += 'macos' |
83 | 83 |
|
84 | 84 | $Platforms | ForEach-Object { |
85 | | - $Runner = switch ($_) { 'windows' { 'windows-2022' } 'macos' { 'macos-14' } 'linux' { 'ubuntu-22.04' } } |
| 85 | + $Runner = switch ($_) { 'windows' { 'windows-2022' } 'macos' { 'macos-15' } 'linux' { 'ubuntu-22.04' } } |
86 | 86 | foreach ($Arch in $Archs) { |
87 | 87 | $Jobs += @{ |
88 | 88 | arch = $Arch |
@@ -324,10 +324,25 @@ jobs: |
324 | 324 | rustup target add aarch64-pc-windows-msvc |
325 | 325 | shell: pwsh |
326 | 326 |
|
| 327 | + # The macos-15 runner image ships `cargo`, `rustc`, etc. in ~/.cargo/bin as |
| 328 | + # symlinks to Homebrew's `rustup-init`, which is a shell-script wrapper that |
| 329 | + # only dispatches on the `rustup`/`rustup-init` names (not on `cargo`/`rustc`/ |
| 330 | + # `clippy`). Invoking `cargo` therefore runs `rustup-init` and fails with |
| 331 | + # "unexpected argument 'build'". The official rustup installer lays down proper |
| 332 | + # multi-call hard-link shims, so we run it to repair ~/.cargo/bin. |
| 333 | + - name: Repair Rust shims (macOS) |
| 334 | + if: ${{ matrix.os == 'macos' }} |
| 335 | + run: | |
| 336 | + set -eux |
| 337 | + rm -rf "$HOME/.cargo/bin" |
| 338 | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \ |
| 339 | + | bash -s -- -y --default-toolchain none --no-modify-path --profile minimal |
| 340 | + echo "$HOME/.cargo/bin" >> $GITHUB_PATH |
| 341 | + shell: bash |
| 342 | + |
327 | 343 | - name: Configure macOS (intel) runner |
328 | 344 | if: ${{ matrix.os == 'macos' && matrix.arch == 'x64' }} |
329 | 345 | run: | |
330 | | - sudo rm -rf /Library/Developer/CommandLineTools |
331 | 346 | rustup target add x86_64-apple-darwin |
332 | 347 |
|
333 | 348 | - name: Build |
|
0 commit comments