Trim the Godot template cache and separate CI cache keys
Full build / Import + headless tests (push) Successful in 2m24s
Full build / Full desktop build + optional release (push) Skipped

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.
This commit is contained in:
zwitschi committed 2026-11-02 09:48:05 +01:00
1 parent ad12fdad7e
commit 9b8f513f9f
2 files changed
+22 -12

No files matched your search

+17 -8
View File
@@ -25,7 +25,7 @@ jobs:
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: /usr/local/bin/godot 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 - name: Install Godot 4.7.2
run: | run: |
@@ -75,13 +75,13 @@ jobs:
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: /usr/local/bin/godot 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 - name: Restore export templates cache
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: ~/.local/share/godot/export_templates/4.7.2.stable 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 - name: Install Godot 4.7.2 and export templates
run: | run: |
@@ -92,17 +92,26 @@ jobs:
sudo install /tmp/godot-bin/Godot_v4.7.2-stable_linux.x86_64 /usr/local/bin/godot sudo install /tmp/godot-bin/Godot_v4.7.2-stable_linux.x86_64 /usr/local/bin/godot
fi fi
godot --version godot --version
if [ -f "$HOME/.local/share/godot/export_templates/4.7.2.stable/linux_release.x86_64" ]; then TEMPLATE_DIR="$HOME/.local/share/godot/export_templates/4.7.2.stable"
ls "$HOME/.local/share/godot/export_templates/4.7.2.stable" | head -5 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 exit 0
fi fi
curl -sL -o /tmp/templates.tpz \ 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 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 rm -rf /tmp/tpl && mkdir -p /tmp/tpl
unzip -qo /tmp/templates.tpz -d /tmp/tpl unzip -qo /tmp/templates.tpz -d /tmp/tpl
mkdir -p "$HOME/.local/share/godot/export_templates/4.7.2.stable" mkdir -p "$TEMPLATE_DIR"
cp /tmp/tpl/templates/* "$HOME/.local/share/godot/export_templates/4.7.2.stable/" for file in $NEEDED; do
ls "$HOME/.local/share/godot/export_templates/4.7.2.stable" | head -5 cp "/tmp/tpl/templates/$file" "$TEMPLATE_DIR/$file"
done
ls "$TEMPLATE_DIR" | head -10
- name: Import project - name: Import project
run: godot --headless --import run: godot --headless --import
+5 -4
View File
@@ -63,10 +63,11 @@ setup, so do not rely on it.
> artifacts. If CI publishing fails again, run > artifacts. If CI publishing fails again, run
> `./tools/publish_release.sh <version>` from a checkout with `~/.git-credentials`. > `./tools/publish_release.sh <version>` from a checkout with `~/.git-credentials`.
> **Godot cache:** the workflow uses Gitea Actions cache for the Godot binary and the > **Godot cache:** the workflow uses Gitea Actions cache for the Godot binary and a
> 4.7.2 export templates. The first run still downloads them; subsequent runs restore > trimmed 4.7.2 export-template set (Linux/Windows/macOS/Web release files only, not
> from cache. If the host cache service is unavailable, remove the cache steps and > Android/iOS). The first run still downloads them; subsequent runs restore from cache.
> let the install steps download fresh copies. > 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 > 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 > `.github/workflows/ci.yml` was removed to avoid double runs on hosts that scan