Merge 'Build logs' into 'Build' in '.github/workflows/ccpp.yml:jobs.build-and-check'

This avoids the supposed issue that in case that 'make' fails, the whole
'jobs.build-and-check' stops, and 'Build logs' isn't executed, and thus there's
no indication in the GitHub UI why 'make' failed.

Using a shell pipeline is OK; the exit code of 'make' isn't lost, as per
<https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell>,
'bash' is being run with '-o pipefail'.
This commit is contained in:
Thomas Schwinge 2022-03-22 10:29:21 +01:00
parent 246fb48cbb
commit 10ff5d5507
1 changed files with 2 additions and 4 deletions

View File

@ -48,13 +48,11 @@ jobs:
--enable-multilib
- name: Build
shell: bash
run: |
cd gccrs-build; \
make -j $(nproc) > log 2>&1
make -j $(nproc) 2>&1 | tee log
- name: Build logs
run: cat gccrs-build/log
- name: Check for new warnings
run: |
grep 'warning:' gccrs-build/log | sort > log_warnings;