Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/actions/setup-build-and-test-w-make-impl/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,37 @@ runs:
working-directory: build
shell: bash
- name: Run tests
id: run-tests
run: |-
mkdir -p /tmp/test-results
rm -f /tmp/test-results/*.xml
export GTEST_OUTPUT=xml:/tmp/test-results/
set +e
make -j4 check V=0
rc=$?
echo "exit_code=$rc" >> "$GITHUB_OUTPUT"
exit 0
working-directory: build
if: inputs.run_tests == 'true'
shell: bash
- name: Sanitize artifact name
id: artifact-name
if: inputs.run_tests == 'true' && (success() || failure())
run: |-
name="test-results-${{ inputs.job_name }}"
name="${name//[:\"<>|*?\\\/]/-}"
name="${name// /_}"
echo "name=$name" >> "$GITHUB_OUTPUT"
shell: bash
- name: Upload test results
if: inputs.run_tests == 'true' && (success() || failure())
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact-name.outputs.name }}
path: /tmp/test-results/
if-no-files-found: ignore
retention-days: 14
- name: Fail job on test failure
if: steps.run-tests.outputs.exit_code != '0' && steps.run-tests.outputs.exit_code != ''
run: exit 1
shell: bash
Loading