Skip to content

Commit

Permalink
Output error messages to the github summary file
Browse files Browse the repository at this point in the history
This will show these messages in the Github Actions summary page to make
them more visible.
  • Loading branch information
fragglet committed Dec 17, 2024
1 parent 57a7f68 commit 87bff82
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,32 @@ jobs:
run: |
clang-format -i */*.[ch]
if git diff | grep ""; then
echo
echo "*** Formatting errors detected by clang-format."
echo "*** Please apply the above diff or run:"
echo " clang-format -i */*.[ch]"
echo
(echo "Formatting errors detected by clang-format.";
echo "Please run `make format`.";
echo) >> $GITHUB_STEP_SUMMARY
false
fi
- name: Check C89 compliance
env:
CFLAGS: "-O0 -Werror -std=c89 -pedantic -Isrc"
run: |
gcc $CFLAGS -c */*.c
if ! gcc $CFLAGS -c */*.c; then
(echo "Code should be ANSI C. Make sure you are not using features";
echo "from later standards, including C++-style // comments.";
echo) >> $GITHUB_STEP_SUMMARY
false
fi
- name: Check value types can be redefined
env:
CFLAGS: "-O0 -Werror -DTEST_ALTERNATE_VALUE_TYPES"
run: |
gcc $CFLAGS -c src/*.c
if ! gcc $CFLAGS -c src/*.c
(echo "Key/value types cannot be redefined to something other than a"
echo "void pointer. Compile with -DTEST_ALTERNATE_VALUE_TYPES to see"
echo "the compile error."
echo) >> $GITHUB_STEP_SUMMARY
false
fi
build_and_coverage:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 87bff82

Please sign in to comment.