Skip to content

Commit 405de1d

Browse files
authored
fix(ci): install cmake and nasm for aws-lc-sys on Windows (#4032)
## Description aws-lc-sys requires cmake and NASM to build on Windows MSVC targets. This adds a choco install step to both Windows CI jobs and ensure the installed binaries are on PATH. ## Change checklist <!-- Remove any that are not relevant. --> - [x] Self-review.
1 parent 387c2e4 commit 405de1d

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,18 @@ jobs:
221221
with:
222222
release: false
223223

224+
- name: Install aws-lc-sys build dependencies
225+
shell: powershell
226+
run: |
227+
$chocoPath = "$Env:ProgramData\chocolatey\bin\choco.exe"
228+
if (!(Test-Path $chocoPath)) {
229+
$chocoPath = "$Env:SystemDrive\ProgramData\chocolatey\bin\choco.exe"
230+
}
231+
& $chocoPath install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
232+
& $chocoPath install nasm -y
233+
echo "C:\Program Files\CMake\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
234+
echo "C:\Program Files\NASM" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
235+
224236
- name: build tests
225237
run: |
226238
cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --target ${{ matrix.target }} --no-run
@@ -309,6 +321,18 @@ jobs:
309321
with:
310322
release: false
311323

324+
- name: Install aws-lc-sys build dependencies
325+
shell: powershell
326+
run: |
327+
$chocoPath = "$Env:ProgramData\chocolatey\bin\choco.exe"
328+
if (!(Test-Path $chocoPath)) {
329+
$chocoPath = "$Env:SystemDrive\ProgramData\chocolatey\bin\choco.exe"
330+
}
331+
& $chocoPath install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
332+
& $chocoPath install nasm -y
333+
echo "C:\Program Files\CMake\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
334+
echo "C:\Program Files\NASM" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
335+
312336
- name: cargo check
313337
run: |
314338
rm -Force Cargo.lock

0 commit comments

Comments
 (0)