Pārlūkot izejas kodu

ci(workflows): add support for KrisKernel variant and enhance build conditions

Update the build workflow to include support for the KrisKernel variant, adding necessary configurations and conditions for module checks. Refactor the build type handling to accommodate the new variant and improve the clarity of the build process. Additionally, modify the sed command for versioning to reflect the new kernel variant, ensuring accurate output during builds.
TheWildJames 9 mēneši atpakaļ
vecāks
revīzija
10f25bda54
2 mainītis faili ar 30 papildinājumiem un 6 dzēšanām
  1. 25 6
      .github/workflows/build.yml
  2. 5 0
      .github/workflows/kernel-custom.yml

+ 25 - 6
.github/workflows/build.yml

@@ -35,7 +35,16 @@ jobs:
     strategy:
     strategy:
       fail-fast: false
       fail-fast: false
       matrix:
       matrix:
-        build_type: ${{ fromJSON(inputs.variant == 'vTomsonek' && '["vTomsonek"]' || inputs.variant == 'TheWildJames' && '["TheWildJames"]' || inputs.variant == 'MarionKernel' && '["MarionKernel"]' || '["Normal","Bypass"]') }}
+        build_type: >-
+          ${{
+            fromJSON(
+              inputs.variant == 'vTomsonek' && '["vTomsonek"]' ||
+              inputs.variant == 'TheWildJames' && '["TheWildJames"]' ||
+              inputs.variant == 'MarionKernel' && '["MarionKernel"]' ||
+              inputs.variant == 'KrisKernel' && '["KrisKernel"]' ||
+              '["Normal","Bypass"]'
+            )
+          }}
 
 
     steps:
     steps:
     - name: Maximize Build Space
     - name: Maximize Build Space
@@ -369,7 +378,7 @@ jobs:
         sed -i '/^config LSM$/,/^help$/{ /^[[:space:]]*default/ { /baseband_guard/! s/lockdown/lockdown,baseband_guard/ } }' common/security/Kconfig
         sed -i '/^config LSM$/,/^help$/{ /^[[:space:]]*default/ { /baseband_guard/! s/lockdown/lockdown,baseband_guard/ } }' common/security/Kconfig
 
 
     - name: Apply Module Check Bypass
     - name: Apply Module Check Bypass
-      if: ${{ matrix.build_type == 'Bypass' }}
+      if: ${{ matrix.build_type == 'Bypass' || matrix.build_type == 'KrisKernel' }}
       run: |
       run: |
         if [[ "${{ inputs.kernel_version }}" == "6.1" || "${{ inputs.kernel_version }}" == "6.6" || "${{ inputs.kernel_version }}" == "6.12" ]]; then
         if [[ "${{ inputs.kernel_version }}" == "6.1" || "${{ inputs.kernel_version }}" == "6.6" || "${{ inputs.kernel_version }}" == "6.12" ]]; then
           sed -i '/bad_version:/{:a;n;/return 0;/{s/return 0;/return 1;/;b};ba}' "$KERNEL_ROOT/common/kernel/module/version.c"
           sed -i '/bad_version:/{:a;n;/return 0;/{s/return 0;/return 1;/;b};ba}' "$KERNEL_ROOT/common/kernel/module/version.c"
@@ -439,9 +448,6 @@ jobs:
         CONFIG_IP_SET_HASH_NETIFACE=y
         CONFIG_IP_SET_HASH_NETIFACE=y
         CONFIG_IP_SET_LIST_SET=y
         CONFIG_IP_SET_LIST_SET=y
 
 
-        CONFIG_CFG80211=y
-        CONFIG_MAC80211=y
-
         CONFIG_KSU_SUSFS=y
         CONFIG_KSU_SUSFS=y
         CONFIG_KSU_SUSFS_SUS_SU=n
         CONFIG_KSU_SUSFS_SUS_SU=n
         EOF
         EOF
@@ -454,6 +460,16 @@ jobs:
           sed -i 's/check_defconfig//' ./common/build.config.gki
           sed -i 's/check_defconfig//' ./common/build.config.gki
         fi
         fi
 
 
+    - name: Configure Audio Modules
+      if: inputs.variant == 'KrisKernel'
+      working-directory: ${{ env.KERNEL_ROOT }}
+      run: |
+        cat >> "${{ env.DEFCONFIG }}" << 'EOF'
+        CONFIG_RFKILL=y
+        CONFIG_CFG80211=y
+        CONFIG_MAC80211=y
+        EOF
+
     - name: Configure SND
     - name: Configure SND
       if: inputs.variant == 'vTomsonek'
       if: inputs.variant == 'vTomsonek'
       working-directory: ${{ env.KERNEL_ROOT }}
       working-directory: ${{ env.KERNEL_ROOT }}
@@ -582,7 +598,10 @@ jobs:
               perl -i -0777 -pe 's/(.*)echo "\$res"/$1echo "\$res-🟢-Wild-Exclusive"/s' ./common/scripts/setlocalversion
               perl -i -0777 -pe 's/(.*)echo "\$res"/$1echo "\$res-🟢-Wild-Exclusive"/s' ./common/scripts/setlocalversion
               ;;
               ;;
             MarionKernel)
             MarionKernel)
-              perl -i -0777 -pe 's/(.*)echo "\$res"/$1echo "\$res-MarionKernel"/s' ./common/scripts/setlocalversion
+              perl -i -0777 -pe 's/(.*)echo "\$res"/$1echo "\$res-Wild-MarionKernel"/s' ./common/scripts/setlocalversion
+              ;;
+            KrisKernel)
+              perl -i -0777 -pe 's/(.*)echo "\$res"/$1echo "\$res-Wild-KrisKernel"/s' ./common/scripts/setlocalversion
               ;;
               ;;
             *)
             *)
               perl -i -0777 -pe 's/(.*)echo "\$res"/$1echo "\$res-Wild"/s' ./common/scripts/setlocalversion
               perl -i -0777 -pe 's/(.*)echo "\$res"/$1echo "\$res-Wild"/s' ./common/scripts/setlocalversion

+ 5 - 0
.github/workflows/kernel-custom.yml

@@ -35,6 +35,11 @@ jobs:
           sub_level: "157"
           sub_level: "157"
           os_patch_level: "2025-12"
           os_patch_level: "2025-12"
           variant: "MarionKernel"
           variant: "MarionKernel"
+        - android_version: "android14"
+          kernel_version: "6.1"
+          sub_level: "128"
+          os_patch_level: "2025-03"
+          variant: "KrisKernel"
 
 
     uses: ./.github/workflows/build.yml
     uses: ./.github/workflows/build.yml
     secrets: inherit
     secrets: inherit