From 9d95b65d1af4ed514c00c6dd16bab0ac24fd8b5f Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Fri, 8 Nov 2024 22:06:20 +0100 Subject: [PATCH] Fix macos ci build --- .github/workflows/ci_tests.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index bc2b321..ef26a85 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -78,27 +78,39 @@ jobs: g++ --version cmake --version ninja --version + + - name: Configure CMake on macos with clang + if: startsWith(matrix.compiler, 'clang') and startsWith(matrix.platform, 'macos') + run: | + cmake -B build -S . "-DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }} ${{ matrix.cmake_args.args }}" + env: + CC: $(brew --prefix llvm@18)/bin/clang + CXX: $(brew --prefix llvm@18)/bin/clang++ + CMAKE_GENERATOR: "Ninja Multi-Config" + - name: Configure CMake + if: not startsWith(matrix.compiler, 'clang') and not startsWith(matrix.platform, 'macos') run: | cmake -B build -S . "-DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }} ${{ matrix.cmake_args.args }}" env: CC: ${{ matrix.compiler.c }} CXX: ${{ matrix.compiler.cpp }} CMAKE_GENERATOR: "Ninja Multi-Config" + - name: Build Release run: | cmake --build build --config Release --verbose cmake --build build --config Release --target all_verify_interface_header_sets - cmake --install build --config Release --prefix /opt/beman.exemplar - find /opt/beman.exemplar -type f + cmake --install build --config Release --prefix /tmp/beman.exemplar + find /tmp/beman.exemplar -type f - name: Test Release run: ctest --test-dir build --build-config Release - name: Build Debug run: | cmake --build build --config Debug --verbose cmake --build build --config Debug --target all_verify_interface_header_sets - cmake --install build --config Debug --prefix /opt/beman.exemplar - find /opt/beman.exemplar -type f + cmake --install build --config Debug --prefix /tmp/beman.exemplar + find /tmp/beman.exemplar -type f - name: Test Debug run: ctest --test-dir build --build-config Debug