From 5cdce253295c25072204611e1111c186d8ac3f4c Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 18 Oct 2026 22:15:27 -0600 Subject: [PATCH] Skip wx cache upload when image supplies the library --- .gitea/workflows/next.yml | 3 ++- .gitea/workflows/release.yml | 3 ++- .gitea/workflows/verify.yml | 3 ++- ci/ensure-wx-prefix.sh | 5 +++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/next.yml b/.gitea/workflows/next.yml index 2003f78f..3c005692 100644 --- a/.gitea/workflows/next.yml +++ b/.gitea/workflows/next.yml @@ -38,9 +38,10 @@ jobs: path: /root/.cache/wx-3.3.3-linux key: ${{ steps.wx-key.outputs.key }} - name: Build wxWidgets + id: wx-build run: bash ci/ensure-wx-prefix.sh - name: Save vendored wxWidgets build - if: steps.wx-cache.outputs.cache-hit != 'true' + if: steps.wx-cache.outputs.cache-hit != 'true' && steps.wx-build.outputs.built == 'true' uses: actions/cache/save@v4 continue-on-error: true with: diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index f17cafc2..70461e8c 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -66,10 +66,11 @@ jobs: key: ${{ steps.wx-key.outputs.key }} - name: Build wxWidgets (once, then cached) + id: wx-build run: bash ci/ensure-wx-prefix.sh - name: Save vendored wxWidgets build - if: steps.wx-cache.outputs.cache-hit != 'true' + if: steps.wx-cache.outputs.cache-hit != 'true' && steps.wx-build.outputs.built == 'true' uses: actions/cache/save@v4 continue-on-error: true with: diff --git a/.gitea/workflows/verify.yml b/.gitea/workflows/verify.yml index ea36a7bb..105095b3 100644 --- a/.gitea/workflows/verify.yml +++ b/.gitea/workflows/verify.yml @@ -68,10 +68,11 @@ jobs: - name: Build wxWidgets (once, then cached) if: steps.surface.outputs.surface == 'full' + id: wx-build run: bash ci/ensure-wx-prefix.sh - name: Save vendored wxWidgets build - if: steps.surface.outputs.surface == 'full' && steps.wx-cache.outputs.cache-hit != 'true' + if: steps.surface.outputs.surface == 'full' && steps.wx-cache.outputs.cache-hit != 'true' && steps.wx-build.outputs.built == 'true' uses: actions/cache/save@v4 continue-on-error: true with: diff --git a/ci/ensure-wx-prefix.sh b/ci/ensure-wx-prefix.sh index 7b25e9eb..b3a16dd3 100644 --- a/ci/ensure-wx-prefix.sh +++ b/ci/ensure-wx-prefix.sh @@ -28,11 +28,16 @@ if prefix.is_dir(): shutil.rmtree(prefix) PY fi +built=false if [ ! -x "$prefix/bin/wx-config" ] || [ ! -s "$prefix/lib/libwx_gtk3u-3.3.a" ]; then bash scripts/build-wx-linux.sh + built=true else echo 'wx prefix available from matching image or cache' fi [ -s "$prefix/lib/libwx_gtk3u-3.3.a" ] printf '%s\n' "$expected" > "$marker" +if [ -n "${GITHUB_OUTPUT:-}" ]; then + printf 'built=%s\n' "$built" >> "$GITHUB_OUTPUT" +fi