GitHub CI: check project for warnings with clang/gcc.
[tinc] / .github / workflows / warn / run.sh
1 #!/bin/sh
2
3 set -eu
4
5 test -n "$CC"
6 export CFLAGS="${CFLAGS:-} -Werror"
7
8 result=0
9
10 check_warnings() {
11   git clean -dfx
12
13   autoreconf -fsi
14   ./configure --enable-uml --enable-vde --enable-miniupnpc "$@"
15
16   make -j"$(nproc)" all extra || result=$?
17 }
18
19 check_warnings
20 check_warnings --disable-legacy-protocol
21
22 exit $result