Răsfoiți Sursa

ci(workflows): add support for Next variant in build workflow

Enhance the build workflow by incorporating support for the Next variant. This includes updating conditional checks, versioning logic, and environment variable settings to accommodate the new variant. Additionally, the workflow now includes specific handling for the Next variant in various stages, ensuring a seamless integration into the existing build process.
TheWildJames 9 luni în urmă
părinte
comite
1baacc5683
2 a modificat fișierele cu 39 adăugiri și 6 ștergeri
  1. 38 5
      .github/workflows/build.yml
  2. 1 1
      .github/workflows/main.yml

+ 38 - 5
.github/workflows/build.yml

@@ -124,6 +124,9 @@ jobs:
             esac
             esac
             git checkout "$COMMIT"
             git checkout "$COMMIT"
             ;;
             ;;
+          Next)
+            echo "Not Needed"
+            ;;
           KSU)
           KSU)
             echo "Not Needed"
             echo "Not Needed"
             ;;
             ;;
@@ -205,9 +208,16 @@ jobs:
               curl -LSs "https://raw.githubusercontent.com/WildKernels/Wild_KSU/wild/kernel/setup.sh" | bash -s wild
               curl -LSs "https://raw.githubusercontent.com/WildKernels/Wild_KSU/wild/kernel/setup.sh" | bash -s wild
             fi
             fi
             ;;
             ;;
+          Next)
+            if [ -n "${{ inputs.ksu_commit }}" ]; then
+              curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/main/kernel/setup.sh" | bash -s "${{ inputs.ksu_commit }}"
+            else
+              curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/main/kernel/setup.sh" | bash -s dev
+            fi
+            ;;
           KSU)
           KSU)
             if [ -n "${{ inputs.ksu_commit }}" ]; then
             if [ -n "${{ inputs.ksu_commit }}" ]; then
-              curl -LSs "https://raw.githubusercontent.com/WildKernels/KernelSU/main/kernel/setup.sh" | bash -s "${{ inputs.ksu_commit }}"
+              curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s "${{ inputs.ksu_commit }}"
             else
             else
               curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main
               curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main
             fi
             fi
@@ -225,9 +235,15 @@ jobs:
             COMMIT_COUNT=$(git -C "$KERNEL_ROOT/Wild_KSU" rev-list --count HEAD)
             COMMIT_COUNT=$(git -C "$KERNEL_ROOT/Wild_KSU" rev-list --count HEAD)
             KSU_VERSION=$(expr $BASE_VERSION + $COMMIT_COUNT)
             KSU_VERSION=$(expr $BASE_VERSION + $COMMIT_COUNT)
             ;;
             ;;
+          Next)
+            # NEW scheme
+            BASE_VERSION=30000
+            COMMIT_COUNT=$(git -C "$KERNEL_ROOT/KernelSU-Next" rev-list --count HEAD)
+            KSU_VERSION=$(expr $BASE_VERSION + $COMMIT_COUNT)
+            ;;
           KSU)
           KSU)
             # NEW scheme
             # NEW scheme
-            BASE_VERSION=20000
+            BASE_VERSION=30000
             COMMIT_COUNT=$(git -C "$KERNEL_ROOT/KernelSU" rev-list --count HEAD)
             COMMIT_COUNT=$(git -C "$KERNEL_ROOT/KernelSU" rev-list --count HEAD)
             KSU_VERSION=$(expr $BASE_VERSION + $COMMIT_COUNT)
             KSU_VERSION=$(expr $BASE_VERSION + $COMMIT_COUNT)
             ;;
             ;;
@@ -235,6 +251,7 @@ jobs:
         echo "KSUVER=$KSU_VERSION" >> $GITHUB_ENV
         echo "KSUVER=$KSU_VERSION" >> $GITHUB_ENV
 
 
     - name: Apply SUSFS Patches for KernelSU Variants
     - name: Apply SUSFS Patches for KernelSU Variants
+      if: ${{ inputs.ksu_variant == 'WKSU' || inputs.ksu_variant != 'Next' || inputs.ksu_variant == 'KSU' }}
       working-directory: ${{ env.KERNEL_ROOT }}
       working-directory: ${{ env.KERNEL_ROOT }}
       run: |
       run: |
         
         
@@ -243,6 +260,9 @@ jobs:
           WKSU)
           WKSU)
             SUSFS_VERSION="1.5.12"
             SUSFS_VERSION="1.5.12"
           ;;
           ;;
+          Next)
+            SUSFS_VERSION="2.0.0"
+          ;;
           KSU)
           KSU)
             SUSFS_VERSION="2.0.0"
             SUSFS_VERSION="2.0.0"
           ;;
           ;;
@@ -259,6 +279,8 @@ jobs:
 
 
         if [ "${{ inputs.ksu_variant }}" == "WKSU" ]; then
         if [ "${{ inputs.ksu_variant }}" == "WKSU" ]; then
           cd "$KERNEL_ROOT/Wild_KSU"
           cd "$KERNEL_ROOT/Wild_KSU"
