File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -738,6 +738,21 @@ jobs:
738738 g++ -Werror include/*.h
739739 clang -Werror -x c++-header include/*.h
740740
741+ headers :
742+ name : " Self-contained headers"
743+ runs-on : ubuntu-latest
744+
745+ steps :
746+ - name : Checkout
747+ uses : actions/checkout@v5
748+
749+ - name : Test script
750+ run : |
751+ ./tools/check-headers.sh \
752+ src/field.h \
753+ src/hash.h \
754+ src/hash_impl.h
755+
741756 sage :
742757 name : " SageMath prover"
743758 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -eu
4+
5+ builddir=$( mktemp -d)
6+ trap ' rm -rf "$builddir"' EXIT INT TERM
7+
8+ for header in " $@ " ; do
9+ source_file=" ${builddir} /${header% .h} .c"
10+ object_file=" ${builddir} /${header% .h} .o"
11+ mkdir -p " $( dirname " $source_file " ) "
12+ cp " $header " " $source_file "
13+
14+ cc -I include -I src -c " $source_file " -o " $object_file "
15+ exit_code=$?
16+ if [ $exit_code -ne 0 ]; then
17+ exit $exit_code
18+ fi
19+
20+ echo " $header ... OK"
21+ done
You can’t perform that action at this time.
0 commit comments