From 97356e0cfe4c5562774ed9b2fd31654c691be2b7 Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin <6576495+widgetii@users.noreply.github.com> Date: Mon, 15 Jun 2026 09:32:06 +0300 Subject: [PATCH] ci: re-fetch moving-ref package downloads each build (#105) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 -.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 --- .github/workflows/build-one.yml | 10 ++++++++++ .github/workflows/master.yml | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.github/workflows/build-one.yml b/.github/workflows/build-one.yml index 174d7b3..f600a36 100644 --- a/.github/workflows/build-one.yml +++ b/.github/workflows/build-one.yml @@ -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 + # -.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 }} diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 42b8331..1f5b663 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -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 -.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: |