+        elif [ "${{ inputs.ksu_variant }}" == "Next" ]; then
+          cd "$KERNEL_ROOT/KernelSU-Next"
         elif [ "${{ inputs.ksu_variant }}" == "KSU" ]; then
         elif [ "${{ inputs.ksu_variant }}" == "KSU" ]; then
           cd "$KERNEL_ROOT/KernelSU"
           cd "$KERNEL_ROOT/KernelSU"
         fi
         fi
@@ -276,6 +298,9 @@ jobs:
             cp "$KERNEL_PATCHES/wild/susfs_fix_patches/v${SUSFS_VERSION}/fix_kernel_compat.c.patch" ./
             cp "$KERNEL_PATCHES/wild/susfs_fix_patches/v${SUSFS_VERSION}/fix_kernel_compat.c.patch" ./
             patch -p1 < fix_kernel_compat.c.patch
             patch -p1 < fix_kernel_compat.c.patch
             ;;
             ;;
+          Next)
+            # Your Next-specific code goes here
+            ;;
           KSU)
           KSU)
             # Your KSU-specific code goes here
             # Your KSU-specific code goes here
             ;;
             ;;
@@ -322,6 +347,9 @@ jobs:
               patch -p1 < fix_task_mmu.c.patch || true
               patch -p1 < fix_task_mmu.c.patch || true
             fi
             fi
             ;;
             ;;
+          Next)
+            # Your Next-specific code goes here
+            ;;
           KSU)
           KSU)
             if [[ "${{ inputs.android_version }}" == "android12" && "${{ inputs.kernel_version }}" == "5.10" && $ACTUAL_SUBLEVEL -le 209 ]] ||
             if [[ "${{ inputs.android_version }}" == "android12" && "${{ inputs.kernel_version }}" == "5.10" && $ACTUAL_SUBLEVEL -le 209 ]] ||
                [[ "${{ inputs.android_version }}" == "android13" && "${{ inputs.kernel_version }}" == "5.10" && "${{ inputs.os_patch_level }}" != "2024-05" && $ACTUAL_SUBLEVEL -le 209 ]] ||
                [[ "${{ inputs.android_version }}" == "android13" && "${{ inputs.kernel_version }}" == "5.10" && "${{ inputs.os_patch_level }}" != "2024-05" && $ACTUAL_SUBLEVEL -le 209 ]] ||
@@ -470,6 +498,11 @@ jobs:
         CONFIG_MAC80211=y
         CONFIG_MAC80211=y
         EOF
         EOF
 
 
+        sed -i \
+          -e '/_COMMON_GKI_MODULES_LIST = \[/,/^[[:space:]]*\]/{/^[[:space:]]*"lib\/crypto\/libarc4\.ko",[[:space:]]*$/d}' \
+          -e '/_COMMON_GKI_MODULES_LIST = \[/,/^[[:space:]]*\]/{/^[[:space:]]*"net\/rfkill\/rfkill\.ko",[[:space:]]*$/d}' \
+          common/modules.bzl
+
     - name: Configure SND
     - name: Configure SND
       if: inputs.variant == 'vTomsonek'
       if: inputs.variant == 'vTomsonek'
       working-directory: ${{ env.KERNEL_ROOT }}
       working-directory: ${{ env.KERNEL_ROOT }}
@@ -644,13 +677,13 @@ jobs:
           exit 1
           exit 1
         fi
         fi
 
 
+    - name: Copy snd-aloop module
+      if: ${{ inputs.variant == 'vTomsonek' }}
+      run: |
         if [ "${{ inputs.variant }}" = "vTomsonek" ]; then
         if [ "${{ inputs.variant }}" = "vTomsonek" ]; then
           sed -i 's|^do\.modules=.*|do.modules=1|' ./AnyKernel3/anykernel.sh
           sed -i 's|^do\.modules=.*|do.modules=1|' ./AnyKernel3/anykernel.sh
         fi
         fi
 
 
-    - name: Copy snd-aloop module
-      if: ${{ inputs.variant == 'vTomsonek' }}
-      run: |
         mkdir -p AnyKernel3/modules/data/adb/lkm
         mkdir -p AnyKernel3/modules/data/adb/lkm
 
 
         if [[ "${{ inputs.android_version }}" == "android12" || "${{ inputs.android_version }}" == "android13" ]]; then
         if [[ "${{ inputs.android_version }}" == "android12" || "${{ inputs.android_version }}" == "android13" ]]; then

+ 1 - 1
.github/workflows/main.yml

@@ -15,7 +15,7 @@ on:
       ksu_variant:
       ksu_variant:
         description: "KernelSU Variant"
         description: "KernelSU Variant"
         type: choice
         type: choice
-        options: [ KSU, WKSU ]
+        options: [ KSU, WKSU, Next ]
         default: KSU
         default: KSU
       ksu_commit:
       ksu_commit:
         description: "KSU Commit (optional)"
         description: "KSU Commit (optional)"