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.
This commit is contained in:
1 parent
ad12fdad7e
commit
9b8f513f9f
2 files changed
+22
-12
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user