From b7f8bd857a6956c567cb884b9bf212ae36418013 Mon Sep 17 00:00:00 2001 From: Henry Korir Date: Mon, 6 Jan 2025 11:41:42 +0300 Subject: [PATCH] chore: Update cmake-multi-platform.yml --- .github/workflows/cmake-multi-platform.yml | 29 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 583187f..ad8d90c 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -49,20 +49,41 @@ jobs: choco install git -y # Step 4: Build wxWidgets - - name: Build wxWidgets + - name: Build wxWidgets on Ubuntu + if: ${{ matrix.os == 'ubuntu-latest' }} run: | mkdir -p external/wxWidgets/build cd external/wxWidgets/build cmake .. -DCMAKE_BUILD_TYPE=Release -DwxBUILD_SHARED=OFF cmake --build . --config Release - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + shell: bash + + - name: Build wxWidgets on Windows + if: ${{ matrix.os == 'windows-latest' }} + shell: pwsh + run: | + mkdir external\wxWidgets\build + cd external\wxWidgets\build + cmake .. -DCMAKE_BUILD_TYPE=Release -DwxBUILD_SHARED=OFF + cmake --build . --config Release # Step 5: Build and test the Minesweeper project - - name: Build and test the Minesweeper project + - name: Build and test on Ubuntu + if: ${{ matrix.os == 'ubuntu-latest' }} run: | mkdir -p build cd build cmake .. -DCMAKE_BUILD_TYPE=Release cmake --build . --config Release ctest --output-on-failure - shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} + shell: bash + + - name: Build and test on Windows + if: ${{ matrix.os == 'windows-latest' }} + shell: pwsh + run: | + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release + cmake --build . --config Release + ctest --output-on-failure