Skip to content

Commit 15f4056

Browse files
committed
Switch to windows-2022 image in CI
1 parent 17f97af commit 15f4056

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/ci.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
matrix:
2929
job: [1, 2, 3, 4, 5, 6, 7, 8]
3030

31-
os: [macos, ubuntu, windows]
31+
os: [macos-latest, ubuntu-latest, windows-2022]
3232

3333
include:
3434
- { job: 1, type: "-s --examples", name: "Library (C++): shared", flag: "-D BUILD_SHARED_LIBS=YES" }
@@ -42,13 +42,13 @@ jobs:
4242

4343
name: ${{ matrix.name }} (${{ matrix.os }})
4444

45-
runs-on: ${{ matrix.os }}-latest
45+
runs-on: ${{ matrix.os }}
4646

4747
steps:
4848
- uses: actions/checkout@v2
4949

5050
- name: Install static analyzers
51-
if: matrix.os == 'ubuntu'
51+
if: matrix.os == 'ubuntu-latest'
5252
run: sudo apt-get install clang-tidy cppcheck -y -q
5353

5454
- uses: actions/setup-python@v2
@@ -66,12 +66,14 @@ jobs:
6666
python ../cmake-init.pyz --vcpkg headeronly -h
6767
6868
- name: Lint generated project
69-
if: matrix.os == 'ubuntu'
69+
if: matrix.os == 'ubuntu-latest'
7070
working-directory: proj
7171
run: cmake -D FORMAT_COMMAND=clang-format-11 -P cmake/lint.cmake
7272

7373
- name: Configure
74-
run: cmake -S proj --preset=ci-${{ matrix.os }} ${{ matrix.flag }}
74+
shell: pwsh
75+
run: cmake -S proj "--preset=ci-$("${{ matrix.os }}".split("-")[0])"
76+
${{ matrix.flag }}
7577

7678
- name: Build
7779
run: cmake --build proj/build --config Release

cmake-init/templates/common/CMakePresets.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
{
8080
"name": "ci-win64",
8181
"inherits": ["flags-windows", "ci-std"],
82-
"generator": "Visual Studio 16 2019",
82+
"generator": "Visual Studio 17 2022",
8383
"architecture": "x64",
8484
"hidden": true
8585
},

0 commit comments

Comments
 (0)