From 0f43b8f8819849c76021ae2e10f1257b7428d662 Mon Sep 17 00:00:00 2001 From: Jover Lee Date: Tue, 12 Mar 2024 11:07:25 -0700 Subject: [PATCH] WIP: pathogen-repo-build: unbuffer nextstrain build output --- .github/workflows/pathogen-repo-build.yaml | 4 +++- .github/workflows/pathogen-repo-build.yaml.in | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pathogen-repo-build.yaml b/.github/workflows/pathogen-repo-build.yaml index 1872d55..c6b2da1 100644 --- a/.github/workflows/pathogen-repo-build.yaml +++ b/.github/workflows/pathogen-repo-build.yaml @@ -267,6 +267,8 @@ 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 }} @@ -274,7 +276,7 @@ jobs: # 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') != '' }} diff --git a/.github/workflows/pathogen-repo-build.yaml.in b/.github/workflows/pathogen-repo-build.yaml.in index 5157cdf..54f548a 100644 --- a/.github/workflows/pathogen-repo-build.yaml.in +++ b/.github/workflows/pathogen-repo-build.yaml.in @@ -233,6 +233,9 @@ 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 }} @@ -240,7 +243,7 @@ jobs: # 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