Skip to content

added support of OpenMP (via brew) #2

added support of OpenMP (via brew)

added support of OpenMP (via brew) #2

Workflow file for this run

name: testMacOS
on:
push:
branches:
- '**' # Run on all branches
tags-ignore:
- 'v*' # Ignore tag pushes like v1.2.3
pull_request:
branches:
- '**'
env:
BUILD_TYPE: Release
jobs:
build:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies (Homebrew)
run: |
brew update
brew install cmake boost gtk+3 hdf5 libomp
- name: Configure CMake with OpenMP support
env:
LDFLAGS: "-L/opt/homebrew/opt/libomp/lib"
CPPFLAGS: "-I/opt/homebrew/opt/libomp/include"
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DRAYX_WERROR=ON \
-DRAYX_REQUIRE_CUDA=OFF \
-DCMAKE_CXX_COMPILER="$(which clang++)" \
-DCMAKE_CXX_FLAGS="-Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include" \
-DCMAKE_EXE_LINKER_FLAGS="-L/opt/homebrew/opt/libomp/lib -lomp"
- name: Build
run: |
cmake --build build --config ${{env.BUILD_TYPE}}
- name: Run
working-directory: ${{github.workspace}}
run: |
./build/bin/release/rayx -x -c -m 1 -i Intern/rayx-core/tests/input/BoringImagePlane.rml
./build/bin/release/rayx -x -m 1 -i Intern/rayx-core/tests/input/BoringImagePlane.rml
git checkout -- Intern/rayx-core/tests/input/BoringImagePlane.csv
- name: Test
working-directory: ${{github.workspace}}/build/bin/release
run: ./rayx-core-tst -x
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: RAYX-macOS-${{env.BUILD_TYPE}}
path: ${{github.workspace}}/build/bin/release