ソースを参照

Update build-kernel-a13.yml

James McConnell 1 年間 前
コミット
c23bafef20
1 ファイル変更18 行追加13 行削除
  1. 18 13
      .github/workflows/build-kernel-a13.yml

+ 18 - 13
.github/workflows/build-kernel-a13.yml

@@ -79,7 +79,6 @@ jobs:
             sub_level: "X"
             os_patch_level: "lts"
 
-
     steps:
       - name: Maximize build space
         uses: easimon/maximize-build-space@master
@@ -91,6 +90,23 @@ jobs:
           remove-haskell: 'true'
           remove-codeql: 'true'
 
+      - name: Set CONFIG Environment Variable
+        run: |
+          # Set CONFIG dynamically based on matrix values
+          CONFIG="${{ matrix.android_version }}-${{ matrix.kernel_version }}-${{ matrix.sub_level }}"
+          
+          # Set CONFIG as an environment variable for future steps
+          echo "CONFIG=$CONFIG" >> $GITHUB_ENV
+          
+          echo "CONFIG set to: $CONFIG"
+
+      - name: Setup ccache
+        uses: hendrikmuhs/ccache-action@v1
+        with:
+          key: gki-kernel-aarch64-${{ env.CONFIG }}  # Use CONFIG as the cache key
+          max-size: 2G
+          save: true  # Ensure the cache is saved
+
       - name: Download prebuilt toolchain
         run: |
           AOSP_MIRROR=https://android.googlesource.com
@@ -138,17 +154,6 @@ jobs:
           git clone https://github.com/TheWildJames/AnyKernel3.git -b "$ANYKERNEL_BRANCH"
           git clone https://gitlab.com/simonpunk/susfs4ksu.git -b "$SUSFS_BRANCH"
           git clone https://github.com/TheWildJames/kernel_patches.git
-
-
-      - name: Set CONFIG Environment Variable
-        run: |
-          # Set CONFIG dynamically based on matrix values
-          CONFIG="${{ matrix.android_version }}-${{ matrix.kernel_version }}-${{ matrix.sub_level }}"
-          
-          # Set CONFIG as an environment variable for future steps
-          echo "CONFIG=$CONFIG" >> $GITHUB_ENV
-          
-          echo "CONFIG set to: $CONFIG"
       
       - name: Initialize and Sync Kernel Source
         run: |
@@ -275,7 +280,7 @@ jobs:
           cd "$CONFIG"
           
           echo "Building the kernel..."
-          LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
+          LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh CC="/usr/bin/ccache clang"
 
       - name: Create Bootimgs Folder and Copy Images
         run: |