From b6554d86108f7d5a6f183574bccb44aa76d87170 Mon Sep 17 00:00:00 2001 From: Jacob Oursland Date: Mon, 18 Dec 2023 09:34:05 -0800 Subject: [PATCH] CI: add pipefail to additional workflow actions. --- .github/workflows/actions/linux/configure/action.yml | 1 + .github/workflows/actions/linux/install/action.yml | 1 + .../workflows/actions/runCPPTests/runSingleTest/action.yml | 4 +++- .github/workflows/actions/runPythonTests/action.yml | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/actions/linux/configure/action.yml b/.github/workflows/actions/linux/configure/action.yml index 2b33ef3d0c..10ccba39e7 100644 --- a/.github/workflows/actions/linux/configure/action.yml +++ b/.github/workflows/actions/linux/configure/action.yml @@ -52,6 +52,7 @@ runs: id: configure shell: bash -l {0} run: | + set -o pipefail (stdbuf -oL -eL cmake -S ${{ inputs.sourcedir }} -B ${{ inputs.builddir }} -D CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE ${{inputs.extraParameters }}) \ 2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }} - name: Write report diff --git a/.github/workflows/actions/linux/install/action.yml b/.github/workflows/actions/linux/install/action.yml index 05bb57252f..3d2a21fed5 100644 --- a/.github/workflows/actions/linux/install/action.yml +++ b/.github/workflows/actions/linux/install/action.yml @@ -48,6 +48,7 @@ runs: id: install shell: bash -l {0} run: | + set -o pipefail (stdbuf -oL -eL sudo cmake --install ${{ inputs.builddir }} ${{ inputs.extraParameters }}) \ 2> >(tee -a ${{ inputs.errorFile }}) | tee -a ${{ inputs.logFile }} - name: Write report diff --git a/.github/workflows/actions/runCPPTests/runSingleTest/action.yml b/.github/workflows/actions/runCPPTests/runSingleTest/action.yml index 3b1736c612..1310048959 100644 --- a/.github/workflows/actions/runCPPTests/runSingleTest/action.yml +++ b/.github/workflows/actions/runCPPTests/runSingleTest/action.yml @@ -45,7 +45,9 @@ runs: steps: - name: Run C++ tests shell: bash -l {0} - run: ${{ inputs.testCommand }} | tee -a ${{ inputs.testLogFile }} + run: | + set -o pipefail + ${{ inputs.testCommand }} | tee -a ${{ inputs.testLogFile }} - name: Parse test results if: always() id: report diff --git a/.github/workflows/actions/runPythonTests/action.yml b/.github/workflows/actions/runPythonTests/action.yml index dca94e48fe..9b2df3a947 100644 --- a/.github/workflows/actions/runPythonTests/action.yml +++ b/.github/workflows/actions/runPythonTests/action.yml @@ -45,6 +45,7 @@ runs: id: runTests shell: bash -l {0} run: | + set -o pipefail ${{ inputs.testCommand }} | sed -Ee "/[[:blank:]]*\([[:digit:]]{1,3} %\)[[:blank:]]*/d" | tee -a ${{ inputs.logFile }} - name: Write report shell: bash -l {0}