Skip to content

Commit

Permalink
ci: use caching actions from godot-cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
unvermuthet committed Mar 5, 2025
1 parent 8e13217 commit 102b934
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,26 @@ jobs:
em-version: 3.1.62

# Build GDExtension (with caches)
- name: Cache .scons_cache
uses: actions/cache@v4

- name: Restore .scons_cache
uses: ./godot-cpp/.github/actions/godot-cache-restore
with:
path: ${{ github.workspace }}/.scons-cache/
key: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }}_cache
scons-cache: ${{ github.workspace }}/.scons-cache/
cache-name: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }}

- name: Build GDExtension Debug Build
shell: sh
env:
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
run: |
scons target=${{ matrix.target-type }} platform=${{ matrix.target.platform }} arch=${{ matrix.target.arch }} precision=${{ matrix.float-precision }}
- name: Save .scons_cache
uses: ./godot-cpp/.github/actions/godot-cache-save
with:
scons-cache: ${{ github.workspace }}/.scons-cache/
cache-name: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }}

# Sign the binary (macOS only)
- name: Mac Sign
# Disable sign if secrets are not set
Expand All @@ -94,9 +102,9 @@ jobs:
# Clean up compilation files
- name: Windows - Delete compilation files
if: ${{ matrix.target.platform == 'windows' }}
shell: pwsh
shell: sh
run: |
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
rm -f bin/windows/*.exp bin/windows/*.lib bin/windows/*.pdb
# Upload the build
- name: Upload Artifact
Expand Down

0 comments on commit 102b934

Please sign in to comment.