doc: tips for chefs' usage #603
Workflow file for this run
This file contains 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
name: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash | |
env: | |
dataset: ci_test | |
validation_single_run: '011329' | |
validation_run_group: B # FIXME: not actually used; see comments mentioning this variable below | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# build | |
############################################################################# | |
build_timelines: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: zulu | |
- name: build | |
run: mvn package | |
- name: tar # to preserve any permissions | |
run: | | |
tar czvf build_detectors.tar.gz detectors/target | |
tar czvf build_monitoring.tar.gz monitoring/target | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build_timelines | |
retention-days: 1 | |
path: build*.tar.gz | |
build_coatjava: | |
runs-on: ubuntu-latest | |
steps: | |
- name: setup java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: zulu | |
- name: checkout coatjava | |
uses: actions/checkout@v4 | |
with: | |
repository: JeffersonLab/coatjava | |
ref: development | |
- name: build coatjava | |
run: ./build-coatjava.sh | |
- name: tree | |
run: tree | |
- name: tar | |
run: tar czvf build_coatjava.tar.gz coatjava | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build_coatjava | |
retention-days: 1 | |
path: build*.tar.gz | |
# download test data | |
############################################################################# | |
download_test_data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: download | |
run: wget --no-check-certificate http://clasweb.jlab.org/clas12offline/distribution/clas12-timeline/validation_files.tar.gz | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: validation_files | |
retention-days: 1 | |
path: validation_files.tar.gz | |
# monitoring | |
############################################################################# | |
run_monitoring: | |
needs: | |
- build_timelines | |
- build_coatjava | |
- download_test_data | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
type: | |
- detectors | |
- physics | |
steps: | |
- name: setup java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: zulu | |
- name: setup groovy | |
uses: wtfjoke/setup-groovy@v2 | |
with: | |
groovy-version: 4.x | |
- name: groovy version | |
run: groovy --version | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: validation_files | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: build_* | |
merge-multiple: true | |
- name: untar | |
run: ls *.tar.gz | xargs -I{} tar xzvf {} | |
- name: tree | |
run: tree | |
- name: run monitoring | |
run: bin/run-monitoring.sh -d ${{env.dataset}} --findhipo --series --focus-${{matrix.type}} validation_files | |
- name: tree slurm | |
run: tree slurm | |
- name: tree outfiles | |
run: tree outfiles | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: slurm_${{ matrix.type }} | |
retention-days: 1 | |
path: slurm | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: outfiles_monitoring_${{ matrix.type }} | |
retention-days: 14 | |
path: outfiles | |
test_swifjob: | |
needs: | |
- build_timelines | |
- build_coatjava | |
- download_test_data | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
type: | |
- detectors | |
- physics | |
steps: | |
- name: setup java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: zulu | |
- name: setup groovy | |
uses: wtfjoke/setup-groovy@v2 | |
with: | |
groovy-version: 4.x | |
- name: groovy version | |
run: groovy --version | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: validation_files | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: build_* | |
merge-multiple: true | |
- name: untar | |
run: ls *.tar.gz | xargs -I{} tar xzvf {} | |
- name: tree | |
run: tree | |
- name: test monitoring swifjob | |
run: bin/test-swifjob.sh validation_files/${{env.validation_single_run}} runner --focus-${{matrix.type}} | |
- name: tree runner | |
run: tree runner | |
# timeline production | |
############################################################################# | |
run_timelines: | |
needs: | |
- run_monitoring | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
type: | |
- detectors | |
- physics | |
include: | |
- { type: detectors, args: -n 2 -r B --skip-mya } # FIXME: prefer `-r ${{env.validation_run_group}}`, but that's invalid syntax for matrix arg | |
- { type: physics, args: '' } | |
steps: | |
- name: setup java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: zulu | |
- name: setup groovy | |
uses: wtfjoke/setup-groovy@v2 | |
with: | |
groovy-version: 4.x | |
- name: groovy version | |
run: groovy --version | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: outfiles_* | |
merge-multiple: true | |
path: outfiles | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: build_* | |
merge-multiple: true | |
- name: untar | |
run: ls *.tar.gz | xargs -I{} tar xzvf {} | |
- name: tree | |
run: tree | |
- name: run timelines | |
run: bin/run-${{matrix.type}}-timelines.sh -d ${{env.dataset}} ${{matrix.args}} | |
- name: tree outfiles | |
run: tree outfiles | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: outfiles_timelines_${{ matrix.type }} | |
retention-days: 14 | |
path: outfiles | |
# timeline deployment | |
############################################################################# | |
deploy_timelines: | |
name: Deployment | |
needs: | |
- run_timelines | |
runs-on: ubuntu-latest | |
steps: | |
- name: setup groovy | |
uses: wtfjoke/setup-groovy@v2 | |
with: | |
groovy-version: 4.x | |
- name: groovy version | |
run: groovy --version | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: outfiles_* | |
merge-multiple: true | |
path: outfiles | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: build_* | |
merge-multiple: true | |
- name: untar | |
run: ls *.tar.gz | xargs -I{} tar xzvf {} | |
- name: tree outfiles | |
run: | | |
rm -r outfiles/${{ env.dataset }}/log | |
echo "# Output File Tree" >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
tree outfiles | xargs -0 -I{} echo {} >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
- name: deploy | |
run: bin/deploy-timelines.sh -d ${{env.dataset}} -c -t web | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: web | |
retention-days: 14 | |
path: web |