Skip to content

Commit d913819

Browse files
committed
Cache PR build objects for faster iteration
1 parent 1444be1 commit d913819

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/build_gdextension.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,23 @@ jobs:
8282
python --version
8383
scons --version
8484
85+
# Cache PR builds to reduce build time and speed up iteration.
86+
- name: Set up SCons cache for PR builds
87+
if: github.event_name == 'pull_request'
88+
uses: actions/cache@v4
89+
env:
90+
KEY_BASE: ${{matrix.platform}}-${{matrix.target}}-${{matrix.arch}}
91+
with:
92+
path: ${{github.workspace}}/.scons_cache/
93+
key: ${{env.KEY_BASE}}-${{github.sha}}
94+
restore-keys: |
95+
${{env.KEY_BASE}}-${{github.sha}}
96+
${{env.KEY_BASE}}
97+
8598
- name: Compile GDExtension library
8699
shell: bash
100+
env:
101+
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
87102
run: |
88103
scons platform=${{matrix.platform}} target=${{matrix.target}} arch=${{matrix.arch}}
89104

0 commit comments

Comments
 (0)