From 10d49e966d6adfc1516892b3037038cf5eff61ec Mon Sep 17 00:00:00 2001 From: weishu Date: Mon, 11 Mar 2024 22:32:37 +0800 Subject: [PATCH] ci: some fixes --- .github/workflows/build-kernel-a13.yml | 3 +++ .github/workflows/gki-kernel.yml | 27 +++++++++----------------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-kernel-a13.yml b/.github/workflows/build-kernel-a13.yml index d07243f63f7c..528d04f0fd9a 100644 --- a/.github/workflows/build-kernel-a13.yml +++ b/.github/workflows/build-kernel-a13.yml @@ -159,6 +159,9 @@ jobs: - version: "5.10" sub_level: 189 os_patch_level: 2023-10 + - version: "5.15" + sub_level: 123 + os_patch_level: 2023-10 - version: "5.15" sub_level: 123 os_patch_level: 2023-10 diff --git a/.github/workflows/gki-kernel.yml b/.github/workflows/gki-kernel.yml index 0bbf02c5a304..a43522847b79 100644 --- a/.github/workflows/gki-kernel.yml +++ b/.github/workflows/gki-kernel.yml @@ -167,31 +167,22 @@ jobs: cd common/ && git add -A && git commit -a -m "Add KernelSU" repo status - - name: Build boot.img + - name: Build Kernel/LKM working-directory: android-kernel + env: + BUILD_LKM: ${{ inputs.build_lkm }} run: | - if [ ! -z ${{ vars.EXPECTED_SIZE }} ] && [ ! -z ${{ vars.EXPECTED_HASH }} ]; then - export KSU_EXPECTED_SIZE=${{ vars.EXPECTED_SIZE }} - export KSU_EXPECTED_HASH=${{ vars.EXPECTED_HASH }} - fi - if [ -e build/build.sh ]; then - LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh CC="/usr/bin/ccache clang" - else - tools/bazel run --disk_cache=/home/runner/.cache/bazel --config=fast --config=stamp --lto=thin //common:kernel_aarch64_dist -- --dist_dir=dist + echo "BUILD LMK: $BUILD_LKM" + if [ "$BUILD_LKM" = "true" ]; then + cargo install ast-grep + ast-grep -U -p '$$$ check_exports($$$) {$$$}' -r '' common/scripts/mod/modpost.c + ast-grep -U -p 'check_exports($$$);' -r '' common/scripts/mod/modpost.c + sed -i '1i KSU_MODULE := 1' KernelSU/kernel/Makefile fi - - - name: Build kernelsu.ko - working-directory: android-kernel - if: ${{ inputs.build_lkm }} - run: | if [ ! -z ${{ vars.EXPECTED_SIZE }} ] && [ ! -z ${{ vars.EXPECTED_HASH }} ]; then export KSU_EXPECTED_SIZE=${{ vars.EXPECTED_SIZE }} export KSU_EXPECTED_HASH=${{ vars.EXPECTED_HASH }} fi - cargo install ast-grep - ast-grep -U -p '$$$ check_exports($$$) {$$$}' -r '' android-kernel/common/scripts/mod/modpost.c - ast-grep -U -p 'check_exports($$$);' -r '' android-kernel/common/scripts/mod/modpost.c - sed -i '1i KSU_MODULE := 1' android-kernel/KernelSU/kernel/Makefile if [ -e build/build.sh ]; then LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh CC="/usr/bin/ccache clang" else