Skip to content

Commit

Permalink
ci: use job outputs to append patches
Browse files Browse the repository at this point in the history
  • Loading branch information
JohelEGP committed Jan 12, 2024
1 parent 056a909 commit bf48977
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -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
4 changes: 4 additions & 0 deletions regression-tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bf48977

Please sign in to comment.