|
29 | 29 | - uses: actions/checkout@v4 |
30 | 30 | with: |
31 | 31 | persist-credentials: false |
32 | | - - uses: dtolnay/rust-toolchain@1.91.1 |
| 32 | + - uses: ./.github/setup-rust-windows |
33 | 33 | with: |
34 | | - targets: i686-pc-windows-msvc,x86_64-pc-windows-msvc,aarch64-pc-windows-msvc |
35 | | - - name: Install LLVM for bindgen |
36 | | - if: inputs.arch != 'arm64' |
37 | | - shell: cmd |
38 | | - run: | |
39 | | - choco install llvm --allow-downgrade --no-progress --version 21.1.0 |
40 | | - if not exist "C:\Program Files\LLVM\bin\libclang.dll" exit /b 1 |
41 | | - echo LIBCLANG_PATH=C:\Program Files\LLVM\bin>> "%GITHUB_ENV%" |
42 | | - echo LLVMInstallDir=C:\Program Files\LLVM>> "%GITHUB_ENV%" |
43 | | - # Chocolatey's LLVM package only ships x64 binaries, which an ARM64-native |
44 | | - # cargo process cannot load. Install the official ARM64 build directly. |
45 | | - - name: Install LLVM for bindgen (ARM64) |
46 | | - if: inputs.arch == 'arm64' |
47 | | - shell: pwsh |
48 | | - run: | |
49 | | - $installer = Join-Path $env:RUNNER_TEMP 'LLVM-21.1.0-woa64.exe' |
50 | | - Invoke-WebRequest 'https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.0/LLVM-21.1.0-woa64.exe' -OutFile $installer |
51 | | - Start-Process -Wait -FilePath $installer -ArgumentList '/S','/D=C:\Program Files\LLVM' |
52 | | - if (!(Test-Path 'C:\Program Files\LLVM\bin\libclang.dll')) { exit 1 } |
53 | | - echo "LIBCLANG_PATH=C:\Program Files\LLVM\bin" >> $env:GITHUB_ENV |
54 | | - echo "LLVMInstallDir=C:\Program Files\LLVM" >> $env:GITHUB_ENV |
| 34 | + arch: ${{ inputs.arch }} |
55 | 35 | - name: Register MSVC problem matcher |
56 | 36 | if: inputs.arch != 'Win32' |
57 | 37 | run: echo "::add-matcher::.github/problem-matchers/msvc.json" |
|
0 commit comments