From a921d6da80c6e1c6e7c13a7089d98ff7b604d74e Mon Sep 17 00:00:00 2001 From: Ylarod Date: Thu, 22 Dec 2022 09:53:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20[CI]=20Use=20checkout=20instead?= =?UTF-8?q?=20of=20mainline=20setup.sh=20(#17)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-kernel.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 33f8baf9..f7ee42d7 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -34,13 +34,25 @@ jobs: name: Build aarch64-${{ matrix.version }} runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + with: + path: KernelSU - name: Download kernel source run: | + cd $GITHUB_WORKSPACE git clone https://gerrit.googlesource.com/git-repo mkdir android-kernel && cd android-kernel ../git-repo/repo init -u https://android.googlesource.com/kernel/manifest -b common-${{ matrix.tag }} ../git-repo/repo sync - curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash - + echo "[+] KernelSU setup" + GKI_ROOT=$(pwd) + echo "[+] GKI_ROOT: $GKI_ROOT" + echo "[+] Copy kernel su driver to $GKI_ROOT/common/drivers" + ln -sf $GITHUB_WORKSPACE/KernelSU/kernel $GKI_ROOT/common/drivers/kernelsu + echo "[+] Add kernel su driver to Makefile" + DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile + grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE + echo "[+] KernelSU setup Done." curl -Lo gki-kernel.zip https://dl.google.com/android/gki/gki-certified-boot-${{ matrix.tag }}_r1.zip unzip gki-kernel.zip tools/mkbootimg/unpack_bootimg.py --boot_img=$(find . -maxdepth 1 -name "*.img")