-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add CI STEP geometry export test workflow #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a2e0d36
ci: add STEP export workflow test
Copilot 4c38eb1
ci: scope token permissions in step workflow
Copilot 4da34f2
ci: fix env context in reusable workflow call
wdconinc d5b6849
fix: better detector config list
wdconinc 6746636
fix: space
wdconinc 0b3105b
fix: permissions
wdconinc 17bf990
fix: don't set DETECTOR_CACHE
wdconinc 7435877
fix: set -o pipefail
wdconinc 1a40bfe
fix: no need for dtor drop anymore
wdconinc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| 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 | ||
|
wdconinc marked this conversation as resolved.
Dismissed
|
||
| - uses: eic/run-cvmfs-osg-eic-shell@main | ||
|
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} | ||
|
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') | ||
|
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 | ||
|
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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.