Skip to content

further copilot improvements #9

further copilot improvements

further copilot improvements #9

Workflow file for this run

name: testMacOS
on:
push:
branches:
- '**'
tags-ignore:
- 'v*'
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 llvm make
- name: Add Homebrew to PATH
run: echo "/opt/homebrew/bin" >> $GITHUB_PATH
- name: Set Xcode toolchain as default
run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
- name: Ensure system linker is used
run: echo "LD=/usr/bin/ld" >> $GITHUB_ENV
- name: Configure Homebrew clang (symlink for easier access)
run: |
brew unlink llvm && brew link llvm --force --overwrite
- name: Symlink system ld for Homebrew clang
run: |
ln -sf /usr/bin/ld /opt/homebrew/bin/ld
ln -sf /usr/bin/ld /opt/homebrew/opt/llvm/bin/ld
- name: Configure CMake with Homebrew clang and OpenMP support
env:
LDFLAGS: "-L/opt/homebrew/opt/libomp/lib"
CPPFLAGS: "-I/opt/homebrew/opt/libomp/include"
CC: "/opt/homebrew/opt/llvm/bin/clang"
CXX: "/opt/homebrew/opt/llvm/bin/clang++"
PATH: "/opt/homebrew/opt/llvm/bin:/opt/homebrew/bin:$PATH"
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DRAYX_WERROR=ON \
-DRAYX_REQUIRE_CUDA=OFF \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_CXX_COMPILER="$CXX" \
-DCMAKE_CXX_FLAGS="-stdlib=libc++ -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