Skip to content

Cache export templates per-target #3

Description

@wjt

Currently this action downloads and caches all export templates for a given release.

This makes for enormous cache files because there are many templates and they are huge (being, in fact, Godot executables for each build configuration):

$ ls -lh ~/.var/app/org.godotengine.Godot/data/godot/export_templates/4.6.2.stable/
total 1.9G
-rw-r--r--. 1 wjt wjt 118M Apr 13 21:35 android_debug.apk
-rw-r--r--. 1 wjt wjt  98M Apr 13 21:35 android_release.apk
-rw-r--r--. 1 wjt wjt 199M Apr 13 21:35 android_source.zip
-rw-r--r--. 1 wjt wjt 4.6M Apr 13 21:35 icudt_godot.dat
-rw-r--r--. 1 wjt wjt 193M Apr 13 21:35 ios.zip
-rwxr-xr-x. 1 wjt wjt  63M Apr 13 21:35 linux_debug.arm32
-rwxr-xr-x. 1 wjt wjt  64M Apr 13 21:35 linux_debug.arm64
-rwxr-xr-x. 1 wjt wjt  70M Apr 13 21:35 linux_debug.x86_32
-rwxr-xr-x. 1 wjt wjt  69M Apr 13 21:35 linux_debug.x86_64
-rwxr-xr-x. 1 wjt wjt  61M Apr 13 21:35 linux_release.arm32
-rwxr-xr-x. 1 wjt wjt  62M Apr 13 21:35 linux_release.arm64
-rwxr-xr-x. 1 wjt wjt  70M Apr 13 21:35 linux_release.x86_32
-rwxr-xr-x. 1 wjt wjt  68M Apr 13 21:35 linux_release.x86_64
-rw-r--r--. 1 wjt wjt 122M Apr 13 21:35 macos.zip
-rw-r--r--. 1 wjt wjt   13 Apr 13 21:35 version.txt
-rw-r--r--. 1 wjt wjt 9.8M Apr 13 21:35 web_debug.zip
-rw-r--r--. 1 wjt wjt  11M Apr 13 21:35 web_dlink_debug.zip
-rw-r--r--. 1 wjt wjt  11M Apr 13 21:35 web_dlink_nothreads_debug.zip
-rw-r--r--. 1 wjt wjt  11M Apr 13 21:35 web_dlink_nothreads_release.zip
-rw-r--r--. 1 wjt wjt  11M Apr 13 21:35 web_dlink_release.zip
-rw-r--r--. 1 wjt wjt 9.7M Apr 13 21:35 web_nothreads_debug.zip
-rw-r--r--. 1 wjt wjt 9.2M Apr 13 21:35 web_nothreads_release.zip
-rw-r--r--. 1 wjt wjt 9.2M Apr 13 21:35 web_release.zip
-rwxr-xr-x. 1 wjt wjt 156K Apr 13 21:35 windows_debug_arm64_console.exe
-rwxr-xr-x. 1 wjt wjt  91M Apr 13 21:35 windows_debug_arm64.exe
-rwxr-xr-x. 1 wjt wjt 188K Apr 13 21:35 windows_debug_x86_32_console.exe
-rwxr-xr-x. 1 wjt wjt 107M Apr 13 21:35 windows_debug_x86_32.exe
-rwxr-xr-x. 1 wjt wjt 185K Apr 13 21:35 windows_debug_x86_64_console.exe
-rwxr-xr-x. 1 wjt wjt  97M Apr 13 21:35 windows_debug_x86_64.exe
-rwxr-xr-x. 1 wjt wjt 156K Apr 13 21:35 windows_release_arm64_console.exe
-rwxr-xr-x. 1 wjt wjt  83M Apr 13 21:35 windows_release_arm64.exe
-rwxr-xr-x. 1 wjt wjt 188K Apr 13 21:35 windows_release_x86_32_console.exe
-rwxr-xr-x. 1 wjt wjt 112M Apr 13 21:35 windows_release_x86_32.exe
-rwxr-xr-x. 1 wjt wjt 185K Apr 13 21:35 windows_release_x86_64_console.exe
-rwxr-xr-x. 1 wjt wjt 100M Apr 13 21:35 windows_release_x86_64.exe

You could imagine caching only the export template used by a specific invocation of the action. This would mean a bit of manual configuration or some fancy scripting because it's hard to extract this information from export_presets.cfg. But it would make builds faster because restoring the ~1246 MB cache in a recent run took 14 seconds out of a total of 60 seconds for the entire Windows build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions