File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 2121 - " docs/*"
2222
2323jobs :
24+ check-directives :
25+ name : Check Preprocessor Directives
26+ runs-on : ubuntu-latest
27+ env :
28+ HEADER_FILE : src/NetWizard.h
29+ steps :
30+ - name : Checkout Repository
31+ uses : actions/checkout@v4
32+ - name : Check NETWIZARD_USE_ASYNC_WEBSERVER
33+ env :
34+ DIRECTIVE : NETWIZARD_USE_ASYNC_WEBSERVER
35+ EXPECTED_VALUE : 0
36+ run : |
37+ if [ ! -f "$HEADER_FILE" ]; then
38+ echo "$HEADER_FILE not found!" && exit 1
39+ fi
40+ if ! grep -Eq "#define[[:space:]]+$DIRECTIVE[[:space:]]+$EXPECTED_VALUE([[:space:]]+|$)" "$HEADER_FILE"; then
41+ echo "$DIRECTIVE is not set to $EXPECTED_VALUE!" && exit 1
42+ fi
43+ echo "Preprocessor directive is correctly set to $EXPECTED_VALUE."
44+
2445 arduino :
2546 name : Arduino - ${{ matrix.name }}
47+ needs : check-directives
2648 runs-on : ubuntu-latest
2749 strategy :
2850 fail-fast : false
@@ -106,6 +128,7 @@ jobs:
106128
107129 platformio :
108130 name : PlatformIO - ${{ matrix.name }}
131+ needs : check-directives
109132 runs-on : ubuntu-latest
110133 strategy :
111134 fail-fast : false
You can’t perform that action at this time.
0 commit comments