Skip to content

Commit e689cb0

Browse files
committed
Add CI test
1 parent 2de3718 commit e689cb0

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,41 @@ jobs:
314314
git add .
315315
git diff --cached --exit-code HEAD -- aws-lc-sys/builder/prebuilt-nasm/*.txt
316316
317+
build-clang-cl-discovery-test:
318+
if: github.repository_owner == 'aws'
319+
name: clang-cl discovery via vswhere
320+
runs-on: windows-11-arm
321+
steps:
322+
- uses: actions/checkout@v4
323+
with:
324+
submodules: 'recursive'
325+
- uses: dtolnay/rust-toolchain@stable
326+
- name: Build with clang-cl hidden from PATH
327+
shell: pwsh
328+
run: |
329+
# Find clang-cl and remove its directory from PATH so that
330+
# the build must discover it via vswhere instead.
331+
$clangCl = Get-Command clang-cl -ErrorAction SilentlyContinue
332+
if (-not $clangCl) {
333+
Write-Error "clang-cl is not present on this runner; cannot test vswhere discovery"
334+
exit 1
335+
}
336+
$clangDir = Split-Path $clangCl.Source
337+
Write-Output "Hiding clang-cl directory from PATH: $clangDir"
338+
$env:PATH = ($env:PATH -split ';' | Where-Object {
339+
$_ -ne $clangDir
340+
}) -join ';'
341+
342+
# Verify clang-cl is no longer reachable via PATH
343+
if (Get-Command clang-cl -ErrorAction SilentlyContinue) {
344+
Write-Error "clang-cl should not be in PATH after filtering"
345+
exit 1
346+
}
347+
Write-Output "Confirmed: clang-cl is not in PATH"
348+
349+
# Build — find_clang_cl_in_vs should locate it through vswhere
350+
cargo build -p aws-lc-sys --target aarch64-pc-windows-msvc
351+
317352
build-env-external-bindgen-test:
318353
if: github.repository_owner == 'aws'
319354
name: aws-lc-rs - External bindgen test (${{ matrix.os }})

0 commit comments

Comments
 (0)