Nightly #30
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: Nightly | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
release: | |
types: [published] | |
schedule: | |
- cron: '0 0 * * *' | |
env: | |
GITHUB_USERNAME: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ github.token }} | |
RUN_CMD: "./rebar" | |
jobs: | |
# --------------------------------------------------------------------------- | |
# Latest is a model/algorithm test, only needs the linux version compiled | |
compile: | |
uses: ./.github/workflows/compile.yaml | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Linux | |
- arch: x86_64-unknown-linux-musl | |
os: ubuntu-latest | |
binary: rebar | |
with: | |
arch: ${{ matrix.arch }} | |
os: ${{ matrix.os }} | |
binary: ${{ matrix.binary }} | |
# --------------------------------------------------------------------------- | |
latest: | |
needs: compile | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Linux | |
- arch: x86_64-unknown-linux-musl | |
os: ubuntu-latest | |
binary: rebar | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: download binary from build | |
uses: actions/download-artifact@v3 | |
with: | |
name: rebar-${{ matrix.arch }} | |
path: target/${{ matrix.arch }}/release | |
- name: install | |
run: | | |
chmod +x target/${{ matrix.arch }}/release/${{ matrix.binary }} | |
cp target/${{ matrix.arch }}/release/${{ matrix.binary }} . | |
${{ env.RUN_CMD }} --help | |
- name: dataset download | |
run: | | |
${{ env.RUN_CMD }} dataset download --name sars-cov-2 --tag nightly --output-dir dataset/sars-cov-2/nightly | |
- name: run | |
run: | | |
${{ env.RUN_CMD }} run --dataset-dir dataset/sars-cov-2/nightly --output-dir output/sars-cov-2/nightly/validate --populations "*" --threads 2 | |
- name: plot | |
run: | | |
${{ env.RUN_CMD }} plot --annotations dataset/sars-cov-2/nightly/annotations.tsv --run-dir output/sars-cov-2/nightly/validate | |
- name: validate | |
run: | | |
if [[ $(grep "fail" output/sars-cov-2/nightly/validate/linelist.tsv) ]]; then exit 1; fi | |
- name: upload | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: validate-${{ matrix.arch }} | |
path: output/sars-cov-2/nightly/validate | |
if-no-files-found: error | |
retention-days: 7 |