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>
This commit is contained in:
Dmitry Ilyin
2026-06-15 09:32:06 +03:00
committed by GitHub
co-authored by Claude Opus 4.8
parent e6d8822517
commit 97356e0cfe
2 changed files with 28 additions and 0 deletions
+10
View File
@@ -67,6 +67,16 @@ jobs:
key: builder-dl-${{env.CACHE_DATE}}
restore-keys: builder-dl-
- name: Refresh moving-ref package downloads
run: |
# The monthly builder-dl cache freezes moving-ref downloads (VERSION = HEAD /
# branch, or the majestic-webui `dist` release asset) under a constant
# <pkg>-<ref>.tar.gz filename, so buildroot keeps reusing a stale tarball.
# Drop them so it re-fetches the current ref each run. See master.yml.
find /tmp/builder-dl -type f \
\( -name '*-HEAD.tar.gz' -o -name '*-master.tar.gz' -o -name '*-main.tar.gz' -o -name '*-dist.tar.gz' \) \
-print -delete 2>/dev/null || true
- name: Build firmware
env:
BUILD_ID: ${{ needs.resolve.outputs.tag_name }}
+18
View File
@@ -220,6 +220,24 @@ jobs:
key: builder-dl-${{env.CACHE_DATE}}
restore-keys: builder-dl-
- name: Refresh moving-ref package downloads
if: env.RUN
run: |
# 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 — even though builder re-clones firmware HEAD each run for
# freshness. (Empirically: a 06-14 builder nightly shipped a ~2-week-old
# majestic-webui — full bootstrap.min.css, no mj-settings.js — while the
# firmware nightly shipped the current UI.) Drop those archives so buildroot
# re-fetches the current ref each run. Content-addressed packages
# (S3 / semver / SHA pins) keep their cache.
find /tmp/builder-dl -type f \
\( -name '*-HEAD.tar.gz' -o -name '*-master.tar.gz' -o -name '*-main.tar.gz' -o -name '*-dist.tar.gz' \) \
-print -delete 2>/dev/null || true
- name: Build firmware
if: env.RUN
run: |