diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-08-01 20:38:07 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-08-01 20:41:45 +0200 |
commit | deb602578186a8918270cf05d75efd3e72bd9335 (patch) | |
tree | 48e44875fca318084c0aa2c05ecb7605ac270980 /.github/actions/godot-cache | |
parent | 2992ffd25523cb8b3e0ef1b873c40115b8940178 (diff) | |
download | redot-engine-deb602578186a8918270cf05d75efd3e72bd9335.tar.gz |
CI: Extract godot-cpp testing into its own job
This ensures that the godot-cpp job has plenty of resources
to run its build and avoid being affected by the main build.
Additionally:
- Extract test tasks into dedicated actions.
- Upload artifacts as early as possible.
- Ensure that we check master cache before random cache.
Diffstat (limited to '.github/actions/godot-cache')
-rw-r--r-- | .github/actions/godot-cache/action.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.github/actions/godot-cache/action.yml b/.github/actions/godot-cache/action.yml index 2d7afc8514..09ad2099cc 100644 --- a/.github/actions/godot-cache/action.yml +++ b/.github/actions/godot-cache/action.yml @@ -16,7 +16,20 @@ runs: with: path: ${{inputs.scons-cache}} key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} + + # We try to match an existing cache to restore from it. Each potential key is checked against + # all existing caches as a prefix. E.g. 'linux-template-minimal' would match any cache that + # starts with "linux-template-minimal", such as "linux-template-minimal-master-refs/heads/master-6588a4a29af1621086feac0117d5d4d37af957fd". + # + # We check these prefixes in this order: + # + # 1. The exact match, including the base branch, the commit reference, and the SHA hash of the commit. + # 2. A partial match for the same base branch and the same commit reference. + # 3. A partial match for the same base branch and the base branch commit reference. + # 4. A partial match for the same base branch only (not ideal, matches any PR with the same base branch). + restore-keys: | ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}} + ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-refs/heads/${{env.GODOT_BASE_BRANCH}} ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}} |