Skip to content

Commit 97356e0

Browse files
widgetiiclaude
andauthored
ci: re-fetch moving-ref package downloads each build (#105)
builder caches BR2_DL_DIR (/tmp/builder-dl) under a monthly key (date +%m), and actions/cache only saves on a key miss, so the first build of the month freezes it for weeks. Packages pinned to a moving ref (VERSION = HEAD/branch, or the majestic-webui `dist` release asset) download as a constant <pkg>-<ref>.tar.gz, so buildroot keeps reusing the stale tarball — defeating the clean firmware-HEAD re-clone builder does for freshness. Empirically, a 2026-06-14 builder nightly shipped a ~2-week-old majestic-webui (full bootstrap.min.css, no mj-settings.js) while the firmware nightly of the same day shipped the current slim UI. Drop *-{HEAD,master,main,dist}.tar.gz before each build (master.yml + build-one.yml) so buildroot re-fetches the current ref. Mirrors the same fix in OpenIPC/firmware. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent e6d8822 commit 97356e0

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/build-one.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ jobs:
6767
key: builder-dl-${{env.CACHE_DATE}}
6868
restore-keys: builder-dl-
6969

70+
- name: Refresh moving-ref package downloads
71+
run: |
72+
# The monthly builder-dl cache freezes moving-ref downloads (VERSION = HEAD /
73+
# branch, or the majestic-webui `dist` release asset) under a constant
74+
# <pkg>-<ref>.tar.gz filename, so buildroot keeps reusing a stale tarball.
75+
# Drop them so it re-fetches the current ref each run. See master.yml.
76+
find /tmp/builder-dl -type f \
77+
\( -name '*-HEAD.tar.gz' -o -name '*-master.tar.gz' -o -name '*-main.tar.gz' -o -name '*-dist.tar.gz' \) \
78+
-print -delete 2>/dev/null || true
79+
7080
- name: Build firmware
7181
env:
7282
BUILD_ID: ${{ needs.resolve.outputs.tag_name }}

.github/workflows/master.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,24 @@ jobs:
220220
key: builder-dl-${{env.CACHE_DATE}}
221221
restore-keys: builder-dl-
222222

223+
- name: Refresh moving-ref package downloads
224+
if: env.RUN
225+
run: |
226+
# builder caches BR2_DL_DIR (/tmp/builder-dl) under a monthly key
227+
# (date +%m) and actions/cache only saves on a key miss, so the first build
228+
# of the month freezes it for weeks. Packages pinned to a moving ref
229+
# (VERSION = HEAD / branch, or the majestic-webui `dist` release asset)
230+
# download as a constant <pkg>-<ref>.tar.gz, so buildroot keeps reusing the
231+
# stale tarball — even though builder re-clones firmware HEAD each run for
232+
# freshness. (Empirically: a 06-14 builder nightly shipped a ~2-week-old
233+
# majestic-webui — full bootstrap.min.css, no mj-settings.js — while the
234+
# firmware nightly shipped the current UI.) Drop those archives so buildroot
235+
# re-fetches the current ref each run. Content-addressed packages
236+
# (S3 / semver / SHA pins) keep their cache.
237+
find /tmp/builder-dl -type f \
238+
\( -name '*-HEAD.tar.gz' -o -name '*-master.tar.gz' -o -name '*-main.tar.gz' -o -name '*-dist.tar.gz' \) \
239+
-print -delete 2>/dev/null || true
240+
223241
- name: Build firmware
224242
if: env.RUN
225243
run: |

0 commit comments

Comments
 (0)