From bf48977b96e8fa6a06f2055c60d8b2a308aa002e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Fri, 12 Jan 2024 16:01:35 -0400 Subject: [PATCH] ci: use job outputs to append patches --- .github/workflows/regression-tests.yml | 19 +++++++++++++++---- regression-tests/run-tests.sh | 4 ++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression-tests.yml b/.github/workflows/regression-tests.yml index 3aefccf323..fea9c646f1 100644 --- a/.github/workflows/regression-tests.yml +++ b/.github/workflows/regression-tests.yml @@ -23,6 +23,8 @@ jobs: compiler: clang++ - os: windows-latest compiler: cl.exe + outputs: + ${{ matrix.compiler }}_patch: ${{ steps.outputs.patch }} steps: - name: Checkout repo uses: actions/checkout@v3 @@ -32,7 +34,6 @@ jobs: run: | cd regression-tests bash run-tests.sh -c ${{ matrix.compiler }} - continue-on-error: true - name: Run regression tests - Windows version if: matrix.os == 'windows-latest' @@ -42,11 +43,21 @@ jobs: cd regression-tests && ^ bash run-tests.sh -c ${{ matrix.compiler }} shell: cmd - continue-on-error: true + patch: + name: Patch + runs-on: ubuntu-latest + needs: regression-tests + steps: + - name: Append patches + run: | + echo "${{ needs.regression-tests.outputs.g++-10_patch }}" > patch.diff + echo "${{ needs.regression-tests.outputs.g++-13_patch }}" >> patch.diff + echo "${{ needs.regression-tests.outputs.clang++_patch }}" >> patch.diff + echo "${{ needs.regression-tests.outputs.cl.exe_patch }}" >> patch.diff - name: Upload patch uses: actions/upload-artifact@v4 with: - name: ${{ matrix.compiler }}-patch.diff - path: regression-tests/${{ matrix.compiler }}-patch.diff + name: patch.diff + path: patch.diff if-no-files-found: ignore diff --git a/regression-tests/run-tests.sh b/regression-tests/run-tests.sh index 0b5fe40a06..226b33cdd5 100644 --- a/regression-tests/run-tests.sh +++ b/regression-tests/run-tests.sh @@ -251,6 +251,10 @@ for test_file in $tests; do fi done +################ +# Output patch +cat "$cxx_compiler-patch.diff" >> "$GITHUB_OUTPUT" + ################ # Report missing reference data directory if [[ ! -d "$exec_out_dir" ]]; then