Parcourir la source

ci(workflows): update build configurations and add new kernel variant

Enhance the build workflow by adding support for the MarionKernel variant and updating artifact naming conventions. Adjustments include refining the build type handling and adding new sub-level and OS patch level configurations for kernel version 6.1. Additionally, the .gitignore file is updated to include 'patch-rejects' for better management of generated files.
TheWildJames il y a 9 mois
Parent
commit
1f84221055

+ 29 - 16
.github/workflows/build.yml

@@ -35,7 +35,7 @@ jobs:
     strategy:
     strategy:
       fail-fast: false
       fail-fast: false
       matrix:
       matrix:
-        build_type: ${{ fromJSON(inputs.variant == 'vTomsonek' && '["vTomsonek"]' || inputs.variant == 'TheWildJames' && '["TheWildJames"]' || '["normal","bypass"]') }}
+        build_type: ${{ fromJSON(inputs.variant == 'vTomsonek' && '["vTomsonek"]' || inputs.variant == 'TheWildJames' && '["TheWildJames"]' || inputs.variant == 'MarionKernel' && '["MarionKernel"]' || '["Normal","Bypass"]') }}
 
 
     steps:
     steps:
       - name: Check Initial Disk Space
       - name: Check Initial Disk Space
@@ -175,7 +175,7 @@ jobs:
 
 
       - name: Set file name
       - name: Set file name
         run: |
         run: |
-          ARTIFACT_BASE="${{ inputs.kernel_version }}.$ACTUAL_SUBLEVEL-${{ inputs.android_version }}-${{ inputs.os_patch_level }}-${{ matrix.build_type == 'bypass' && 'Bypass' || matrix.build_type == 'vTomsonek' && 'vTomsonek' || matrix.build_type == 'TheWildJames' && 'TheWildJames' || 'Normal' }}"
+          ARTIFACT_BASE="${{ inputs.kernel_version }}.$ACTUAL_SUBLEVEL-${{ inputs.android_version }}-${{ inputs.os_patch_level }}-${{ matrix.build_type }}"
           echo "ARTIFACT_BASE=$ARTIFACT_BASE" >> $GITHUB_ENV
           echo "ARTIFACT_BASE=$ARTIFACT_BASE" >> $GITHUB_ENV
           echo "FILE_NAME=$ARTIFACT_BASE" >> $GITHUB_ENV
           echo "FILE_NAME=$ARTIFACT_BASE" >> $GITHUB_ENV
 
 
@@ -400,7 +400,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' }}
         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"
@@ -651,17 +651,21 @@ jobs:
         working-directory: ${{ env.KERNEL_ROOT }}
         working-directory: ${{ env.KERNEL_ROOT }}
         run: |
         run: |
           #Wild to Kernel Version
           #Wild to Kernel Version
-          case ${{ matrix.build_type }} in
-            TheWildJames)
-              sed -i '$s|echo "\$res"|echo "\$res-🟢-Wild-Exclusive"|' ./common/scripts/setlocalversion
-              ;;
-            *)
-              sed -i '$s|echo "\$res"|echo "\$res-Wild"|' ./common/scripts/setlocalversion
-              ;;
-          esac
-          #Set Kernel Timestamp
-          #UTS_VERSION="#1 SMP PREEMPT $(date -u +%a\ %b\ %d\ %H:%M:%S\ UTC\ %Y)"
-          #perl -pi -e "s|UTS_VERSION=\".*\"|UTS_VERSION=\"${UTS_VERSION}\"|" ./common/scripts/mkcompile_h
+          if [[ "${{ inputs.kernel_version }}" == "5."* ]] || [[ "${{ inputs.kernel_version }}" == "6.1" ]]; then
+            case ${{ matrix.build_type }} in
+              TheWildJames)
+                sed -i '$s|echo "\$res"|echo "\$res-🟢-Wild-Exclusive"|' ./common/scripts/setlocalversion
+                ;;
+              MarionKernel)
+                sed -i '$s|echo "\$res"|echo "\$res-MarionKernel"|' ./common/scripts/setlocalversion
+                ;;
+              *)
+                sed -i '$s|echo "\$res"|echo "\$res-Wild"|' ./common/scripts/setlocalversion
+                ;;
+            esac
+          else
+            sed -i 's|echo "${KERNELVERSION}${file_localversion}${config_localversion}${LOCALVERSION}${scm_version}"|echo "${KERNELVERSION}${file_localversion}${config_localversion}${LOCALVERSION}-Wild${scm_version}"|' ./common/scripts/setlocalversion
+          fi
           if [ -f "build/build.sh" ]; then
           if [ -f "build/build.sh" ]; then
             #Remove Dirty Flag
             #Remove Dirty Flag
             sed -i 's/-dirty//' ./common/scripts/setlocalversion
             sed -i 's/-dirty//' ./common/scripts/setlocalversion
@@ -678,6 +682,7 @@ jobs:
         run : |
         run : |
           set -ex
           set -ex
           echo "Building the kernel..."
           echo "Building the kernel..."
+          export KBUILD_BUILD_TIMESTAMP="$(date -u)"
           if [ -f "build/build.sh" ]; then
           if [ -f "build/build.sh" ]; then
             LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh || exit 1
             LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh || exit 1
           else
           else
@@ -970,13 +975,21 @@ jobs:
             echo "  No rejected patches found." >> build_summary.md
             echo "  No rejected patches found." >> build_summary.md
           fi
           fi
 
 
-      - name: Artifacts
+      - name: Upload AnyKernel3
+        if: ${{ always() }}
+        uses: actions/upload-artifact@v4
+        with:
+          name: ${{ env.FILE_NAME }}-AnyKernel3
+          path: ./AnyKernel3/**
+          if-no-files-found: ignore
+          compression-level: 9
+
+      - name: Upload Misc
         if: ${{ always() }}
         if: ${{ always() }}
         uses: actions/upload-artifact@v4
         uses: actions/upload-artifact@v4
         with:
         with:
           name: ${{ env.FILE_NAME }}-Misc
           name: ${{ env.FILE_NAME }}-Misc
           path: |
           path: |
-            ./AnyKernel3/**
             *-Image*
             *-Image*
             *.img
             *.img
             patch-rejects/**
             patch-rejects/**

+ 2 - 0
.github/workflows/kernel-a14-6-1.yml

@@ -77,6 +77,8 @@ jobs:
             os_patch_level: "2025-08"
             os_patch_level: "2025-08"
           - sub_level: "145"
           - sub_level: "145"
             os_patch_level: "2025-09"
             os_patch_level: "2025-09"
+          - sub_level: "147"
+            os_patch_level: "2025-12"
           - sub_level: "X"
           - sub_level: "X"
             os_patch_level: "lts"
             os_patch_level: "lts"
     uses: ./.github/workflows/build.yml
     uses: ./.github/workflows/build.yml

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

@@ -30,6 +30,11 @@ jobs:
             sub_level: "134"
             sub_level: "134"
             os_patch_level: "2025-05"
             os_patch_level: "2025-05"
             variant: "TheWildJames"
             variant: "TheWildJames"
+          - android_version: "android14"
+            kernel_version: "6.1"
+            sub_level: "147"
+            os_patch_level: "2025-12"
+            variant: "MarionKernel"
 
 
     uses: ./.github/workflows/build.yml
     uses: ./.github/workflows/build.yml
     secrets: inherit
     secrets: inherit

+ 2 - 1
.gitignore

@@ -1,3 +1,4 @@
 download.sh
 download.sh
 common-2025-09
 common-2025-09
-common-lts
+common-lts
+patch-rejects