Skip to content

Commit cb27835

Browse files
authored
git bash -> pwsh
1 parent e65bedc commit cb27835

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/build-wheel.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,20 @@ jobs:
9191
9292
- name: Write and compile cl shim (creates cl.exe that calls sccache)
9393
if: ${{ startsWith(inputs.host-platform, 'win') }}
94+
shell: pwsh
9495
run: |
95-
cl "/nologo" "/O2" ci/tools/cl_shim.c "/Fe:cl.exe"
96-
RC=$?
97-
if [ $RC -ne 0 ]; then
98-
echo "cl failed with exit code $RC" >&2
99-
exit $RC
100-
fi
101-
if [ ! -f ./cl.exe ]; then
102-
echo "Failed to build cl_shim.c: output not found" >&2
96+
# Compile into cl.exe
97+
cl /nologo /O2 cl_shim.c /Fe:cl.exe
98+
99+
# Verify
100+
if (-not (Test-Path .\cl.exe)) {
101+
Write-Error "Failed to build cl.exe"
103102
exit 1
104-
fi
105-
echo "SCCACHE_WRAPPER_DIR=$(realpath .)" >> $GITHUB_ENV
103+
} else {
104+
Write-Host "cl.exe shim created successfully."
105+
}
106+
107+
Add-Content -Path $env:GITHUB_ENV -Value "SCCACHE_WRAPPER_DIR=$((Get-Location).ProviderPath)"
106108
107109
- name: Set environment variables
108110
env:

0 commit comments

Comments
 (0)