Quellcode durchsuchen

ci(build): isolate ccache/bazel caches per variant

Append -${{ inputs.variant }} to cache_key for restore/save of both
ccache and bazel buckets so KernelSU / KernelSU-Next / ReSukiSU no longer
race on the same asset (cache-android14-6.1.157-2025-12.tzst). Fallback via
restore_keys still finds old shared caches on first run then seeds
variant-specific assets

Co-Authored-By: internal-model
TheWildJames vor 1 Woche
Ursprung
Commit
71050353c3
1 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 4 4
      .github/workflows/build.yml

+ 4 - 4
.github/workflows/build.yml

@@ -398,7 +398,7 @@ jobs:
       uses: ./.github/actions/cache-restore
       with:
         cache_path: /home/runner/.ccache
-        cache_key: ${{ inputs.android_version }}-${{ inputs.kernel_version }}.${{ steps.extract.outputs.sublevel }}-${{ inputs.os_patch_level }}
+        cache_key: ${{ inputs.android_version }}-${{ inputs.kernel_version }}.${{ steps.extract.outputs.sublevel }}-${{ inputs.os_patch_level }}-${{ inputs.variant }}
         cache_bucket: ccache-cache
         restore_keys: |
           ${{ inputs.android_version }}-${{ inputs.kernel_version }}.${{ steps.extract.outputs.sublevel }}-
@@ -410,7 +410,7 @@ jobs:
       uses: ./.github/actions/cache-restore
       with:
         cache_path: /home/runner/.cache/bazel
-        cache_key: ${{ inputs.android_version }}-${{ inputs.kernel_version }}.${{ steps.extract.outputs.sublevel }}-${{ inputs.os_patch_level }}
+        cache_key: ${{ inputs.android_version }}-${{ inputs.kernel_version }}.${{ steps.extract.outputs.sublevel }}-${{ inputs.os_patch_level }}-${{ inputs.variant }}
         cache_bucket: bazel-cache
         restore_keys: |
           ${{ inputs.android_version }}-${{ inputs.kernel_version }}.${{ steps.extract.outputs.sublevel }}-
@@ -491,7 +491,7 @@ jobs:
       if: always() && inputs.use_cache && (inputs.version == 'android12-5.10' || inputs.version == 'android13-5.10' || inputs.version == 'android13-5.15')
       with:
         cache_path: /home/runner/.ccache
-        cache_key: ${{ inputs.android_version }}-${{ inputs.kernel_version }}.${{ steps.extract.outputs.sublevel }}-${{ inputs.os_patch_level }}
+        cache_key: ${{ inputs.android_version }}-${{ inputs.kernel_version }}.${{ steps.extract.outputs.sublevel }}-${{ inputs.os_patch_level }}-${{ inputs.variant }}
         cache_bucket: "ccache-cache"
         compression_level: 9
         github_token: ${{ github.token }}
@@ -502,7 +502,7 @@ jobs:
       if: always() && inputs.use_cache && (inputs.version == 'android14-5.15' || inputs.version == 'android14-6.1' || inputs.version == 'android15-6.6' || inputs.version == 'android16-6.12')
       with:
         cache_path: /home/runner/.cache/bazel
-        cache_key: ${{ inputs.android_version }}-${{ inputs.kernel_version }}.${{ steps.extract.outputs.sublevel }}-${{ inputs.os_patch_level }}
+        cache_key: ${{ inputs.android_version }}-${{ inputs.kernel_version }}.${{ steps.extract.outputs.sublevel }}-${{ inputs.os_patch_level }}-${{ inputs.variant }}
         cache_bucket: "bazel-cache"
         compression_level: 9
         github_token: ${{ github.token }}