Skip to content

Commit

Permalink
WIP: pathogen-repo-build: unbuffer nextstrain build output
Browse files Browse the repository at this point in the history
  • Loading branch information
joverlee521 committed Mar 12, 2024
1 parent 5cd0ba1 commit 0f43b8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pathogen-repo-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,16 @@ jobs:
with:
cli-version: ">=7.4.0"
runtime: ${{ inputs.runtime }}
- name: Install expect for unbuffer
run: sudo apt-get install expect
- name: Run build via ${{ inputs.runtime }}
env:
NEXTSTRAIN_BUILD_COMMAND: ${{ inputs.run }}
run: |
# shellcheck disable=SC2154
set -x
eval "$NEXTSTRAIN_BUILD_COMMAND" |& tee build.log
eval "unbuffer $NEXTSTRAIN_BUILD_COMMAND" |& tee build.log
# Attempt to get the AWS Batch ID even if the run build command failed
# as long as the runtime is `aws-batch` and the `build.log` file exists
- if: ${{ always() && inputs.runtime == 'aws-batch' && hashFiles('build.log') != '' }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pathogen-repo-build.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,17 @@ jobs:
cli-version: ">=7.4.0"
runtime: ${{ inputs.runtime }}

- name: Install expect for unbuffer
run: sudo apt-get install expect

- name: Run build via ${{ inputs.runtime }}
env:
NEXTSTRAIN_BUILD_COMMAND: ${{ inputs.run }}
run: |
# shellcheck disable=SC2154
set -x

eval "$NEXTSTRAIN_BUILD_COMMAND" |& tee build.log
eval "unbuffer $NEXTSTRAIN_BUILD_COMMAND" |& tee build.log

# Attempt to get the AWS Batch ID even if the run build command failed
# as long as the runtime is `aws-batch` and the `build.log` file exists
Expand Down

0 comments on commit 0f43b8f

Please sign in to comment.