Skip to content

Commit 7e51613

Browse files
authored
ci: use ilammy/msvc-dev-cmd for Windows MSVC environment (#643)
Replace hardcoded vcvarsall.bat path with the Apache-approved ilammy/msvc-dev-cmd action so builds work across VS image layouts.
1 parent 2e87038 commit 7e51613

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ jobs:
118118
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
119119
with:
120120
persist-credentials: false
121+
- name: Set up MSVC Developer Command Prompt
122+
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
123+
with:
124+
arch: x64
121125
- name: Install dependencies
122126
shell: pwsh
123127
run: |
@@ -133,14 +137,14 @@ jobs:
133137
SCCACHE_GHA_ENABLED: "true"
134138
run: |
135139
$ErrorActionPreference = "Stop"
136-
cmd /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat`" x64 && bash -lc `"ci/scripts/build_iceberg.sh `$(pwd) OFF ON`""
140+
bash -lc 'ci/scripts/build_iceberg.sh $(pwd) OFF ON'
137141
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
138142
sccache --show-stats
139143
- name: Build Example
140144
shell: pwsh
141145
run: |
142146
$ErrorActionPreference = "Stop"
143-
cmd /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat`" x64 && bash -lc `"ci/scripts/build_example.sh `$(pwd)/example`""
147+
bash -lc 'ci/scripts/build_example.sh $(pwd)/example'
144148
meson:
145149
name: Meson - ${{ matrix.title }}
146150
runs-on: ${{ matrix.runs-on }}

0 commit comments

Comments
 (0)