From 9b8f513f9f602b72132580f1969bcd9c9c8d6cf4 Mon Sep 17 00:00:00 2001 From: Zwitschi Date: Mon, 2 Nov 2026 09:48:05 +0100 Subject: [PATCH] Trim the Godot template cache and separate CI cache keys Cache only Linux/Windows/macOS/Web release templates instead of the full 1.2 GB archive, and use distinct binary cache keys for the checks and build jobs so concurrent runs do not fight over the same cache entry. --- .gitea/workflows/build.yml | 25 +++++++++++++++++-------- docs/RELEASING.md | 9 +++++---- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 612d924..aa63bd1 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -25,7 +25,7 @@ jobs: uses: actions/cache@v4 with: path: /usr/local/bin/godot - key: godot-${{ runner.os }}-${{ env.GODOT_VERSION }}-v1 + key: godot-checks-${{ runner.os }}-${{ env.GODOT_VERSION }}-v2 - name: Install Godot 4.7.2 run: | @@ -75,13 +75,13 @@ jobs: uses: actions/cache@v4 with: path: /usr/local/bin/godot - key: godot-${{ runner.os }}-${{ env.GODOT_VERSION }}-v1 + key: godot-build-${{ runner.os }}-${{ env.GODOT_VERSION }}-v2 - name: Restore export templates cache uses: actions/cache@v4 with: path: ~/.local/share/godot/export_templates/4.7.2.stable - key: godot-templates-${{ runner.os }}-${{ env.GODOT_VERSION }}-v1 + key: godot-templates-${{ runner.os }}-${{ env.GODOT_VERSION }}-v2 - name: Install Godot 4.7.2 and export templates run: | @@ -92,17 +92,26 @@ jobs: sudo install /tmp/godot-bin/Godot_v4.7.2-stable_linux.x86_64 /usr/local/bin/godot fi godot --version - if [ -f "$HOME/.local/share/godot/export_templates/4.7.2.stable/linux_release.x86_64" ]; then - ls "$HOME/.local/share/godot/export_templates/4.7.2.stable" | head -5 + TEMPLATE_DIR="$HOME/.local/share/godot/export_templates/4.7.2.stable" + NEEDED="version.txt icudt_godot.dat linux_release.x86_64 windows_release_x86_64.exe macos.zip web_nothreads_release.zip web_dlink_nothreads_release.zip" + missing=0 + for file in $NEEDED; do + [ -f "$TEMPLATE_DIR/$file" ] || missing=1 + done + if [ "$missing" -eq 0 ]; then + echo "export templates restored from cache" + ls "$TEMPLATE_DIR" | head -10 exit 0 fi curl -sL -o /tmp/templates.tpz \ https://github.com/godotengine/godot/releases/download/4.7.2-stable/Godot_v4.7.2-stable_export_templates.tpz rm -rf /tmp/tpl && mkdir -p /tmp/tpl unzip -qo /tmp/templates.tpz -d /tmp/tpl - mkdir -p "$HOME/.local/share/godot/export_templates/4.7.2.stable" - cp /tmp/tpl/templates/* "$HOME/.local/share/godot/export_templates/4.7.2.stable/" - ls "$HOME/.local/share/godot/export_templates/4.7.2.stable" | head -5 + mkdir -p "$TEMPLATE_DIR" + for file in $NEEDED; do + cp "/tmp/tpl/templates/$file" "$TEMPLATE_DIR/$file" + done + ls "$TEMPLATE_DIR" | head -10 - name: Import project run: godot --headless --import diff --git a/docs/RELEASING.md b/docs/RELEASING.md index 8c0fae1..182595b 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -63,10 +63,11 @@ setup, so do not rely on it. > artifacts. If CI publishing fails again, run > `./tools/publish_release.sh ` from a checkout with `~/.git-credentials`. -> **Godot cache:** the workflow uses Gitea Actions cache for the Godot binary and the -> 4.7.2 export templates. The first run still downloads them; subsequent runs restore -> from cache. If the host cache service is unavailable, remove the cache steps and -> let the install steps download fresh copies. +> **Godot cache:** the workflow uses Gitea Actions cache for the Godot binary and a +> trimmed 4.7.2 export-template set (Linux/Windows/macOS/Web release files only, not +> Android/iOS). The first run still downloads them; subsequent runs restore from cache. +> If the host cache service is unavailable, remove the cache steps and let the install +> steps download fresh copies. > The workflow lives in `.gitea/workflows/` (Gitea's canonical path). The old > `.github/workflows/ci.yml` was removed to avoid double runs on hosts that scan