-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor
pathogen-repo-ci
to be smarter [#89]
Also update nextstrain runtime setup step to use "modern" sidecar version, which has the side effect/benefit of allowing the `run-nexstrain-build` action to also be invoked from the sidecar instead of pinned to `master` or some other version.
- Loading branch information
Showing
3 changed files
with
88 additions
and
40 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: run-nextstrain-build-step | ||
description: >- | ||
Runs a single `nextstrain build` command in a given sub-directory of | ||
a pathogen repo. Must be provided with the name of the | ||
sub-directory. | ||
inputs: | ||
step: | ||
description: The name of the sub-directory to run the build from | ||
type: string | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- id: run-build | ||
env: | ||
STEP: ${{ inputs.step }} | ||
run: | | ||
if [[ -f nextstrain-pathogen.yaml && -f $STEP/Snakefile && -f $STEP/build-configs/ci/config.yaml ]]; then | ||
nextstrain build $STEP --configfile build-configs/ci/config.yaml | ||
else | ||
echo "Skipping $STEP build due to one or more missing files." | ||
for i in nextstrain-pathogen.yaml $STEP/Snakefile $STEP/build-configs/ci/config.yaml; do | ||
! test -f $i && echo missing $i | ||
done | ||
fi | ||
shell: bash | ||
|
||
- id: upload-artifact | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{inputs.step }}-outputs-${{ matrix.runtime }} | ||
path: | | ||
${{ inputs.step }}/results/ | ||
${{ inputs.step }}/benchmarks/ | ||
${{ inputs.step }}/logs/ | ||
${{ inputs.step }}/.snakemake/log/ |