name: macOS CMake on: push: branches: main tags-ignore: '*.*' paths: - '.github/workflows/cmake-macos.yml' - 'CMakeLists.txt' - 'include/**' - 'src/*pp' - 'src/osx/*pp' pull_request: branches: main paths: - '.github/workflows/cmake-macos.yml' - 'CMakeLists.txt' - 'include/**' - 'src/*pp' - 'src/osx/*pp' jobs: cmake_build_on_macos: runs-on: macos-latest concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true steps: - uses: actions/checkout@v4 - name: Install build tools run: | export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew update --quiet brew install --force --overwrite cmake llvm@17 ninja lowdown - name: Configure run: | export LLVM_PREFIX="$(brew --prefix llvm)" export CXX="$LLVM_PREFIX/bin/clang++" export CPPFLAGS="-I$LLVM_PREFIX/include" export LDFLAGS="-L$LLVM_PREFIX/lib -L$LLVM_PREFIX/lib/c++ -Wl,-rpath,$LLVM_PREFIX/lib/c++ -fuse-ld=$LLVM_PREFIX/bin/ld64.lld" cmake -B build -G Ninja - name: Compile run: cmake --build build --verbose