Skip to content

Commit

Permalink
Cache PR build objects for faster iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
limbonaut committed Jan 24, 2025
1 parent 1444be1 commit d913819
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build_gdextension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,23 @@ jobs:
python --version
scons --version
# Cache PR builds to reduce build time and speed up iteration.
- name: Set up SCons cache for PR builds
if: github.event_name == 'pull_request'
uses: actions/cache@v4
env:
KEY_BASE: ${{matrix.platform}}-${{matrix.target}}-${{matrix.arch}}
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{env.KEY_BASE}}-${{github.sha}}
restore-keys: |
${{env.KEY_BASE}}-${{github.sha}}
${{env.KEY_BASE}}
- name: Compile GDExtension library
shell: bash
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
run: |
scons platform=${{matrix.platform}} target=${{matrix.target}} arch=${{matrix.arch}}
Expand Down

0 comments on commit d913819

Please sign in to comment.