Skip to content

feat(qa): QA of RG-A Spring 2018 6.4 GeV data #1812

feat(qa): QA of RG-A Spring 2018 6.4 GeV data

feat(qa): QA of RG-A Spring 2018 6.4 GeV data #1812

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- main
defaults:
run:
shell: bash
env:
dataset: ci_test
RCDB_CONNECTION: mysql://rcdb@clasdb.jlab.org/rcdb
CCDB_CONNECTION: mysql://clas12reader@clasdb.jlab.org/clas12
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# build
#############################################################################
build_timeline:
runs-on: ubuntu-latest
container:
image: codecr.jlab.org/hallb/clas12/container-forge/base:latest
options: --user root
steps:
- uses: actions/checkout@v6
- name: build
run: mvn install
- run: bin/qtl --version
- name: tar # to preserve any permissions
run: |
tar cavf build_timeline.tar.zst target
- uses: actions/upload-artifact@v6
with:
name: build_timeline
retention-days: 1
path: build_timeline.tar.zst
# download test data
#############################################################################
download_test_data:
runs-on: ubuntu-latest
# NOTE: using Ubuntu runner, rather than a `container-forge` image, since it's much faster for cache hits
strategy:
fail-fast: true
matrix:
type: [ detectors, physics ]
include:
- { type: detectors, schema: mon }
- { type: physics, schema: dst }
steps:
- uses: actions/cache@v5
id: cache
with:
key: validation_files_lfs_${{ matrix.type }}
path: validation_files.tar.zst
lookup-only: true
- name: download
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
GIT_LFS_SKIP_SMUDGE=1 git clone https://code.jlab.org/hallb/clas12/validation-data.git
cd validation-data
git lfs install --skip-smudge
git config lfs.fetchinclude "recon/${{ matrix.schema }}/validation_files.tar.zst"
git lfs pull
mv -v recon/${{ matrix.schema }}/validation_files.tar.zst $GITHUB_WORKSPACE/
# histogramming
#############################################################################
run_histogram:
needs:
- build_timeline
- download_test_data
runs-on: ubuntu-latest
container:
image: codecr.jlab.org/hallb/clas12/container-forge/base:latest
options: --user root
strategy:
fail-fast: false
matrix:
type: [ detectors, physics ]
steps:
- uses: actions/checkout@v6
- uses: actions/cache/restore@v5
with:
key: validation_files_lfs_${{ matrix.type }}
path: validation_files.tar.zst
- name: download timeline build
uses: actions/download-artifact@v7
with:
name: build_timeline
- name: untar
run: ls *.tar.zst | xargs -I{} tar xavf {}
- run: tree
- name: qtl histogram
run: |
bin/qtl histogram \
-d ${{env.dataset}} \
--findhipo \
--series \
--focus-${{matrix.type}} \
validation_files
- run: tree slurm
- run: tree outfiles
- uses: actions/upload-artifact@v6
with:
name: slurm_${{ matrix.type }}
retention-days: 1
path: slurm
- uses: actions/upload-artifact@v6
with:
name: outfiles_histogram_${{ matrix.type }}
retention-days: 14
path: outfiles
test_swifjob:
needs:
- build_timeline
- download_test_data
runs-on: ubuntu-latest
container:
image: codecr.jlab.org/hallb/clas12/container-forge/base:latest
options: --user root
strategy:
fail-fast: false
matrix:
type: [ detectors, physics ]
steps:
- uses: actions/checkout@v6
- uses: actions/cache/restore@v5
with:
key: validation_files_lfs_${{ matrix.type }}
path: validation_files.tar.zst
- name: download timeline build
uses: actions/download-artifact@v7
with:
name: build_timeline
- name: untar
run: ls *.tar.zst | xargs -I{} tar xavf {}
- run: tree
- name: test swifjob
run: |
single_rundir=$(find validation_files -mindepth 1 -maxdepth 1 -type d | head -n1)
echo "single_rundir = $single_rundir"
util/test-swifjob.sh $single_rundir runner --focus-${{ matrix.type }}
- run: tree runner
# timeline production
#############################################################################
run_analysis:
needs:
- run_histogram
runs-on: ubuntu-latest
container:
image: codecr.jlab.org/hallb/clas12/container-forge/base:latest
options: --user root
strategy:
fail-fast: false
matrix:
type: [ detectors, physics ]
include:
- { type: detectors, qtl_cmd: 'bin/qtl analysis', args: '-j 4 --skip-mya' }
- { type: physics, qtl_cmd: 'bin/qtl physics', args: '' }
steps:
- uses: actions/checkout@v6
- name: download outfiles
uses: actions/download-artifact@v7
with:
pattern: outfiles_*
merge-multiple: true
path: outfiles
- name: download timeline build
uses: actions/download-artifact@v7
with:
name: build_timeline
- name: untar
run: ls *.tar.zst | xargs -I{} tar xavf {}
- run: tree
- name: qtl analysis
run: |
${{matrix.qtl_cmd}} \
-d ${{env.dataset}} \
-p web \
--custom-pub \
${{matrix.args}}
- run: tree outfiles
- name: summarize
run: |
echo "# Output File Tree" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
tree web | xargs -0 -I{} echo {} >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v6
with:
name: outfiles_timelines_${{ matrix.type }}
retention-days: 14
path: outfiles
- uses: actions/upload-artifact@v6
with:
name: web_timelines_${{ matrix.type }}
retention-days: 14
path: web