From 66e2e0841da29bc26f3ce0bb758f5034583d19ad Mon Sep 17 00:00:00 2001 From: Master92 Date: Tue, 5 Dec 2023 15:00:47 +0100 Subject: [PATCH] Fix preset name based on runner os --- .github/workflows/build.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2dd09bf..698c186 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -78,7 +78,13 @@ jobs: # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. id: strings shell: bash - run: echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + if [ "${{ matrix.os }}" == "windows-latest" ]; then + echo "preset-name=conan-default" >> "$GITHUB_OUTPUT" + else + echo "preset-name=conan-release" >> "$GITHUB_OUTPUT" + fi - name: 🐸 Create default Conan profile run: conan profile detect @@ -90,8 +96,7 @@ jobs: run: cmake --preset conan-release - name: 🔨 Build project - run: cmake --build --preset conan-release --parallel + run: cmake --build --preset ${{ steps.strings.outputs.preset-name }} --parallel - name: 🏃 Run test suite - working-directory: build - run: ctest --build-config ${{ matrix.build_type }} + run: ctest --preset ${{ steps.strings.outputs.preset-name }}