Skip to content

Adding CMake Presets #8786

Adding CMake Presets

Adding CMake Presets #8786

Workflow file for this run

name: OSX-build
on:
push:
branches:
- 'master'
- 'develop'
- 'release/**'
tags:
- '**'
pull_request:
types: [opened,synchronize]
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled by `debug_enabled` keyword (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
concurrency:
group: ${{ github.workflow }}-${{ (github.head_ref && github.ref) || github.run_id }}
cancel-in-progress: true
jobs:
osx-clang-omp:
strategy:
fail-fast: false
matrix:
config:
- { preset: "ci-omp-clang-nompi-debug-nomixed" }
- { preset: "ci-omp-clang-nompi-release-static" }
name: ${{ matrix.config.preset }}
runs-on: [macos-latest]
steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v4
- name: setup
run: |
brew install libomp
- name: info
run: |
clang++ -v
cmake --version
- name: Debug over SSH (tmate)
uses: mxschmitt/action-tmate@v3.5
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
- name: configure
run: |
mkdir build
mkdir install
export INSTALL_PREFIX=`pwd`/install
cd build
cmake -S .. -B . --preset ${{ matrix.config.preset }} -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/libomp/
cmake --build . -j8
ctest -j10 --output-on-failure
- name: install
run: |
cd build
cmake --install .
cmake --build . --target test_install