Repository navigation
59 lines (55 loc) · 2.37 KB
/
Copy pathconsole-sync.yml
File metadata and controls
59 lines (55 loc) · 2.37 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
name: Console pages in sync
# The console pages are authored as firmware/patternflow/console/*.html and
# spliced into the PROGMEM headers by firmware/toolchain/console_pages.py.
#
# That arrangement has exactly one way to go wrong: someone edits the .h
# directly. Nothing complains, the device ships their change — and the next
# `console_pages.py build` silently overwrites it with the older HTML. The
# work disappears with no error anywhere.
#
# So this checks that every header still matches its HTML - and that the
# gzip twin `build` lays under each literal (theme_index.h and fflate_js.h
# carry one too, with no HTML of their own) still decompresses to it.
on:
pull_request:
paths:
- "firmware/patternflow/console/**"
- "firmware/patternflow/src/*_index.h"
- "firmware/patternflow/src/fflate_js.h"
- "firmware/patternflow/features/**/*_index.h"
- "firmware/toolchain/console_pages.py"
- "firmware/toolchain/build_audio_in_page.py"
- "tools/patternflow-audio-extension/**"
- ".github/workflows/console-sync.yml"
push:
branches: [main]
paths:
- "firmware/patternflow/console/**"
- "firmware/patternflow/src/*_index.h"
- "firmware/patternflow/src/fflate_js.h"
- "firmware/patternflow/features/**/*_index.h"
- "firmware/toolchain/console_pages.py"
- "firmware/toolchain/build_audio_in_page.py"
- "tools/patternflow-audio-extension/**"
concurrency:
group: console-sync-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Headers match console/*.html
run: python firmware/toolchain/console_pages.py check
# audio-in.html is itself generated: from the browser extension's mapping
# editor and the console/_audio_in* files. The step above proves the
# header matches the page; this proves the page is what those sources
# assemble to, and that it is inside its size budget (BUDGET in the
# script: the stamped page, gzip -9, as the panel sends it). The step
# above reports both too; this one keeps them a line of their own.
- name: audio-in.html matches its sources and is inside its size budget
run: python firmware/toolchain/build_audio_in_page.py --check