Skip to content

Commit

Permalink
Check pipestatus to stop the build on make errors
Browse files Browse the repository at this point in the history
Current pipe with tee swallows the error code if any from make.
  • Loading branch information
matsl committed Apr 26, 2024
1 parent 31c6056 commit 4ed91bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:

- name: Compile
run: |
make bin 2>&1 | tee MAKE_BIN_OUTPUT
make binn 2>&1 | tee MAKE_BIN_OUTPUT
test 0 -eq ${PIPESTATUS}
echo "Number of warnings: $(grep "Warning:" MAKE_BIN_OUTPUT | wc -l)" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
grep "Warning:" MAKE_BIN_OUTPUT >> $GITHUB_STEP_SUMMARY || true
Expand Down

0 comments on commit 4ed91bb

Please sign in to comment.