Skip to content

Commit d7cf6bd

Browse files
committed
Setup Windows env manually to reduce dependencies in CI.
1 parent 3df4aef commit d7cf6bd

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/CITest.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,14 @@ jobs:
219219
arch: x64
220220
platform: windows
221221
python-arch: x64
222+
msvc_ver: 2022
222223
python-version: '3.9'
223224
diet_build: false
224225
- name: 'windows x64 MSVC 64bit DIET'
225226
os: windows-latest
226227
arch: x64
227228
platform: windows
229+
msvc_ver: 2022
228230
python-arch: x64
229231
python-version: '3.9'
230232
diet_build: true
@@ -250,17 +252,16 @@ jobs:
250252
}
251253
Start-Process msiexec.exe -ArgumentList "/qn /i cmake.msi" -Wait
252254
253-
- name: '🛠️ Win MSVC 64 setup'
254-
if: contains(matrix.config.name, 'MSVC 64')
255-
uses: ilammy/msvc-dev-cmd@v1
256-
with:
257-
arch: 'x64'
258-
259-
- name: '🚧 Win MSVC 64 build'
260-
if: contains(matrix.config.name, 'MSVC 64')
255+
- name: 'Windows MSVC build'
256+
if: contains(matrix.config.name, 'MSVC')
261257
shell: bash
258+
env:
259+
MSVC_VER: ${{ matrix.msvc_ver }}
260+
ARCH: ${{ matrix.arch }}
261+
PLATFORM: ${{ matrix.platform }}
262262
run: |
263+
"C:\Program Files (x86)\Microsoft Visual Studio\$env:MSVC_VER\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" $env:ARCH
263264
cmake --version
264-
cmake --preset=${{ matrix.config.platform }}-x64${{ matrix.config.diet_build == true && '-diet' || '' }}
265-
cmake --build --preset build-${{ matrix.config.platform }}${{ matrix.config.diet_build == true && '-diet' || '' }}-release
266-
cmake --build --preset install-${{ matrix.config.platform }}${{ matrix.config.diet_build == true && '-diet' || '' }}-release
265+
cmake --preset=$env:PLATFORM-$env:ARCH${{ matrix.config.diet_build == true && '-diet' || '' }}
266+
cmake --build --preset build-$env:PLATFORM${{ matrix.config.diet_build == true && '-diet' || '' }}-release
267+
cmake --build --preset install-$env:PLATFORM${{ matrix.config.diet_build == true && '-diet' || '' }}-release

0 commit comments

Comments
 (0)