Skip to content

Commit

Permalink
GH actions: Split configure step for Linux and macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenke committed May 28, 2024
1 parent 3e901b3 commit 7bbbfad
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit 7bbbfad

Please sign in to comment.