fix: finish meson
porting and remove Makefiles and CMake files
#94
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: | |
build: | |
name: Build | |
strategy: | |
fail-fast: false | |
matrix: | |
runner: [ ubuntu-latest, macos-latest ] | |
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 \ | |
-D test_fortran=true | |
- 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.runner }} | |
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 ] | |
strategy: | |
fail-fast: false | |
matrix: | |
runner: [ ubuntu-latest, macos-latest ] | |
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.runner }} | |
- 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 | |
working-directory: build | |
- name: upload test logs | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-${{ matrix.runner }} | |
retention-days: 5 | |
path: build/meson-logs/* |