summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/actions/godot-cache-restore/action.yml (renamed from .github/actions/godot-cache/action.yml)9
-rw-r--r--.github/actions/godot-cache-save/action.yml17
-rw-r--r--.github/workflows/android_builds.yml10
-rw-r--r--.github/workflows/ios_builds.yml8
-rw-r--r--.github/workflows/linux_builds.yml10
-rw-r--r--.github/workflows/macos_builds.yml10
-rw-r--r--.github/workflows/web_builds.yml10
-rw-r--r--.github/workflows/windows_builds.yml10
8 files changed, 67 insertions, 17 deletions
diff --git a/.github/actions/godot-cache/action.yml b/.github/actions/godot-cache-restore/action.yml
index 13142e7ed1..eb955affef 100644
--- a/.github/actions/godot-cache/action.yml
+++ b/.github/actions/godot-cache-restore/action.yml
@@ -1,5 +1,5 @@
-name: Setup Godot build cache
-description: Setup Godot build cache.
+name: Restore Godot build cache
+description: Restore Godot build cache.
inputs:
cache-name:
description: The cache base name (job name by default).
@@ -10,9 +10,8 @@ inputs:
runs:
using: "composite"
steps:
- # Upload cache on completion and check it out now.
- - name: Load SCons cache directory
- uses: actions/cache@v4
+ - name: Restore SCons cache directory
+ uses: actions/cache/restore@v4
with:
path: ${{inputs.scons-cache}}
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
diff --git a/.github/actions/godot-cache-save/action.yml b/.github/actions/godot-cache-save/action.yml
new file mode 100644
index 0000000000..b7cbf91f94
--- /dev/null
+++ b/.github/actions/godot-cache-save/action.yml
@@ -0,0 +1,17 @@
+name: Save Godot build cache
+description: Save Godot 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:
+ - name: Save SCons cache directory
+ uses: actions/cache/save@v4
+ with:
+ path: ${{inputs.scons-cache}}
+ key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml
index f99a31179e..ee75d53282 100644
--- a/.github/workflows/android_builds.yml
+++ b/.github/workflows/android_builds.yml
@@ -49,8 +49,8 @@ jobs:
distribution: temurin
java-version: 17
- - name: Setup Godot build cache
- uses: ./.github/actions/godot-cache
+ - name: Restore Godot build cache
+ uses: ./.github/actions/godot-cache-restore
with:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true
@@ -66,6 +66,12 @@ jobs:
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
+ - name: Save Godot build cache
+ uses: ./.github/actions/godot-cache-save
+ with:
+ cache-name: ${{ matrix.cache-name }}
+ continue-on-error: true
+
- name: Generate Godot templates
if: matrix.target == 'template_release'
run: |
diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml
index 0546f43acc..8da6d1311e 100644
--- a/.github/workflows/ios_builds.yml
+++ b/.github/workflows/ios_builds.yml
@@ -22,8 +22,8 @@ jobs:
with:
submodules: recursive
- - name: Setup Godot build cache
- uses: ./.github/actions/godot-cache
+ - name: Restore Godot build cache
+ uses: ./.github/actions/godot-cache-restore
continue-on-error: true
- name: Setup Python and SCons
@@ -37,5 +37,9 @@ jobs:
target: template_release
tests: false
+ - name: Save Godot build cache
+ uses: ./.github/actions/godot-cache-save
+ continue-on-error: true
+
- name: Upload artifact
uses: ./.github/actions/upload-artifact
diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml
index 6b98256110..8eb6e3afd9 100644
--- a/.github/workflows/linux_builds.yml
+++ b/.github/workflows/linux_builds.yml
@@ -111,8 +111,8 @@ jobs:
sudo rm -rf /usr/local/lib/android
echo "Disk usage after:" && df -h
- - name: Setup Godot build cache
- uses: ./.github/actions/godot-cache
+ - name: Restore Godot build cache
+ uses: ./.github/actions/godot-cache-restore
with:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true
@@ -140,6 +140,12 @@ jobs:
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
+ - name: Save Godot build cache
+ uses: ./.github/actions/godot-cache-save
+ with:
+ cache-name: ${{ matrix.cache-name }}
+ continue-on-error: true
+
- name: Generate C# glue
if: ${{ matrix.build-mono }}
run: |
diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml
index badcb688d1..f564a496e2 100644
--- a/.github/workflows/macos_builds.yml
+++ b/.github/workflows/macos_builds.yml
@@ -37,8 +37,8 @@ jobs:
with:
submodules: recursive
- - name: Setup Godot build cache
- uses: ./.github/actions/godot-cache
+ - name: Restore Godot build cache
+ uses: ./.github/actions/godot-cache-restore
with:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true
@@ -66,6 +66,12 @@ jobs:
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
+ - name: Save Godot build cache
+ uses: ./.github/actions/godot-cache-save
+ with:
+ cache-name: ${{ matrix.cache-name }}
+ continue-on-error: true
+
- name: Prepare artifact
run: |
lipo -create ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64 -output ./bin/godot.macos.${{ matrix.target }}.universal
diff --git a/.github/workflows/web_builds.yml b/.github/workflows/web_builds.yml
index 1eb7b901cd..de8339bf1b 100644
--- a/.github/workflows/web_builds.yml
+++ b/.github/workflows/web_builds.yml
@@ -52,8 +52,8 @@ jobs:
run: |
emcc -v
- - name: Setup Godot build cache
- uses: ./.github/actions/godot-cache
+ - name: Restore Godot build cache
+ uses: ./.github/actions/godot-cache-restore
with:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true
@@ -69,6 +69,12 @@ jobs:
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
+ - name: Save Godot build cache
+ uses: ./.github/actions/godot-cache-save
+ with:
+ cache-name: ${{ matrix.cache-name }}
+ continue-on-error: true
+
- name: Upload artifact
uses: ./.github/actions/upload-artifact
if: ${{ matrix.artifact }}
diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml
index 7a3347d49c..8c93179448 100644
--- a/.github/workflows/windows_builds.yml
+++ b/.github/workflows/windows_builds.yml
@@ -42,8 +42,8 @@ jobs:
with:
submodules: recursive
- - name: Setup Godot build cache
- uses: ./.github/actions/godot-cache
+ - name: Restore Godot build cache
+ uses: ./.github/actions/godot-cache-restore
with:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true
@@ -76,6 +76,12 @@ jobs:
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
+ - name: Save Godot build cache
+ uses: ./.github/actions/godot-cache-save
+ with:
+ cache-name: ${{ matrix.cache-name }}
+ continue-on-error: true
+
- name: Prepare artifact
run: |
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force