-
Notifications
You must be signed in to change notification settings - Fork 1
130 lines (119 loc) · 5.99 KB
/
Copy pathbiper-build.yml
File metadata and controls
130 lines (119 loc) · 5.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# The one thing this fork must prove on every change: that it still builds.
# Upstream's `pr-build-check` matrix is a fixed list that does not contain our
# environments, and the release generator looks for names ending in
# `_companion_radio_ble/_usb` — ours are named differently. Without this
# workflow, "both environments SUCCESS" in a commit message is a measurement
# taken on one laptop.
name: Biper build
on:
push:
branches: ['**']
paths:
- 'src/**'
- 'variants/biper_ap/**'
- 'variants/m5stack_unit_c6l/**'
- 'biper/**'
- 'boards/**'
- 'fonts/**'
- 'test/**'
- 'examples/companion_radio/**'
- 'platformio.ini'
- '.github/README.md'
- 'CHANGELOG.md'
- '.github/workflows/biper-build.yml'
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: PlatformIO
run: pip install --upgrade platformio
# Both asset headers are GENERATED and the build does not refresh them.
# Edit `biper-app.html` or a font file, forget the generator, and the
# firmware compiles the previous payload without saying a word. Here it
# says it. Note gen-asset.py pins the gzip OS byte, so the output is
# identical on Linux and macOS.
- name: Panel asset is up to date
run: |
python3 biper/app/gen-asset.py
git diff --exit-code -- src/helpers/biper/BiperAppAsset.h \
|| { echo "::error::BiperAppAsset.h is stale — run python3 biper/app/gen-asset.py"; exit 1; }
# The font header carries ~97 kB of OFL-1.1 typefaces that the cube
# redistributes over /f/*.woff2. A drift between fonts/*.woff2 and the
# header is not only a build problem: the licence notice would then
# describe bytes the device does not actually serve.
- name: Font asset is up to date
run: |
python3 biper/app/gen-fonts.py
git diff --exit-code -- src/helpers/biper/BiperFontAsset.h \
|| { echo "::error::BiperFontAsset.h is stale — run python3 biper/app/gen-fonts.py"; exit 1; }
# Push z rozjechanymi wersjami przechodzil CI — bramka zyla tylko
# lokalnie w release.sh (audyt Kimi A-14.2).
- name: VERSION and banner header agree
run: |
v="$(tr -d '[:space:]' < biper/VERSION)"
b="$(sed -n 's/.*BIPER_LAYER_VERSION "\(.*\)".*/\1/p' src/helpers/biper/BiperVersion.h)"
[ "$v" = "$b" ] || { echo "::error::biper/VERSION=$v vs BiperVersion.h=$b"; exit 1; }
- name: Build both environments
run: pio run -e Biper_AP_C6L_spike -e Biper_AP_C6L_wifi_only
# Straznik semantyki flag: -U przenoszone przez PlatformIO za -D skasowalo
# kiedys MAX_CONTACTS w polowie jednostek kompilacji (awaria pary 19.08).
# Dzis pilnuja tego #error w naglowkach (A-09); ten krok pilnuje, zeby
# ktos nie wycial samych straznikow.
- name: Flag guards still present
run: |
grep -q 'MAX_CONTACTS != 100' src/helpers/BaseChatMesh.h || { echo "::error::straznik MAX_CONTACTS znikl z BaseChatMesh.h"; exit 1; }
grep -q 'MAX_CONTACTS != 100' examples/companion_radio/MyMesh.h || { echo "::error::straznik MAX_CONTACTS znikl z MyMesh.h"; exit 1; }
# Flagi laboratoryjne nie maja prawa wejsc do envow wydania (Codex F-15):
# kazda z nich zdejmuje jakas obrone (otwarty AP, hasla w logu, surowe
# probki RNG). Dodaje sie je RECZNIE na stole (--build-flag), nigdy w
# pliku. (Autostart okna to od 20.08 zachowanie produkcyjne, nie flaga.)
- name: No lab flags in release environments
run: |
if grep -nE '^\s*-D\s*(BIPER_AP_OPEN|BIPER_DEBUG_SECRETS|BIPER_RNG_SAMPLES)' variants/biper_ap/platformio.ini; then
echo "::error::flaga laboratoryjna wpisana w env wydania"; exit 1
fi
# Czysta logika warstwy Biper (prawda doreczen po znaczniku, podtrzymanie
# okna) + regresja upstreamowego KISS modemu. Upstreamowy env `native`
# stoi na brakujacych deklaracjach atol/atoi w ConfigSerializer.cpp —
# identycznie na czystym upstreamie (ograniczenie odziedziczone).
- name: Host tests
run: pio test -e native_biper_faces -e native_kiss_modem --without-uploading
stock-c6l:
# Biper zmienia pliki WSPOLNE (examples/companion_radio, src/Mesh.cpp,
# src/Dispatcher.cpp, wariant m5stack_unit_c6l z TCXO 3,0 V). Bez tego
# joba zmiana wspolna mogla przejsc bez sygnalu kompilacji dla stockowych
# profili BLE/USB (Codex F-07). Zachowanie RADIA po tych zmianach to
# nadal osobny gate fizyczny — kompilator go nie mierzy.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: PlatformIO
run: pip install --upgrade platformio
- name: Build stock C6L BLE + USB
run: pio run -e M5Stack_Unit_C6L_companion_radio_ble -e M5Stack_Unit_C6L_companion_radio_usb
readme-facts:
# The README states numbers and tells the reader to verify them. This job is
# that reader: it re-computes the diffstat against the MeshCore base tag and
# the panel asset size, and fails when the README drifts from reality.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: README numbers match reality
run: |
git remote add upstream https://github.com/meshcore-dev/MeshCore
git fetch upstream --tags --quiet
real="$(git diff --shortstat companion-v1.17.1 HEAD | sed 's/^ *//')"
grep -qF "$real" .github/README.md || { echo "README diffstat drift — reality: $real"; exit 1; }
len="$(grep -oE 'BIPER_APP_HTML_LEN = [0-9]+' src/helpers/biper/BiperAppAsset.h | grep -oE '[0-9]+')"
grep -qF "($len bytes)" .github/README.md || { echo "README panel size drift — reality: $len bytes"; exit 1; }