Skip to content

Commit 4fc7705

Browse files
committed
Better fix MSYS CI
1 parent 66adcc2 commit 4fc7705

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

.github/workflows/cmake.yml

+29-5
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ jobs:
3636
msystem: ucrt64
3737
extra-cmake-args: -G "MSYS Makefiles"
3838
exe-extension: .exe
39-
shell: msys2 {0}
4039

4140
- system: MacOS-ARM
4241
runner: macos-latest
@@ -47,12 +46,15 @@ jobs:
4746
exclude:
4847
- webgpu-backend: DAWN
4948
link-type: STATIC
50-
51-
49+
5250
runs-on: ${{ matrix.runner }}
5351

5452
steps:
5553
- uses: actions/checkout@v4
54+
55+
- name: Set shell
56+
shell: bash
57+
run: echo "SHELL=${{ matrix.shell }}" >> $GITHUB_ENV
5658

5759
- name: Install dependencies
5860
if: ${{ matrix.install-deps }}
@@ -66,7 +68,7 @@ jobs:
6668
pacboy: cmake:p egl-headers:p
6769

6870
- name: Configure CMake
69-
shell: ${{ matrix.shell }}
71+
if: ${{ ! matrix.msystem }}
7072
run: >
7173
cmake
7274
-S examples
@@ -77,7 +79,29 @@ jobs:
7779
${{ matrix.extra-cmake-args }}
7880
7981
- name: Build
80-
shell: ${{ matrix.shell }}
82+
if: ${{ ! matrix.msystem }}
83+
run: >
84+
cmake
85+
--build build
86+
--config ${{ matrix.build-type }}
87+
88+
# This is a hack to work around the lack of ${{ variables }} in 'shell' parameter
89+
# We use the SHELL env variable as the value of 'shell'
90+
- name: Configure CMake (MSYS)
91+
if: ${{ matrix.msystem }}
92+
shell: msys2 {0}
93+
run: >
94+
cmake
95+
-S examples
96+
-B build
97+
-DWEBGPU_BACKEND=${{ matrix.webgpu-backend }}
98+
-D${{ matrix.webgpu-backend }}_LINK_TYPE=${{ matrix.link-type }}
99+
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
100+
${{ matrix.extra-cmake-args }}
101+
102+
- name: Build (MSYS)
103+
if: ${{ matrix.msystem }}
104+
shell: msys2 {0}
81105
run: >
82106
cmake
83107
--build build

0 commit comments

Comments
 (0)