From 7bbbfad970fa09027b0e44146e53cb06274c528d Mon Sep 17 00:00:00 2001 From: Jan Henke Date: Tue, 28 May 2024 23:00:17 +0200 Subject: [PATCH] GH actions: Split configure step for Linux and macOS --- .github/workflows/cmake-multi-platform.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index fda3ebb..6a33ec2 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -24,8 +24,6 @@ jobs: include: - os: macos-latest toolchain: LLVM - c_compiler: $(brew --prefix llvm@15)/bin/clang - cpp_compiler: $(brew --prefix llvm@15)/bin/clang++ - os: ubuntu-24.04 toolchain: GNU c_compiler: gcc-14 @@ -70,13 +68,23 @@ jobs: if: runner.os == 'Windows' run: choco install pkgconfiglite - - name: Configure CMake (Unix) - if: runner.os != 'Windows' + - name: Configure CMake (Linux) + if: runner.os == 'macOS' + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: > + cmake -B ${{ steps.strings.outputs.build-output-dir }} + -G "Xcode" + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" + -S ${{ github.workspace }} + + - name: Configure CMake (Linux) + if: runner.os == 'Linux' # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > cmake -B ${{ steps.strings.outputs.build-output-dir }} - -G "Ninja" -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}