Skip to content

Commit

Permalink
only build harpy if changes detected
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimens committed May 7, 2024
1 parent e68600d commit 486077a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ simreads:
- 'extractReads.cpp'
- 'src/harpy/globalscripts/10xtoHaplotag.py'
- 'src/harpy/scripts/LRSIMharpy.pl'
extras:
other:
- '.github/workflows/tests.yml'
- 'src/harpy/stitchparams.py'
- 'src/harpy/popgroup.py'
57 changes: 41 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
phase: ${{ steps.filter.outputs.phase }}
simvars: ${{ steps.filter.outputs.simvars }}
simreads: ${{ steps.filter.outputs.simreads }}
other: ${{ steps.filter.outputs.other }}
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -51,7 +52,31 @@ jobs:
filters: .github/filters.yml

pkgbuild:
name: harpy installation
name: build harpy
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: setup mamba
uses: mamba-org/setup-micromamba@v1
with:
init-shell: bash
generate-run-shell: true
environment-file: resources/harpy.yaml
cache-environment: true
post-cleanup: 'all'
- name: Install harpy
shell: micromamba-shell {0}
run: |
python3 -m pip install --upgrade build && python3 -m build
pip install dist/*.whl
resources/buildforCI.sh
containerize:
name: cache container
if: ${{ needs.changes.outputs.demux == 'true' || needs.changes.outputs.preflight == 'true' || needs.changes.outputs.qc == 'true' || needs.changes.outputs.bwa == 'true' || needs.changes.outputs.ema == 'true' || needs.changes.outputs.minimap == 'true' || needs.changes.outputs.mpileup == 'true' || needs.changes.outputs.freebayes == 'true' || needs.changes.outputs.leviathan == 'true' || needs.changes.outputs.naibr == 'true' || needs.changes.outputs.impute == 'true' || needs.changes.outputs.phase == 'true' || needs.changes.outputs.simvars == 'true' || needs.changes.outputs.simreads == 'true' || needs.changes.outputs.other == 'true' }}
runs-on: ubuntu-latest
steps:
- name: checkout
Expand Down Expand Up @@ -86,7 +111,7 @@ jobs:

dmux_gen1:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.demux == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.demux == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: demux gen1
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -121,7 +146,7 @@ jobs:

preflight:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.preflight == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.preflight == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: preflight
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -163,7 +188,7 @@ jobs:

qc:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.qc == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.qc == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: qc
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -205,7 +230,7 @@ jobs:

bwa:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.bwa == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.bwa == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: align BWA
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -243,7 +268,7 @@ jobs:

ema:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.ema == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.ema == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: align EMA
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -281,7 +306,7 @@ jobs:

minimap:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.minimap == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.minimap == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: align minimap
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -319,7 +344,7 @@ jobs:

mpileup:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.mpileup == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.mpileup == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: mpileup
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -360,7 +385,7 @@ jobs:

freebayes:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.freebayes == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.freebayes == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: freebayes
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -401,7 +426,7 @@ jobs:

impute:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.impute == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.impute == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: impute
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -443,7 +468,7 @@ jobs:

phase:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.phase == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.phase == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: phase
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -489,7 +514,7 @@ jobs:

leviathan:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.leviathan == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.leviathan == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: sv leviathan
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -532,7 +557,7 @@ jobs:

naibr:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.naibr == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.naibr == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: sv naibr
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -584,7 +609,7 @@ jobs:

simulate_variants:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.simvars == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.simvars == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: simulate variants
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -642,7 +667,7 @@ jobs:
simulate_linkedreads:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.simreads == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.simreads == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: simulate linkedreads
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -680,7 +705,7 @@ jobs:

extras:
needs: [changes, pkgbuild]
if: ${{ needs.changes.outputs.extras == 'true' && needs.pkgbuild.result == 'success' }}
if: ${{ needs.changes.outputs.other == 'true' && needs.pkgbuild.result == 'success' && needs.containerize.result == 'success' }}
name: harpy extras
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 486077a

Please sign in to comment.