Skip to content

Commit e45fae1

Browse files
committed
fix: enhance Windows CI workflow with short workspace mapping and improved test handling
Signed-off-by: Gordon Smith <[email protected]>
1 parent 1740d8d commit e45fae1

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

.github/workflows/windows.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ jobs:
3131
with:
3232
submodules: recursive
3333

34+
- name: Create short workspace mapping
35+
run: |
36+
$winPath = (Get-Location).Path
37+
cmd /c ("subst T: ""{0}""" -f $winPath)
38+
Add-Content -Path $env:GITHUB_ENV -Value "SHORT_WORKSPACE=T:/"
39+
3440
- name: Cache Cargo registry
3541
uses: actions/cache@v4
3642
with:
@@ -60,30 +66,33 @@ jobs:
6066

6167
- name: Install rust dependencies
6268
run: |
63-
cargo install wasm-tools wit-bindgen-cli || true
69+
Set-Location "$env:SHORT_WORKSPACE"
70+
& cargo install wasm-tools wit-bindgen-cli
71+
if ($LASTEXITCODE -ne 0) {
72+
Write-Host "cargo install exited with code $LASTEXITCODE (ignored)."
73+
$global:LASTEXITCODE = 0
74+
}
6475
6576
- name: configure
6677
run: |
67-
cmake --preset ${{ matrix.config }}
78+
Set-Location "$env:SHORT_WORKSPACE"
79+
& cmake --preset ${{ matrix.config }}
6880
6981
- name: build
7082
run: |
71-
cmake --build --preset ${{ matrix.build }}
83+
Set-Location "$env:SHORT_WORKSPACE"
84+
& cmake --build --preset ${{ matrix.build }}
7285
7386
- name: test
7487
working-directory: build
7588
run: |
76-
ctest -C Debug -VV
89+
Set-Location "$env:SHORT_WORKSPACE/build"
90+
& ctest -C Debug -VV
7791
78-
- name: test-stubs-full (allowed to fail)
79-
working-directory: build
80-
continue-on-error: true
81-
shell: bash
92+
- name: Remove short workspace mapping
93+
if: always()
8294
run: |
83-
echo "Running wit-stub-generation-test (failures expected and will be reported)..."
84-
ctest -C Debug -VV -R "wit-stub-generation-test" > test_output.txt 2>&1 || true
85-
cat test_output.txt
86-
../.github/scripts/summarize-test-failures.sh test_output.txt test_summary.md
95+
cmd /c "subst T: /D" 2>$null
8796
8897
- name: Upload error logs
8998
if: ${{ failure() || cancelled() }}

0 commit comments

Comments
 (0)