Skip to content

fix(ci/cd): add OpenMP env for macOS #321

fix(ci/cd): add OpenMP env for macOS

fix(ci/cd): add OpenMP env for macOS #321

Workflow file for this run

name: C/C++ CI
on: push
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14]
compiler: [{ c: gcc-13, cxx: g++-13 }, { c: clang, cxx: clang++ }]
steps:
- uses: actions/checkout@v4
- name: Setup prerequisites for Linux
if: runner.os == 'Linux'
run: |
sudo apt -qq update
sudo apt install -y re2c ruby-full bison flex doxygen zlib1g-dev libomp-15-dev
sudo ln -f -s /usr/bin/clang-15 /usr/bin/clang
sudo ln -f -s /usr/bin/clang++-15 /usr/bin/clang++
- name: Setup prerequisites for macOS
if: runner.os == 'macOS'
run: |
brew install re2c bison flex doxygen libomp
export OpenMP_ROOT=$(brew --prefix)/opt/libomp
- name: Configure Project
uses: threeal/cmake-action@v1.3.0
with:
generator: Ninja
c-compiler: ${{ matrix.compiler.c }}
cxx-compiler: ${{ matrix.compiler.cxx }}
- name: Build Project
run: cmake --build build