Skip to content

Commit

Permalink
Add CERN-hosted runner workflow for building and running execs (#565)
Browse files Browse the repository at this point in the history
Add a workflow triggering on:

* pull requests to master
* push to master and to v* tags
* manually

The workflow runs on a CERN-hosted runner with access to /cvmfs.

Container image is at registry.cern.ch/ship/gha-runner:latest.

The triggering branch is used to build and run the sim/reco/ana pipeline.
Produced .root file are uploaded on success as artifacts and can be downloaded and inspected manually.
  • Loading branch information
egamberini authored Nov 22, 2024
1 parent 85dfb34 commit b946da6
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on:
pull_request:
branches:
- master
push:
branches:
- master
tags:
- v*
workflow_dispatch:

jobs:
build-run:
runs-on: self-hosted

container:
image: registry.cern.ch/ship/gha-runner:latest
volumes:
- /cvmfs/ship.cern.ch:/cvmfs/ship.cern.ch

steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: FairShip

- name: Source and Build
run: |
source /cvmfs/ship.cern.ch/24.10/setUp.sh
aliBuild build FairShip --always-prefer-system --config-dir $SHIPDIST --defaults release --jobs 4 --debug
- name: Run Sim
run: |
source /cvmfs/ship.cern.ch/24.10/setUp.sh
eval `alienv load FairShip/latest`
python $FAIRSHIP/macro/run_simScript.py --test
- name: Run Reco
run: |
source /cvmfs/ship.cern.ch/24.10/setUp.sh
eval `alienv load FairShip/latest`
python $FAIRSHIP/macro/ShipReco.py -f ship.conical.Pythia8-TGeant4.root -g geofile_full.conical.Pythia8-TGeant4.root
continue-on-error: true # workaround to ignore segfaul on exit

- name: Run Ana
run: |
source /cvmfs/ship.cern.ch/24.10/setUp.sh
eval `alienv load FairShip/latest`
python -i $FAIRSHIP/macro/ShipAna.py -f ship.conical.Pythia8-TGeant4_rec.root -g geofile_full.conical.Pythia8-TGeant4.root
- name: Upload .root artifacts
uses: actions/upload-artifact@v4
with:
name: root-files
path: |
*.root

0 comments on commit b946da6

Please sign in to comment.