feat: sanitizer tests #121
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: HIPO CI | |
on: | |
pull_request: | |
push: | |
branches: [ master ] | |
tags: [ '*' ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
setup: | |
name: Setup | |
runs-on: ubuntu-latest | |
outputs: | |
job_matrix: ${{ steps.matrix.outputs.job_matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup job matrix | |
id: matrix | |
run: echo job_matrix=$(jq . -c .github/job_matrix.json) | tee -a $GITHUB_OUTPUT | |
build: | |
name: Build | |
needs: [ setup ] | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.setup.outputs.job_matrix) }} | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install dependencies | |
run: .github/install-dependencies.sh ${{ matrix.runner }} | |
- name: meson setup | |
run: | | |
meson setup build . \ | |
--prefix=`pwd`/install \ | |
-D install_examples=true \ | |
-D test_file=`pwd`/test_data.hipo \ | |
${{ matrix.opts }} | |
- run: meson install | |
working-directory: build | |
- name: dump build log | |
if: always() | |
run: cat build/meson-logs/meson-log.txt | |
- run: tree install | |
- name: tar | |
run: tar cavf build{.tar.zst,} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ matrix.id }} | |
retention-days: 5 | |
path: build.tar.zst | |
download_test_data: | |
name: Download test data | |
runs-on: ubuntu-latest | |
env: | |
type: physics | |
steps: | |
- uses: actions/cache@v4 | |
id: cache | |
with: | |
key: test_data | |
path: test_data.hipo | |
lookup-only: true | |
- name: download | |
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | |
run: | | |
# FIXME: it would be better to generate our own HIPO file here, rather than assuming this file will continue to exist | |
wget -nv --no-check-certificate http://clasweb.jlab.org/clas12offline/distribution/clas12-timeline/validation_files_${{ env.type }}.tar.zst | |
tar xvf validation_files_${{ env.type }}.tar.zst | |
mv -v $(find validation_files -type f -name "*.hipo" | head -n1) test_data.hipo | |
test: | |
name: Test | |
needs: [ download_test_data, build, setup ] | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.setup.outputs.job_matrix) }} | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install dependencies | |
run: .github/install-dependencies.sh ${{ matrix.runner }} | |
- name: download build | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-${{ matrix.id }} | |
- name: untar artifacts | |
run: ls *.tar.zst | xargs -I{} tar xvf {} | |
- name: get test data | |
uses: actions/cache/restore@v4 | |
with: | |
key: test_data | |
path: test_data.hipo | |
- run: meson test --print-errorlogs --max-lines=10000 | |
working-directory: build | |
- name: upload test logs | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-logs-${{ matrix.id }} | |
retention-days: 5 | |
path: build/meson-logs/testlog.txt |