From 3114404f46e29e9ba6f9382b1cb84189048e0492 Mon Sep 17 00:00:00 2001 From: Ian Duncan <76043277+dr8co@users.noreply.github.com> Date: Mon, 29 Apr 2024 10:18:00 +0300 Subject: [PATCH] ci: Isolate Windows build --- .github/workflows/cpack-multi-platform.yml | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cpack-multi-platform.yml b/.github/workflows/cpack-multi-platform.yml index c19ad44..218ebe6 100644 --- a/.github/workflows/cpack-multi-platform.yml +++ b/.github/workflows/cpack-multi-platform.yml @@ -71,7 +71,7 @@ jobs: fi - name: Configure CMake and Build Assets - shell: bash + if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' run: | cmake -B ${{ steps.strings.outputs.build-output-dir }} \ -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \ @@ -80,15 +80,20 @@ jobs: -S ${{ github.workspace }} -G ${{ steps.set-generator.outputs.generator }} \ -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -j 4 - if [[ "${{ runner.os }}" != "Windows0" ]]; then - cmake -B ${{ steps.strings.outputs.build-output-dir }} \ - -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \ - -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \ - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ - -S ${{ github.workspace }} -G ${{ steps.set-generator.outputs.generator }} \ - -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF - cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -j 4 - fi + cmake -B ${{ steps.strings.outputs.build-output-dir }} -S ${{ github.workspace }} -DBUILD_SHARED_LIBS=ON \ + cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -j 4 + + - name: Configure CMake and Build Assets + if: matrix.os == 'windows-latest' + shell: powershell + run: | + cmake -B ${{ steps.strings.outputs.build-output-dir }} ` + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} ` + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} ` + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ` + -S ${{ github.workspace }} -G ${{ steps.set-generator.outputs.generator }} ` + -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF + cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -j 4 - name: Package working-directory: ${{ steps.strings.outputs.build-output-dir }}