Skip to content

macOS CI tests

macOS CI tests #912

Workflow file for this run

name: CI
on:
push:
branches:
- main
- "releases/**"
paths-ignore:
- "**.md"
pull_request:
release:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# test_on_linux:
# name: Test on remage image
# runs-on: ubuntu-latest
#
# strategy:
# fail-fast: false
# matrix:
# # guideline: only test on latest patch releases (and maybe previous one)
# container_version:
# - G4.11.3
# - G4.11.2
# - slim
#
# container: docker://gipert/remage-base:${{ matrix.container_version }}
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Build project
# run: |
# mkdir build
# cd build
# cmake -DRMG_BUILD_EXAMPLES=1 -DBUILD_TESTING=ON -DRMG_BUILD_DOCS=OFF ..
# make
# make install
#
# - name: Setup and start xvfb (enables Geant4 visualization)
# run: |
# Xvfb :99 -screen 0 1920x1080x24 &
#
# - name: Run full test suite
# if: ${{ matrix.container_version != 'slim' }}
# env:
# DISPLAY: :99
# run: |
# cd build
# ctest --output-on-failure
#
# - name: Upload test suite outputs to GitHub
# if: ${{ always() && matrix.container_version != 'slim' }}
# uses: actions/upload-artifact@v4
# with:
# name: test-output-${{ matrix.container_version }}
# # artifacts must have a ".output*" extension
# path: build/tests/**/*.output*.*
#
# - name: Run minimal test suite
# if: ${{ matrix.container_version == 'slim' }}
# env:
# DISPLAY: :99
# run: |
# cd build
# ctest --output-on-failure --label-exclude 'extra|vis'
#
# - name: Compare checked-in doc dump with current result
# if: ${{ matrix.container_version != 'slim' }}
# run: |
# cd build
# cp ../docs/rmg-commands.md ../docs/rmg-commands.md.bak
# make remage-doc-dump
# diff ../docs/rmg-commands.md ../docs/rmg-commands.md.bak
test_on_mac:
name: Test on macOS
runs-on: macos-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: "geant4-env"
auto-activate-base: "false"
channels: conda-forge
channel-priority: "strict"
conda-remove-defaults: "true"
- name: Install Geant4 and native dependencies
run: |
# native dependencies for pyg4ometry
brew install opencascade cgal gmp mpfr boost
# conda create --override-channels -c conda-forge --name geant4-env
# conda activate geant4-env
conda install conda-forge::geant4
echo "CMAKE_PREFIX_PATH=$CONDA_PREFIX" >> $GITHUB_ENV
- name: Build project
run: |
# conda activate geant4-env
python --version
mkdir build .local
cd build
cmake -DCMAKE_INSTALL_PREFIX=../local -DRMG_BUILD_EXAMPLES=1 -DBUILD_TESTING=ON -DRMG_BUILD_DOCS=OFF ..
make
make install
- name: Run minimal test suite
run: |
# conda activate geant4-env
cd build
ctest --output-on-failure --label-exclude 'extra|vis'
# vim: expandtab tabstop=2 shiftwidth=2