Skip to content

Support stricter aggregate initialization rules in macOS clang++. #4

Support stricter aggregate initialization rules in macOS clang++.

Support stricter aggregate initialization rules in macOS clang++. #4

Workflow file for this run

name: macOS
on:
push:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14, macos-15] # macos-14 = M1, macos-15 = M2/M3
compiler: [clang++]
build_type: [Release]
standard: [23]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
run: |
# XQuartz provides X11 on macOS
brew install xquartz freetype
# Note: XQuartz needs to be started, but headless build should work
cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
working-directory: ${{runner.workspace}}/build
env:
CXX: ${{ matrix.compiler }}
run: |
# Set X11 paths for macOS
export PKG_CONFIG_PATH="/opt/X11/lib/pkgconfig:$PKG_CONFIG_PATH"
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_CXX_STANDARD=${{matrix.standard}} \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_CXX_FLAGS="-I/opt/X11/include" \
-DCMAKE_EXE_LINKER_FLAGS="-L/opt/X11/lib" \
$GITHUB_WORKSPACE
- name: Build
working-directory: ${{runner.workspace}}/build
run: |
cpus=`sysctl -n hw.ncpu`
cmake --build . --config ${{matrix.build_type}} --parallel $cpus
- name: Test
working-directory: ${{runner.workspace}}/build
env:
CTEST_OUTPUT_ON_FAILURE: True
run: |
# Tests that don't require GUI should work
ctest -C ${{matrix.build_type}} || true
echo "Note: Some tests may fail without X11 display"