Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/convert-to-step.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Convert to STEP

on:
workflow_call:
inputs:
detector_configs:
required: true
type: string
install_artifact_name:
required: true
type: string
organization:
required: false
type: string
default: eicweb
platform-release:
required: false
type: string
default: eic_xl:nightly
epic_setup_script:
required: false
type: string
default: /opt/detector/epic-main/bin/thisepic.sh

permissions:
contents: read
Comment thread
wdconinc marked this conversation as resolved.
actions: read

jobs:
convert-to-step:
runs-on: ubuntu-latest
strategy:
matrix:
detector_config: ${{fromJson(inputs.detector_configs)}}
steps:
- uses: actions/checkout@v6
- uses: actions/download-artifact@v8
with:
name: ${{ inputs.install_artifact_name }}
path: .
- name: Uncompress install artifact
run: tar -xaf install.tar.zst
- uses: cvmfs-contrib/github-action-cvmfs@v5
Comment thread
wdconinc marked this conversation as resolved.
Dismissed
- uses: eic/run-cvmfs-osg-eic-shell@main
Comment thread
wdconinc marked this conversation as resolved.
Dismissed
with:
organization: "${{ inputs.organization }}"
platform-release: "${{ inputs.platform-release }}"
setup: ${{ inputs.epic_setup_script }}
run: |
export PATH=$PWD/install/bin${PATH:+:$PATH}
export LD_LIBRARY_PATH=$PWD/install/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
Comment thread
wdconinc marked this conversation as resolved.
# For some reason npdet_to_step really wants a space in IFS
IFS=$' \n\t'
# First get all detectors (except world)
declare -A detectors
while read d ; do detectors[$d]='-l 3' ; done <<< $(npdet_to_step list $DETECTOR_PATH/${{matrix.detector_config}}.xml | sed '/world/d;s/.*(vol: \(.*\)).*/\1/g')
Comment thread
wdconinc marked this conversation as resolved.
# Then tweak the levels (default is 1)
detectors[EcalBarrelImaging]='-l 4'
detectors[HcalBarrel]='-l 1'
detectors[LFHCAL]='-l 2'
detectors[OuterBarrelMPGDSubAssembly]='-l 4'
# Export to one STEP file
set -o pipefail
npdet_to_step $(for d in ${!detectors[@]} ; do echo part ${detectors[$d]} $d ; done) -o ${{matrix.detector_config}} $DETECTOR_PATH/${{matrix.detector_config}}.xml
test -s ${{matrix.detector_config}}.stp
Comment thread
wdconinc marked this conversation as resolved.
- uses: actions/upload-artifact@v7
with:
name: ${{matrix.detector_config}}.stp
path: ${{matrix.detector_config}}.stp
if-no-files-found: error
10 changes: 10 additions & 0 deletions .github/workflows/linux-eic-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,16 @@ jobs:
sim_dis_${{ matrix.beam }}_minQ2=${{ matrix.minq2 }}_${{ matrix.detector_config }}/
if-no-files-found: error

convert-to-step:
needs:
- build
uses: ./.github/workflows/convert-to-step.yml
with:
detector_configs: '["epic_craterlake_no_bhcal","epic_imaging_only","epic_drich_only","epic_dirc_only","epic_craterlake_tracking_only","epic_ip6"]'
install_artifact_name: install-g++-eic-shell-Release-${{ inputs.platform || 'eic_xl' }}-${{ inputs.release || 'nightly' }}
Comment thread
wdconinc marked this conversation as resolved.
organization: "${{ inputs.organization || 'eicweb' }}"
platform-release: "${{ inputs.platform || 'eic_xl' }}:${{ inputs.release || 'nightly' }}"

merge-npsim-capybara:
runs-on: ubuntu-latest
needs:
Expand Down