Skip to content

Commit d947ecf

Browse files
Update cmake-multi-platform.yml
1 parent 2d871f6 commit d947ecf

1 file changed

Lines changed: 21 additions & 9 deletions

File tree

.github/workflows/cmake-multi-platform.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
paths-ignore: '**/.md'
77
pull_request:
88
branches: [ main ]
9-
paths-ignore: '**/.md'
9+
paths-ignore: '**/.md'
1010

1111
jobs:
1212
build:
@@ -15,20 +15,30 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
os: [ubuntu-22.04, ubuntu-24.04, windows-latest, macos-latest]
18+
os: [ubuntu-22.04, ubuntu-24.04, windows-latest, windows-2022, macos-latest]
1919
build_type: [Release]
2020
c_compiler: [gcc, clang, cl]
2121
include:
22-
# Windows MSVC
22+
# Windows MSVC (latest)
2323
- os: windows-latest
2424
c_compiler: cl
2525
cpp_compiler: cl
2626

27-
# Windows MinGW
27+
# Windows MSVC (2022)
28+
- os: windows-2022
29+
c_compiler: cl
30+
cpp_compiler: cl
31+
32+
# Windows MinGW (latest)
2833
- os: windows-latest
2934
c_compiler: gcc
3035
cpp_compiler: g++
3136

37+
# Windows MinGW (2022)
38+
- os: windows-2022
39+
c_compiler: gcc
40+
cpp_compiler: g++
41+
3242
# Ubuntu GCC
3343
- os: ubuntu-22.04
3444
c_compiler: gcc
@@ -53,6 +63,8 @@ jobs:
5363
exclude:
5464
- os: windows-latest
5565
c_compiler: clang
66+
- os: windows-2022
67+
c_compiler: clang
5668
- os: ubuntu-22.04
5769
c_compiler: cl
5870
- os: ubuntu-24.04
@@ -81,15 +93,15 @@ jobs:
8193
brew install llvm libomp hdf5
8294
8395
- name: Install MinGW + HDF5 (Windows GCC)
84-
if: matrix.os == 'windows-latest' && matrix.c_compiler == 'gcc'
96+
if: (matrix.os == 'windows-latest' || matrix.os == 'windows-2022') && matrix.c_compiler == 'gcc'
8597
shell: bash
8698
run: |
8799
choco install msys2 -y
88100
C:/tools/msys64/usr/bin/pacman -Syu --noconfirm
89101
C:/tools/msys64/usr/bin/pacman -S --noconfirm mingw-w64-x86_64-hdf5
90102
91103
- name: Install vcpkg + HDF5 (Windows MSVC)
92-
if: matrix.os == 'windows-latest' && matrix.c_compiler == 'cl'
104+
if: (matrix.os == 'windows-latest' || matrix.os == 'windows-2022') && matrix.c_compiler == 'cl'
93105
shell: powershell
94106
run: |
95107
git clone https://github.com/microsoft/vcpkg.git C:/vcpkg
@@ -119,7 +131,7 @@ jobs:
119131
-DCMAKE_PREFIX_PATH="/opt/homebrew/opt/llvm;/opt/homebrew/opt/hdf5"
120132
121133
- name: Configure CMake (Windows MinGW)
122-
if: matrix.os == 'windows-latest' && matrix.c_compiler == 'gcc'
134+
if: (matrix.os == 'windows-latest' || matrix.os == 'windows-2022') && matrix.c_compiler == 'gcc'
123135
shell: bash
124136
run: |
125137
cmake -G "MinGW Makefiles" \
@@ -130,7 +142,7 @@ jobs:
130142
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
131143
132144
- name: Configure CMake (Windows MSVC)
133-
if: matrix.os == 'windows-latest' && matrix.c_compiler == 'cl'
145+
if: (matrix.os == 'windows-latest' || matrix.os == 'windows-2022') && matrix.c_compiler == 'cl'
134146
run: >
135147
cmake -G "Visual Studio 17 2022" -A x64
136148
-B ${{ steps.strings.outputs.build-output-dir }}
@@ -158,7 +170,7 @@ jobs:
158170
# ------------------------
159171
- name: Test
160172
working-directory: ${{ steps.strings.outputs.build-output-dir }}
161-
run: ctest --build-config ${{ matrix.build_type }}
173+
run: ctest --output-on-failure --build-config ${{ matrix.build_type }}
162174

163175
# ------------------------
164176
# Upload artifacts

0 commit comments

Comments
 (0)