From 344d678bbecf15fe76407e635c30713aef79fc3d Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Thu, 21 Nov 2024 13:32:53 +0100 Subject: [PATCH] [Buildsystem] Tweak cache sizes for CI --- .github/workflows/android_builds.yml | 4 ++++ .github/workflows/ios_builds.yml | 1 + .github/workflows/linux_builds.yml | 7 +++++++ .github/workflows/macos_builds.yml | 4 ++++ .github/workflows/web_builds.yml | 1 + .github/workflows/windows_builds.yml | 5 +++++ 6 files changed, 22 insertions(+) diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml index 950e1e51cc4..2803ff4b5e8 100644 --- a/.github/workflows/android_builds.yml +++ b/.github/workflows/android_builds.yml @@ -25,18 +25,21 @@ jobs: target: editor tests: false sconsflags: arch=arm64 production=yes swappy=yes + cache-limit: 1 - name: Template arm32 (target=template_release, arch=arm32) cache-name: android-template-arm32 target: template_release tests: false sconsflags: arch=arm32 swappy=yes + cache-limit: 1 - name: Template arm64 (target=template_release, arch=arm64) cache-name: android-template-arm64 target: template_release tests: false sconsflags: arch=arm64 swappy=yes + cache-limit: 1 steps: - name: Checkout @@ -77,6 +80,7 @@ jobs: platform: android target: ${{ matrix.target }} tests: ${{ matrix.tests }} + scons-cache-limit: ${{ matrix.cache-limit }} - name: Save Godot build cache uses: ./.github/actions/godot-cache-save diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml index 8513429f9a6..270204ebe50 100644 --- a/.github/workflows/ios_builds.yml +++ b/.github/workflows/ios_builds.yml @@ -37,6 +37,7 @@ jobs: platform: ios target: template_release tests: false + scons-cache-limit: 1 - name: Save Godot build cache uses: ./.github/actions/godot-cache-save diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index bd4e2856e39..972e29b7e56 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -35,6 +35,7 @@ jobs: proj-conv: true api-compat: true artifact: true + cache-limit: 1 - name: Editor with doubles and GCC sanitizers (target=editor, tests=yes, dev_build=yes, scu_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=gold) cache-name: linux-editor-double-sanitizers @@ -49,6 +50,7 @@ jobs: api-dump: true # Skip 2GiB artifact speeding up action. artifact: false + cache-limit: 7 - name: Editor with clang sanitizers (target=editor, tests=yes, dev_build=yes, use_asan=yes, use_ubsan=yes, use_llvm=yes, linker=lld) cache-name: linux-editor-llvm-sanitizers @@ -61,6 +63,7 @@ jobs: artifact: false # Test our oldest supported SCons/Python versions on one arbitrary editor build. legacy-scons: true + cache-limit: 7 - name: Editor with ThreadSanitizer (target=editor, tests=yes, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld) cache-name: linux-editor-thread-sanitizer @@ -71,6 +74,7 @@ jobs: build-mono: false # Skip 2GiB artifact speeding up action. artifact: false + cache-limit: 5 - name: Template w/ Mono (target=template_release, tests=yes) cache-name: linux-template-mono @@ -80,6 +84,7 @@ jobs: build-mono: false tests: true artifact: true + cache-limit: 1 - name: Minimal template (target=template_release, tests=yes, everything disabled) cache-name: linux-template-minimal @@ -88,6 +93,7 @@ jobs: bin: ./bin/godot.linuxbsd.template_release.x86_64 tests: true artifact: true + cache-limit: 1 steps: - name: Checkout @@ -143,6 +149,7 @@ jobs: platform: linuxbsd target: ${{ matrix.target }} tests: ${{ matrix.tests }} + scons-cache-limit: ${{ matrix.cache-limit }} - name: Save Godot build cache uses: ./.github/actions/godot-cache-save diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml index fcf4b00afb1..3fedc2a5c9a 100644 --- a/.github/workflows/macos_builds.yml +++ b/.github/workflows/macos_builds.yml @@ -25,6 +25,7 @@ jobs: target: editor tests: true bin: ./bin/godot.macos.editor.universal + cache-limit: 1 - name: Template (target=template_release, tests=yes) cache-name: macos-template @@ -32,6 +33,7 @@ jobs: tests: true sconsflags: debug_symbols=no bin: ./bin/godot.macos.template_release.universal + cache-limit: 1 steps: - name: Checkout @@ -59,6 +61,7 @@ jobs: platform: macos target: ${{ matrix.target }} tests: ${{ matrix.tests }} + scons-cache-limit: 0 # Only cap on second run to avoid purging unnecessarily - name: Compilation (arm64) uses: ./.github/actions/godot-build @@ -67,6 +70,7 @@ jobs: platform: macos target: ${{ matrix.target }} tests: ${{ matrix.tests }} + scons-cache-limit: ${{ matrix.cache-limit }} - name: Save Godot build cache uses: ./.github/actions/godot-cache-save diff --git a/.github/workflows/web_builds.yml b/.github/workflows/web_builds.yml index 9ed84757690..dac6270b2bd 100644 --- a/.github/workflows/web_builds.yml +++ b/.github/workflows/web_builds.yml @@ -67,6 +67,7 @@ jobs: platform: web target: ${{ matrix.target }} tests: ${{ matrix.tests }} + scons-cache-limit: 0.5 - name: Save Godot build cache uses: ./.github/actions/godot-cache-save diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml index 384284b6047..26b77154379 100644 --- a/.github/workflows/windows_builds.yml +++ b/.github/workflows/windows_builds.yml @@ -31,6 +31,7 @@ jobs: sconsflags: debug_symbols=no vsproj=yes vsproj_gen_only=no windows_subsystem=console bin: ./bin/godot.windows.editor.x86_64.exe compiler: msvc + cache-limit: 2 - name: Editor w/ clang-cl (target=editor, tests=yes, use_llvm=yes) cache-name: windows-editor-clang @@ -39,6 +40,7 @@ jobs: sconsflags: debug_symbols=no windows_subsystem=console use_llvm=yes bin: ./bin/godot.windows.editor.x86_64.llvm.exe compiler: clang + cache-limit: 1 - name: Template (target=template_release, tests=yes) cache-name: windows-template @@ -47,6 +49,7 @@ jobs: sconsflags: debug_symbols=no bin: ./bin/godot.windows.template_release.x86_64.console.exe compiler: msvc + cache-limit: 2 - name: Template w/ GCC (target=template_release, tests=yes, use_mingw=yes) cache-name: windows-template-gcc @@ -56,6 +59,7 @@ jobs: sconsflags: debug_symbols=no use_mingw=yes bin: ./bin/godot.windows.template_release.x86_64.console.exe compiler: gcc + cache-limit: 1 steps: - name: Checkout @@ -101,6 +105,7 @@ jobs: platform: windows target: ${{ matrix.target }} tests: ${{ matrix.tests }} + scons-cache-limit: ${{ matrix.cache-limit }} - name: Save Godot build cache uses: ./.github/actions/godot-cache-save