Skip to content

find omp fallback for macos #20

find omp fallback for macos

find omp fallback for macos #20

Workflow file for this run

# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms
on:
push:
branches: [ "dev", "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
build_type: [Release, Debug]
cpp_compiler: [cl, g++, clang++, c++]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
- os: macos-latest
c_compiler: cc
cpp_compiler: c++
steps:
- uses: actions/checkout@v3
- if: matrix.c_compiler == 'clang'
name: install OpenMP
run: sudo apt-get install -y libomp-dev
- if: matrix.os == 'macos-latest'
name: install OpenMP
run: brew install libomp
- name: Configure CMake
run: >
cmake -B build
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DOPTION_BUILD_TESTS=ON
-DOPTION_BUILD_BENCHMARKS=ON
-DOPTION_BUILD_EXAMPLES=ON
-DOPTION_BUILD_DOCS=ON
-S ${{ github.workspace }}
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build build --config ${{ matrix.build_type }}
- name: Test
working-directory: build
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{ matrix.build_type }}