Skip to content

os and g4 version

os and g4 version #32

Workflow file for this run

name: build mac geant4
on:
push:
tags:
- 'v*'
jobs:
build-geant4:
name: Build geant4
runs-on: ${{ matrix.os }}
permissions:
contents: write
pull-requests: write
repository-projects: write
checks: write
strategy:
fail-fast: false
matrix:
geant4-version: ["v10.7.4", "v11.0.4", "v11.1.3", "v11.2.2"]
os: [macOS-13, macOS-14]
steps:
- uses: actions/checkout@v4
# - name: Install brew dependencies on MacOS
# if: runner.os == 'macOS'
# run: .github/bin/install-deps-macos.sh
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Build Geant4
shell: bash
run: |
mkdir geant4-${{ matrix.geant4-version }}
tar vzcf geant4-{{ matrix.os }}-${{ matrix.geant4-version }}.tgz geant4-${{ matrix.geant4-version }}
# git clone https://gitlab.cern.ch/geant4/geant4.git
# cd geant4
# git checkout ${{ matrix.geant4-version }}
# cd ../
# mkdir geant4-build
# mkdir geant4-${{ matrix.geant4-version }}
# cd geant4-build
# cmake -DCMAKE_INSTALL_PREFIX=../geant4-${{ matrix.geant4-version }} ../geant4 -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_GDML=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_SYSTEM_CLHEP=ON -DGEANT4_USE_RAYTRACER_X11=ON
# make -j${{ steps.cpu-cores.outputs.count }}
# make install
# cd ../
# tar vzcf geant4-{{ matrix.os }}-${{ matrix.geant4-version }}.tgz geant4-${{ matrix.geant4-version }}
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
name: Release ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: false
allowUpdates: true
artifacts: ./geant4-{{ matrix.os }}-${{ matrix.geant4-version }}.tgz