Skip to content

Commit 4304f2a

Browse files
committed
Update CI workflow to use Windows 2022
Windows Server 2019 is not available any more in Github actions
1 parent e9bafd0 commit 4304f2a

1 file changed

Lines changed: 21 additions & 10 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ jobs:
299299
}
300300
- {
301301
name: "Windows MSVC 2017 (x64) C++17",
302-
os: windows-2019,
302+
os: windows-2022,
303303
buildtype: Release,
304304
cxx: "cl",
305305
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat",
@@ -308,7 +308,7 @@ jobs:
308308
}
309309
- {
310310
name: "Windows MSVC 2017 (x64) C++20",
311-
os: windows-2019,
311+
os: windows-2022,
312312
buildtype: Release,
313313
cxx: "cl",
314314
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat",
@@ -317,15 +317,15 @@ jobs:
317317
}
318318
- {
319319
name: "Windows MSVC 2019 (x64) C++17",
320-
os: windows-2019,
320+
os: windows-2022,
321321
buildtype: Release,
322322
cxx: "cl",
323323
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
324324
cxxver: 17,
325325
}
326326
- {
327327
name: "Windows MSVC 2019 (x64) C++20",
328-
os: windows-2019,
328+
os: windows-2022,
329329
buildtype: Release,
330330
cxx: "cl",
331331
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
@@ -375,7 +375,7 @@ jobs:
375375
}
376376
- {
377377
name: "Msys2/CLANG",
378-
os: windows-2019,
378+
os: windows-2022,
379379
buildtype: Release,
380380
mingw: MINGW64,
381381
mingw-arch: x86_64,
@@ -384,7 +384,7 @@ jobs:
384384
}
385385
- {
386386
name: "Msys2/GCC",
387-
os: windows-2019,
387+
os: windows-2022,
388388
buildtype: Release,
389389
mingw: MINGW64,
390390
mingw-arch: x86_64,
@@ -393,7 +393,7 @@ jobs:
393393
}
394394
- {
395395
name: "Msys2/debugCLANG",
396-
os: windows-2019,
396+
os: windows-2022,
397397
buildtype: Debug,
398398
mingw: MINGW64,
399399
mingw-arch: x86_64,
@@ -402,7 +402,7 @@ jobs:
402402
}
403403
- {
404404
name: "Msys2/debugGCC",
405-
os: windows-2019,
405+
os: windows-2022,
406406
buildtype: Debug,
407407
mingw: MINGW64,
408408
mingw-arch: x86_64,
@@ -579,14 +579,25 @@ jobs:
579579
580580
- name: Install MSVC 2017
581581
id: install_msvc_2017
582-
if: startsWith(matrix.config.os, 'windows-2019') && ( matrix.config.cxx == 'cl' ) && ( matrix.config.msvcver == 2017 )
582+
if: startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' ) && ( matrix.config.msvcver == 2017 )
583583
shell: bash
584584
working-directory: ${{ env.HOME }}
585585
run: |
586586
choco install visualstudio2017community
587587
choco install visualstudio2017-workload-nativedesktop
588588
choco install visualstudio2017-workload-vctools
589589
590+
- name: Install MSVC 2019
591+
id: install_msvc_2019
592+
if: startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' ) && ( matrix.config.msvcver == 2019 )
593+
shell: bash
594+
working-directory: ${{ env.HOME }}
595+
run: |
596+
choco feature disable --name="'exitOnRebootDetected'"
597+
choco install visualstudio2019community
598+
choco install visualstudio2019-workload-nativedesktop
599+
choco install visualstudio2019-workload-vctools
600+
590601
- name: Install MSVC 2026 (Visual Studio 2026 Community with C++ tools)
591602
id: install_msvc_2026
592603
if: startsWith(matrix.config.os, 'windows-') && ( matrix.config.cxx == 'cl' ) && ( matrix.config.msvcver == 2026 )
@@ -599,7 +610,7 @@ jobs:
599610
600611
- name: MSYS2 - Configure, Build & Test
601612
id: install_msys2
602-
if: (startsWith(matrix.config.os, 'windows-2019') && contains(matrix.config.mingw, 'MINGW'))
613+
if: (startsWith(matrix.config.os, 'windows-20') && contains(matrix.config.mingw, 'MINGW'))
603614
shell: msys2 {0}
604615
working-directory: ${{ env.HOME }}
605616
run: |

0 commit comments

Comments
 (0)