Merge pull request #94469 from AThousandShips/cache_improve_4_2
[4.2][CI] Upload build cache before running tests
This commit is contained in:
commit
12ae52fd7d
|
@ -1,18 +1,17 @@
|
||||||
name: Setup Godot build cache
|
name: Restore Godot build cache
|
||||||
description: Setup Godot build cache.
|
description: Restore Godot build cache.
|
||||||
inputs:
|
inputs:
|
||||||
cache-name:
|
cache-name:
|
||||||
description: The cache base name (job name by default).
|
description: The cache base name (job name by default).
|
||||||
default: "${{github.job}}"
|
default: "${{github.job}}"
|
||||||
scons-cache:
|
scons-cache:
|
||||||
description: The scons cache path.
|
description: The SCons cache path.
|
||||||
default: "${{github.workspace}}/.scons-cache/"
|
default: "${{github.workspace}}/.scons-cache/"
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
# Upload cache on completion and check it out now
|
- name: Restore SCons cache directory
|
||||||
- name: Load .scons_cache directory
|
uses: actions/cache/restore@v4
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: ${{inputs.scons-cache}}
|
path: ${{inputs.scons-cache}}
|
||||||
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
|
@ -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}}
|
|
@ -26,8 +26,8 @@ jobs:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Setup Godot build cache
|
- name: Restore Godot build cache
|
||||||
uses: ./.github/actions/godot-cache
|
uses: ./.github/actions/godot-cache-restore
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Setup python and scons
|
- name: Setup python and scons
|
||||||
|
@ -49,6 +49,10 @@ jobs:
|
||||||
target: template_release
|
target: template_release
|
||||||
tests: false
|
tests: false
|
||||||
|
|
||||||
|
- name: Save Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-save
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Generate Godot templates
|
- name: Generate Godot templates
|
||||||
run: |
|
run: |
|
||||||
cd platform/android/java
|
cd platform/android/java
|
||||||
|
|
|
@ -20,8 +20,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Godot build cache
|
- name: Restore Godot build cache
|
||||||
uses: ./.github/actions/godot-cache
|
uses: ./.github/actions/godot-cache-restore
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Setup python and scons
|
- name: Setup python and scons
|
||||||
|
@ -35,5 +35,9 @@ jobs:
|
||||||
target: template_release
|
target: template_release
|
||||||
tests: false
|
tests: false
|
||||||
|
|
||||||
|
- name: Save Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-save
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: ./.github/actions/upload-artifact
|
uses: ./.github/actions/upload-artifact
|
||||||
|
|
|
@ -102,8 +102,8 @@ jobs:
|
||||||
sudo rm -rf /usr/local/lib/android
|
sudo rm -rf /usr/local/lib/android
|
||||||
echo "Disk usage after:" && df -h
|
echo "Disk usage after:" && df -h
|
||||||
|
|
||||||
- name: Setup Godot build cache
|
- name: Restore Godot build cache
|
||||||
uses: ./.github/actions/godot-cache
|
uses: ./.github/actions/godot-cache-restore
|
||||||
with:
|
with:
|
||||||
cache-name: ${{ matrix.cache-name }}
|
cache-name: ${{ matrix.cache-name }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
@ -128,6 +128,12 @@ jobs:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
tests: ${{ matrix.tests }}
|
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
|
- name: Generate C# glue
|
||||||
if: ${{ matrix.build-mono }}
|
if: ${{ matrix.build-mono }}
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -35,8 +35,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Godot build cache
|
- name: Restore Godot build cache
|
||||||
uses: ./.github/actions/godot-cache
|
uses: ./.github/actions/godot-cache-restore
|
||||||
with:
|
with:
|
||||||
cache-name: ${{ matrix.cache-name }}
|
cache-name: ${{ matrix.cache-name }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
@ -64,6 +64,12 @@ jobs:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
tests: ${{ matrix.tests }}
|
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
|
- name: Prepare artifact
|
||||||
run: |
|
run: |
|
||||||
lipo -create ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64 -output ./bin/godot.macos.${{ matrix.target }}.universal
|
lipo -create ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64 -output ./bin/godot.macos.${{ matrix.target }}.universal
|
||||||
|
|
|
@ -33,8 +33,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
emcc -v
|
emcc -v
|
||||||
|
|
||||||
- name: Setup Godot build cache
|
- name: Restore Godot build cache
|
||||||
uses: ./.github/actions/godot-cache
|
uses: ./.github/actions/godot-cache-restore
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Setup python and scons
|
- name: Setup python and scons
|
||||||
|
@ -48,5 +48,9 @@ jobs:
|
||||||
target: template_release
|
target: template_release
|
||||||
tests: false
|
tests: false
|
||||||
|
|
||||||
|
- name: Save Godot build cache
|
||||||
|
uses: ./.github/actions/godot-cache-save
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: ./.github/actions/upload-artifact
|
uses: ./.github/actions/upload-artifact
|
||||||
|
|
|
@ -40,8 +40,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Godot build cache
|
- name: Restore Godot build cache
|
||||||
uses: ./.github/actions/godot-cache
|
uses: ./.github/actions/godot-cache-restore
|
||||||
with:
|
with:
|
||||||
cache-name: ${{ matrix.cache-name }}
|
cache-name: ${{ matrix.cache-name }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
@ -60,6 +60,12 @@ jobs:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
tests: ${{ matrix.tests }}
|
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
|
- name: Prepare artifact
|
||||||
run: |
|
run: |
|
||||||
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
|
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
|
||||||
|
|
Loading…
Reference in New Issue