Skip to content

Commit 89b4d52

Browse files
ppannutoalistair23
authored andcommitted
build: add explanation for TOCK_BUILDALL
1 parent 16ec68e commit 89b4d52

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

examples/build_all.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
NUM_JOBS=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || 4)
44

5+
# Sentinel flag to indicate to apps that a `build all` is running.
6+
#
7+
# Generally, apps should not be sensitive to this flag. Build all is
8+
# usually only invoked by a user when they're looking for local, CI-like
9+
# behavior. However, a local repo checkout is not quite the same as a
10+
# pristine CI environment, and certain test apps may need slightly
11+
# different behavior for a local "build all" versus CI.
12+
#
13+
# For example: Some apps, e.g. LoRa-based ones, require radio
14+
# configuration that end users *must* set themselves [e.g. to select
15+
# operating region]. For users of these apps, we *do not* want them to
16+
# build successfully 'out of the box' without explicit user
17+
# intervention, but we do still want them to be compile-tested in CI. An
18+
# app may ship with a `radioConfig_example.h` but include (and
19+
# `.gitignore`) `radioConfig.h`. CI can unconditionally swap in the
20+
# `_example` version, but a local checkout should use a real config file
21+
# it is available. At the same time, apps which are not used in a local
22+
# checkout should not throw compile errors for a local "build all", and
23+
# should thus swap in the `_example` if a real config is not present. An
24+
# app build which is sensitive to `TOCK_BUILDALL` can capture this
25+
# subtlety.
526
export TOCK_BUILDALL=1
627

728
set -e

0 commit comments

Comments
 (0)