-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Only store build cache on master branch * Add comments on why the action looks how it looks * Add dev workflow * Always print test output * Update action * Use official actions for uploading and downloading artifacts * Run once a week * Use our own upload and download actions so we have sensible defaults for paths * Revert "Use our own upload and download actions so we have sensible defaults for paths" This reverts commit 4d9a063. * Fix missing paths * Fix defined versions
- Loading branch information
Showing
18 changed files
with
312 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# base key setup copied from the godot cache action setup | ||
# just added some if statements for only restoring the cache when not on master and only saving when on master | ||
|
||
name: Setup scons cache | ||
description: Setup scons build cache. | ||
inputs: | ||
cache-name: | ||
description: The cache base name (job name by default). | ||
default: "${{github.job}}" | ||
scons-cache: | ||
description: The scons cache path. | ||
default: "${{github.workspace}}/.scons-cache/" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
# Upload cache on completion and check it out now | ||
- name: Load .scons_cache directory | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
uses: actions/cache@v4 | ||
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}} | ||
# Check out cache but do not upload it at the end | ||
- name: Load .scons_cache directory | ||
if: ${{ github.ref != 'refs/heads/master' }} | ||
uses: actions/cache/restore@v4 # only restores the cache but does not upload it | ||
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.