File tree 1 file changed +17
-7
lines changed
1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -16,23 +16,33 @@ jobs:
16
16
run : |
17
17
clang-format -i */*.[ch]
18
18
if git diff | grep ""; then
19
- echo
20
- echo "*** Formatting errors detected by clang-format."
21
- echo "*** Please apply the above diff or run:"
22
- echo " clang-format -i */*.[ch]"
23
- echo
19
+ (echo "Formatting errors detected by clang-format." \
20
+ "Please run \`make format\`.";
21
+ echo) >> $GITHUB_STEP_SUMMARY
24
22
false
25
23
fi
26
24
- name : Check C89 compliance
27
25
env :
28
26
CFLAGS : " -O0 -Werror -std=c89 -pedantic -Isrc"
29
27
run : |
30
- gcc $CFLAGS -c */*.c
28
+ if ! gcc $CFLAGS -c */*.c; then
29
+ (echo "Code does not conform to ANSI C. Make sure not to use" \
30
+ "features from later standards, including C++-style " \
31
+ "// comments.";
32
+ echo) >> $GITHUB_STEP_SUMMARY
33
+ false
34
+ fi
31
35
- name : Check value types can be redefined
32
36
env :
33
37
CFLAGS : " -O0 -Werror -DTEST_ALTERNATE_VALUE_TYPES"
34
38
run : |
35
- gcc $CFLAGS -c src/*.c
39
+ if ! gcc $CFLAGS -c src/*.c; then
40
+ (echo "Compile failed when key/value types were redefined to" \
41
+ "something different from a void pointer. Compile with" \
42
+ "-DTEST_ALTERNATE_VALUE_TYPES to see the error.";
43
+ echo) >> $GITHUB_STEP_SUMMARY
44
+ false
45
+ fi
36
46
37
47
build_and_coverage :
38
48
runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments