From 6d79b7474ece5e871316d00b79ece69acfc0f817 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Sun, 1 Dec 2024 15:20:13 +0100 Subject: [PATCH] GHA: Don't use SCons cache in release builds --- .github/workflows/android.yml | 19 ++++++++++--------- .github/workflows/gdextension.yml | 5 +++-- .github/workflows/ios.yml | 19 ++++++++++--------- .github/workflows/linux.yml | 1 + .github/workflows/macos.yml | 1 + .github/workflows/web.yml | 19 ++++++++++--------- 6 files changed, 35 insertions(+), 29 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 1bd4398..1f81d2e 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -165,15 +165,16 @@ jobs: python --version scons --version - - name: Set up scons cache - uses: actions/cache@v4 - with: - path: ${{github.workspace}}/.scons_cache/ - key: ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} - restore-keys: | - ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} - ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}} - ${{env.BIN}}-${{inputs.godot-ref}} + # ! Note: we stopped using the scons cache in release builds. + # - name: Set up scons cache + # uses: actions/cache@v4 + # with: + # path: ${{github.workspace}}/.scons_cache/ + # key: ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} + # restore-keys: | + # ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} + # ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}} + # ${{env.BIN}}-${{inputs.godot-ref}} - name: Compilation env: diff --git a/.github/workflows/gdextension.yml b/.github/workflows/gdextension.yml index dc3d82a..b784816 100644 --- a/.github/workflows/gdextension.yml +++ b/.github/workflows/gdextension.yml @@ -11,7 +11,7 @@ on: type: string default: master test-build: - description: Limit the number of test builds + description: Limit to pre-defined test builds type: boolean default: false debug-symbols: @@ -30,7 +30,7 @@ on: type: string default: master test-build: - description: Limit the number of test builds + description: Limit to pre-defined test builds type: boolean default: false debug-symbols: @@ -285,6 +285,7 @@ jobs: uses: ammaraskar/msvc-problem-matcher@master - name: Set up scons cache + if: inputs.test-build # ! Only cache test/PR builds uses: actions/cache@v4 with: path: ${{github.workspace}}/.scons_cache/ diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index ce4cbb9..d256d2a 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -145,15 +145,16 @@ jobs: rm -Rf /tmp/InstallVulkan.app rm -f /tmp/vulkan-sdk.zip - - name: Set up scons cache - uses: actions/cache@v4 - with: - path: ${{github.workspace}}/.scons_cache/ - key: ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} - restore-keys: | - ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} - ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}} - ${{env.BIN}}-${{inputs.godot-ref}} + # ! Note: we stopped using the scons cache in release builds. + # - name: Set up scons cache + # uses: actions/cache@v4 + # with: + # path: ${{github.workspace}}/.scons_cache/ + # key: ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} + # restore-keys: | + # ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} + # ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}} + # ${{env.BIN}}-${{inputs.godot-ref}} - name: Compilation env: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index fa02103..dc68f03 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -227,6 +227,7 @@ jobs: sudo apt-get install libwayland-dev - name: Set up scons cache + if: inputs.test-build # ! Only cache test/PR builds uses: actions/cache@v4 with: path: ${{github.workspace}}/.scons_cache/ diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a737c41..4a871cc 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -175,6 +175,7 @@ jobs: rm -f /tmp/vulkan-sdk.zip - name: Set up scons cache + if: inputs.test-build # ! Only cache test/PR builds uses: actions/cache@v4 with: path: ${{github.workspace}}/.scons_cache/ diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index b5c434d..db8b75c 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -120,15 +120,16 @@ jobs: python --version scons --version - - name: Set up scons cache - uses: actions/cache@v4 - with: - path: ${{github.workspace}}/.scons_cache/ - key: ${{env.CACHE_NAME}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} - restore-keys: | - ${{env.CACHE_NAME}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} - ${{env.CACHE_NAME}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}} - ${{env.CACHE_NAME}}-${{inputs.godot-ref}} + # ! Note: we stopped using the scons cache in release builds. + # - name: Set up scons cache + # uses: actions/cache@v4 + # with: + # path: ${{github.workspace}}/.scons_cache/ + # key: ${{env.CACHE_NAME}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} + # restore-keys: | + # ${{env.CACHE_NAME}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} + # ${{env.CACHE_NAME}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}} + # ${{env.CACHE_NAME}}-${{inputs.godot-ref}} - name: Compilation env: