From e22a17eda3eb3a10c245f2615abdad26472c884c Mon Sep 17 00:00:00 2001 From: Henry Korir Date: Mon, 6 Jan 2025 10:33:27 +0300 Subject: [PATCH] Update cmake-multi-platform.yml --- .github/workflows/cmake-multi-platform.yml | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index a823b4c..ea268e4 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -36,18 +36,33 @@ jobs: choco install visualstudio2019buildtools -y --ignore-checksums choco install git -y - # Step 3: Build wxWidgets (cross-platform setup) + # Step 3: Build wxWidgets - name: Configure and build wxWidgets run: | - mkdir -p external/wxWidgets/build - cd external/wxWidgets/build + if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then + mkdir -p external/wxWidgets/build + cd external/wxWidgets/build + else + if (-Not (Test-Path "external/wxWidgets/build")) { + New-Item -ItemType Directory -Path external/wxWidgets/build + } + Set-Location external/wxWidgets/build + fi cmake .. -DCMAKE_BUILD_TYPE=Release -DwxBUILD_SHARED=OFF cmake --build . --config Release # Step 4: Build and test your project - name: Build and test using CMake run: | - mkdir build && cd build + if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then + mkdir -p build + cd build + else + if (-Not (Test-Path "build")) { + New-Item -ItemType Directory -Path build + } + Set-Location build + fi cmake .. -DCMAKE_BUILD_TYPE=Release cmake --build . --config Release ctest --output-on-failure