Skip to content

Commit 01aaa1c

Browse files
committed
fix(ci/cd): part 5
1 parent c74afa6 commit 01aaa1c

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runner: ubuntu-latest
1717
artifact_name: examples-linux-clang
1818

19-
- name: "Windows (MinGW Cross-Compile)"
19+
- name: "Windows (MinGW Native)"
2020
runner: windows-latest
2121
artifact_name: examples-windows-mingw
2222

@@ -36,7 +36,7 @@ jobs:
3636
sudo apt-get update
3737
sudo apt-get install -y clang
3838
39-
- name: Installing Dependencies (Windows)
39+
- name: Setup MSYS2 with MinGW (Windows)
4040
if: matrix.runner == 'windows-latest'
4141
uses: msys2/setup-msys2@v2
4242
with:
@@ -46,17 +46,22 @@ jobs:
4646
mingw-w64-x86_64-toolchain
4747
mingw-w64-x86_64-cmake
4848
49-
- name: Configure CMake
50-
shell: ${{ matrix.runner == 'windows-latest' && 'msys2 {0}' || 'bash' }}
51-
run: |
52-
if [ "${{ matrix.runner }}" == "windows-latest" ]; then
53-
cmake -B build -S . -G "MinGW Makefiles" -DBUILD_EXAMPLES=ON
54-
else
55-
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=ON
56-
fi
49+
- name: Configure CMake (Windows)
50+
if: matrix.runner == 'windows-latest'
51+
shell: msys2 {0}
52+
run: cmake -B build -S . -G "MinGW Makefiles" -DBUILD_EXAMPLES=ON
53+
54+
- name: Configure CMake (Linux)
55+
if: matrix.runner == 'ubuntu-latest'
56+
run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=ON
5757

58-
- name: Build with CMake
59-
shell: ${{ matrix.runner == 'windows-latest' && 'msys2 {0}' || 'bash' }}
58+
- name: Build with CMake (Windows)
59+
if: matrix.runner == 'windows-latest'
60+
shell: msys2 {0}
61+
run: cmake --build build --config Release --parallel
62+
63+
- name: Build with CMake (Linux)
64+
if: matrix.runner == 'ubuntu-latest'
6065
run: cmake --build build --config Release --parallel
6166

6267
- name: Archive examples

0 commit comments

Comments
 (0)