From 1e57ea1a3924dc2239bf444e6c6e84ec856de79a Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Wed, 15 Jan 2025 18:21:51 +0000 Subject: [PATCH] Tweak how CMake is run in CI --- .github/workflows/ci.yml | 19 +++++++++++-------- .github/workflows/release.yml | 10 ++++++---- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae1c9cc8..31621e57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,10 +63,11 @@ jobs: - name: Run CMake run: | - mkdir build - cd build - cmake .. -DBOOST_ROOT="${{ steps.get-boost.outputs.root }}" -DCPACK_PACKAGE_VERSION="${{ steps.get-libloot-version.outputs.version }}" - make all + cmake \ + -DBOOST_ROOT="${{ steps.get-boost.outputs.root }}" \ + -DCPACK_PACKAGE_VERSION="${{ steps.get-libloot-version.outputs.version }}" \ + -B build + cmake --build build - name: Run tests run: ctest --test-dir build --output-on-failure @@ -157,10 +158,12 @@ jobs: - name: Run CMake run: | - mkdir build - cd build - cmake .. -G "Visual Studio 16 2019" -A ${{ matrix.platform }} -DBOOST_ROOT="${{ steps.get-boost.outputs.root }}" -DCPACK_PACKAGE_VERSION="${{ steps.get-libloot-version.outputs.version }}" - cmake --build . --config ${{ env.MSVC_CONFIG }} + cmake -G "Visual Studio 16 2019" ` + -A ${{ matrix.platform }} ` + -DBOOST_ROOT="${{ steps.get-boost.outputs.root }}" ` + -DCPACK_PACKAGE_VERSION="${{ steps.get-libloot-version.outputs.version }}" ` + -B build + cmake --build build --config ${{ env.MSVC_CONFIG }} - name: Run tests run: ctest --test-dir build --build-config ${{ env.MSVC_CONFIG }} --output-on-failure diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fa44687c..c8be3b3c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,10 +73,12 @@ jobs: - name: Run CMake run: | - mkdir build - cd build - cmake .. -G "Visual Studio 16 2019" -A ${{ matrix.platform }} -DBOOST_ROOT="${{ steps.get-boost.outputs.root }}" -DCPACK_PACKAGE_VERSION="${{ needs.create_release.outputs.git_tag }}" - cmake --build . --config ${{ env.MSVC_CONFIG }} + cmake -G "Visual Studio 16 2019" ` + -A ${{ matrix.platform }} ` + -DBOOST_ROOT="${{ steps.get-boost.outputs.root }}" ` + -DCPACK_PACKAGE_VERSION="${{ needs.create_release.outputs.git_tag }}" ` + -B build + cmake --build build --config ${{ env.MSVC_CONFIG }} - uses: actions/setup-python@v5 with: