|
|
@@ -143,18 +143,6 @@ jobs:
|
|
|
fi
|
|
|
echo "REPO=$GITHUB_WORKSPACE/./git-repo/repo" >> $GITHUB_ENV
|
|
|
|
|
|
- - name: Cache Dependencies
|
|
|
- id: cache-deps
|
|
|
- uses: actions/cache@v4
|
|
|
- with:
|
|
|
- path: |
|
|
|
- ${{ github.workspace }}/AnyKernel3
|
|
|
- ${{ github.workspace }}/susfs4ksu
|
|
|
- ${{ github.workspace }}/kernel_patches
|
|
|
- key: dependencies-${{ github.run_id }}-${{ inputs.android_version }}-${{ inputs.kernel_version }}
|
|
|
- restore-keys: |
|
|
|
- dependencies-${{ github.run_id }}-
|
|
|
-
|
|
|
- name: Clone AnyKernel3 and Other Dependencies
|
|
|
run: |
|
|
|
echo "Cloning AnyKernel3 and other dependencies..."
|
|
|
@@ -162,30 +150,9 @@ jobs:
|
|
|
SUSFS_BRANCH="gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}"
|
|
|
echo "Using branch for AnyKernel3: $ANYKERNEL_BRANCH"
|
|
|
echo "Using branch for SUSFS: $SUSFS_BRANCH"
|
|
|
- if [ ! -d "AnyKernel3" ]; then
|
|
|
- git clone https://github.com/WildPlusKernel/AnyKernel3.git -b "$ANYKERNEL_BRANCH"
|
|
|
- else
|
|
|
- echo "Using cached AnyKernel3"
|
|
|
- fi
|
|
|
- if [ ! -d "susfs4ksu" ]; then
|
|
|
- git clone https://gitlab.com/simonpunk/susfs4ksu.git -b "$SUSFS_BRANCH"
|
|
|
- else
|
|
|
- echo "Using cached susfs4ksu"
|
|
|
- fi
|
|
|
- if [ ! -d "kernel_patches" ]; then
|
|
|
- git clone https://github.com/WildPlusKernel/kernel_patches.git
|
|
|
- else
|
|
|
- echo "Using cached kernel_patches"
|
|
|
- fi
|
|
|
-
|
|
|
- - name: Cache Kernel Source
|
|
|
- id: cache-kernel
|
|
|
- uses: actions/cache@v4
|
|
|
- with:
|
|
|
- path: ${{ github.workspace }}/${{ env.CONFIG }}
|
|
|
- key: kernel-source-${{ github.run_id }}-${{ inputs.android_version }}-${{ inputs.kernel_version }}-${{ inputs.os_patch_level }}
|
|
|
- restore-keys: |
|
|
|
- kernel-source-${{ github.run_id }}-
|
|
|
+ git clone https://github.com/WildPlusKernel/AnyKernel3.git -b "$ANYKERNEL_BRANCH"
|
|
|
+ git clone https://gitlab.com/simonpunk/susfs4ksu.git -b "$SUSFS_BRANCH"
|
|
|
+ git clone https://github.com/WildPlusKernel/kernel_patches.git
|
|
|
|
|
|
- name: Check Disk Space Before Sync
|
|
|
run: |
|
|
|
@@ -197,28 +164,17 @@ jobs:
|
|
|
echo "Creating folder for configuration: $CONFIG..."
|
|
|
mkdir -p "$CONFIG"
|
|
|
cd "$CONFIG"
|
|
|
- if [ ! -d ".repo" ]; then
|
|
|
- echo "Initializing and syncing kernel source..."
|
|
|
- FORMATTED_BRANCH="${{ inputs.android_version }}-${{ inputs.kernel_version }}-${{ inputs.os_patch_level }}"
|
|
|
- $REPO init --depth=1 --u https://android.googlesource.com/kernel/manifest -b common-${FORMATTED_BRANCH} --repo-rev=v2.16
|
|
|
- REMOTE_BRANCH=$(git ls-remote https://android.googlesource.com/kernel/common ${FORMATTED_BRANCH})
|
|
|
- DEFAULT_MANIFEST_PATH=.repo/manifests/default.xml
|
|
|
- if grep -q deprecated <<< $REMOTE_BRANCH; then
|
|
|
- echo "Found deprecated branch: $FORMATTED_BRANCH"
|
|
|
- sed -i "s/\"${FORMATTED_BRANCH}\"/\"deprecated\/${FORMATTED_BRANCH}\"/g" $DEFAULT_MANIFEST_PATH
|
|
|
- fi
|
|
|
- $REPO --version
|
|
|
- $REPO --trace sync -c -j$(nproc --all) --no-tags --fail-fast
|
|
|
- else
|
|
|
- echo "Using cached kernel source"
|
|
|
+ echo "Initializing and syncing kernel source..."
|
|
|
+ FORMATTED_BRANCH="${{ inputs.android_version }}-${{ inputs.kernel_version }}-${{ inputs.os_patch_level }}"
|
|
|
+ $REPO init --depth=1 --u https://android.googlesource.com/kernel/manifest -b common-${FORMATTED_BRANCH} --repo-rev=v2.16
|
|
|
+ REMOTE_BRANCH=$(git ls-remote https://android.googlesource.com/kernel/common ${FORMATTED_BRANCH})
|
|
|
+ DEFAULT_MANIFEST_PATH=.repo/manifests/default.xml
|
|
|
+ if grep -q deprecated <<< $REMOTE_BRANCH; then
|
|
|
+ echo "Found deprecated branch: $FORMATTED_BRANCH"
|
|
|
+ sed -i "s/\"${FORMATTED_BRANCH}\"/\"deprecated\/${FORMATTED_BRANCH}\"/g" $DEFAULT_MANIFEST_PATH
|
|
|
fi
|
|
|
-
|
|
|
- - name: Upload Unmodified Kernel Source Artifact
|
|
|
- if: steps.cache-kernel.outputs.cache-hit != 'true'
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
- with:
|
|
|
- name: kernel-source-unmodified-${{ inputs.android_version }}-${{ inputs.kernel_version }}-${{ inputs.os_patch_level }}-${{ inputs.kernelsu_variant }}
|
|
|
- path: ${{ github.workspace }}/${{ env.CONFIG }}
|
|
|
+ $REPO --version
|
|
|
+ $REPO --trace sync -c -j$(nproc --all) --no-tags --fail-fast
|
|
|
|
|
|
- name: Determine the branch for KernelSU
|
|
|
run: |
|
|
|
@@ -422,12 +378,6 @@ jobs:
|
|
|
fi
|
|
|
ccache --show-stats
|
|
|
|
|
|
- - name: Upload Modified Kernel Source Artifact
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
- with:
|
|
|
- name: kernel-source-modified-${{ inputs.android_version }}-${{ inputs.kernel_version }}-${{ inputs.os_patch_level }}-${{ inputs.kernelsu_variant }}
|
|
|
- path: ${{ github.workspace }}/${{ env.CONFIG }}
|
|
|
-
|
|
|
- name: Create Bootimgs Folder and Copy Images for Android 12/13
|
|
|
if: ${{ inputs.android_version == 'android12' || inputs.android_version == 'android13' }}
|
|
|
run: |
|