Skip to content

Commit f4721c0

Browse files
authored
Stop usage of Windows 2016 which is deprecated (#56)
Github Actions stops offering Windows 2016 as a runner. This patch replaces Windows 2016 usage by Windows 2019 usage. A new install step was added which installs MSVC 2017.
1 parent 1c5f901 commit f4721c0

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/cmake.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,19 @@ jobs:
125125
}
126126
- {
127127
name: "Windows MSVC 2017 (x64) C++17",
128-
os: windows-2016,
128+
os: windows-2019,
129129
cxx: "cl",
130-
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
130+
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat",
131131
cxxver: 17,
132+
msvcver: 2017,
132133
}
133134
- {
134135
name: "Windows MSVC 2017 (x64) C++20",
135-
os: windows-2016,
136+
os: windows-2019,
136137
cxx: "cl",
137-
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
138+
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat",
138139
cxxver: 20,
140+
msvcver: 2017,
139141
}
140142
- {
141143
name: "Windows MSVC 2019 (x64) C++17",
@@ -242,6 +244,16 @@ jobs:
242244
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
243245
sudo apt-get install g++-11
244246
247+
- name: Install MSVC 2017
248+
id: install_msvc_2017
249+
if: startsWith(matrix.config.os, 'windows-2019') && ( matrix.config.cxx == 'cl' ) && ( matrix.config.msvcver == 2017 )
250+
shell: bash
251+
working-directory: ${{ env.HOME }}
252+
run: |
253+
choco install visualstudio2017community
254+
choco install visualstudio2017-workload-nativedesktop
255+
choco install visualstudio2017-workload-vctools
256+
245257
- name: Create Build Environment
246258
# Some projects don't allow in-source building, so create a separate build directory
247259
# We'll use this as our working directory for all subsequent commands

0 commit comments

Comments
 (0)