Add macros to force checking of narrow_cast
and if it can be used in constexpr contexts
#2152
Workflow file for this run
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
name: MacOS | |
on: | |
push: | |
paths: | |
# Workflow file itself | |
- '.github/workflows/MacOS.yml' | |
# C++ files | |
- '**.cpp' | |
- '**.hpp' | |
# CMake files | |
- '**.cmake' | |
- '**.txt' | |
# Script files | |
- '**.sh' | |
pull_request: | |
branches: | |
- main | |
- develop | |
paths: | |
# Workflow file itself | |
- '.github/workflows/MacOS.yml' | |
# C++ files | |
- '**.cpp' | |
- '**.hpp' | |
# CMake files | |
- '**.cmake' | |
- '**.txt' | |
# Script files | |
- '**.sh' | |
release: | |
types: [published] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
xcode: | |
runs-on: ${{ matrix.cfg.os }} | |
# Don't run on dependabot PRs | |
if: github.actor != 'dependabot[bot]' | |
strategy: | |
fail-fast: false | |
matrix: | |
# Pair of os version and XCode version | |
cfg: | |
- { os: macos-11, compiler_version: "11.7" } | |
- { os: macos-11, compiler_version: "12.4" } | |
- { os: macos-11, compiler_version: "12.5.1" } | |
- { os: macos-11, compiler_version: "13.0" } | |
- { os: macos-11, compiler_version: "13.1" } | |
- { os: macos-11, compiler_version: "13.2.1" } | |
- { os: macos-12, compiler_version: "13.3.1" } | |
- { os: macos-12, compiler_version: "13.4.1" } | |
- { os: macos-12, compiler_version: "14.0.1" } | |
- { os: macos-12, compiler_version: "14.1" } | |
- { os: macos-12, compiler_version: "14.2" } | |
- { os: macos-13, compiler_version: "14.3" } | |
- { os: macos-13, compiler_version: "15.0.1" } | |
- { os: macos-13, compiler_version: "15.1" } | |
- { os: macos-13, compiler_version: "15.2" } | |
- { os: macos-14, compiler_version: "15.3" } | |
build_type: | |
- "Debug" | |
- "Release" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Environment | |
run: scripts/ci/SetupEnvironment.sh | |
- name: Setup XCode | |
uses: maxim-lobanov/setup-xcode@v1.6.0 | |
with: | |
xcode-version: ${{ matrix.cfg.compiler_version }} | |
- name: Install ninja | |
run: brew install ninja | |
- name: Configure build directory | |
run: | | |
mkdir build -p | |
cd build | |
cmake -DCMAKE_BUILD_TYPE:STRING=${{ matrix.build_type }} .. | |
- name: Build | |
working-directory: ./build | |
run: cmake --build . --config ${{ matrix.build_type }} | |
- name: Run tests | |
working-directory: ./build | |
run: ctest . -C ${{ matrix.build_type }} | |
gcc: | |
runs-on: macos-12 | |
# Don't run on dependabot PRs | |
if: github.actor != 'dependabot[bot]' | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler_version: | |
- "10" | |
- "11" | |
- "12" | |
- "13" | |
- "14" | |
build_type: | |
- "Debug" | |
- "Release" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Environment | |
run: scripts/ci/SetupEnvironment.sh | |
- name: Install gcc | |
run: | | |
brew install gcc@${{ matrix.compiler_version }} ninja | |
echo "CC=gcc-${{ matrix.compiler_version }}" >> $GITHUB_ENV | |
echo "CXX=g++-${{ matrix.compiler_version }}" >> $GITHUB_ENV | |
- name: Configure build directory | |
run: | | |
mkdir build -p | |
cd build | |
cmake -DCMAKE_BUILD_TYPE:STRING=${{ matrix.build_type }} .. | |
- name: Build | |
working-directory: ./build | |
run: cmake --build . --config ${{ matrix.build_type }} | |
- name: Run tests | |
working-directory: ./build | |
run: ctest . -C ${{ matrix.build_type }} |