CMake: use CMAKE_CXX_COMPILER_FRONTEND_VARIANT to control warnings #65
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2021-2024 Morwenn | |
# SPDX-License-Identifier: MIT | |
name: MacOS Builds | |
on: | |
push: | |
paths: | |
- '.github/workflows/build-macos.yml' | |
- 'CMakeLists.txt' | |
- 'cmake/**' | |
- 'include/gfx/timsort.hpp' | |
- 'tests/*' | |
pull_request: | |
paths: | |
- '.github/workflows/build-macos.yml' | |
- 'CMakeLists.txt' | |
- 'cmake/**' | |
- 'include/gfx/timsort.hpp' | |
- 'tests/*' | |
jobs: | |
build: | |
runs-on: macos-11 | |
strategy: | |
fail-fast: false | |
matrix: | |
cxx: | |
- g++-10 | |
- $(brew --prefix llvm)/bin/clang++ # Clang 13 | |
config: | |
# Release build | |
- build_type: Release | |
# Debug builds | |
- build_type: Debug | |
sanitize: address | |
- build_type: Debug | |
sanitize: undefined | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Configure CMake | |
working-directory: ${{runner.workspace}} | |
run: | | |
export CXX=${{matrix.cxx}} | |
cmake -H${{github.event.repository.name}} -Bbuild \ | |
-DCMAKE_CONFIGURATION_TYPES=${{matrix.config.build_type}} \ | |
-DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} \ | |
-DGFX_TIMSORT_SANITIZE=${{matrix.config.sanitize}} \ | |
-GNinja \ | |
-DBUILD_BENCHMARKS=ON | |
- name: Build the test suite | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake --build . --config ${{matrix.config.build_type}} -j 2 | |
- name: Run the test suite | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
working-directory: ${{runner.workspace}}/build | |
run: ctest -C ${{matrix.config.build_type}} |