Skip to content

Commit

Permalink
CI: Support for custom clang branch
Browse files Browse the repository at this point in the history
Signed-off-by: xiaoleGun <1592501605@qq.com>
  • Loading branch information
xiaoleGun committed Apr 16, 2023
1 parent 48d2a42 commit 88179f0
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
echo "KERNEL_DEFCONFIG=$(cat config.env | grep "KERNEL_DEFCONFIG" | head -n 1 | cut -d "=" -f 2)" >> $GITHUB_ENV
echo "TARGET_ARCH=$(cat config.env | grep "TARGET_ARCH" | head -n 1 | cut -d "=" -f 2)" >> $GITHUB_ENV
echo "KERNEL_FILE=$(cat config.env | grep "KERNEL_FILE" | head -n 1 | cut -d "=" -f 2)" >> $GITHUB_ENV
echo "CLANG_BRANCH=$(cat config.env | grep "CLANG_BRANCH" | head -n 1 | cut -d "=" -f 2)" >> $GITHUB_ENV
echo "CLANG_VERSION=$(cat config.env | grep "CLANG_VERSION" | head -n 1 | cut -d "=" -f 2)" >> $GITHUB_ENV
echo "BUILD_EXTRA_COMMAND=$(cat config.env | grep "EXTRA_BUILD_COMMAND" | head -n 1 | cut -d ":" -f 2)" >> $GITHUB_ENV
echo "DISABLE-LTO=$(cat config.env | grep "DISABLE-LTO" | head -n 1 | cut -d "=" -f 2)" >> $GITHUB_ENV
Expand All @@ -42,7 +43,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/kernel_workspace
mkdir clang-aosp
wget https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/master-kernel-build-2022/clang-${{ env.CLANG_VERSION }}.tar.gz
wget https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/${{ env.CLANG_BRANCH }}/clang-${{ env.CLANG_VERSION }}.tar.gz
tar -C clang-aosp/ -zxvf clang-${{ env.CLANG_VERSION }}.tar.gz
mkdir gcc-aosp
wget https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/+archive/refs/tags/android-12.1.0_r27.tar.gz
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,19 @@ Fork 本仓库到你的储存库然后按照以下内容编辑config.env,之

例如: Image.gz-dtb

### Clang version
### Clang

#### Clang Branch
由于 [#23](https://github.com/xiaoleGun/KernelSU_Action/issues/23) 的需要,我们提供可自定义Google上游分支的选项,主要的有分支有
| Clang 分支 |
| ---------- |
| master |
| master-kernel-build-2021 |
| master-kernel-build-2022 |

或者其它分支,请根据自己的需求在 https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86 中寻找

#### Clang version

填写需要使用的 Clang 版本
| Clang 版本 | 对应 Android 版本 | AOSP-Clang 版本 |
Expand Down
14 changes: 13 additions & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,19 @@ Type in the image you need, usually the same as BOARD_KERNEL_IMAGE_NAME in your

e.g. Image.gz-dtb

### Clang version
### Clang

#### Clang Branch
Because of the need of [#23](https://github.com/xiaoleGun/KernelSU_Action/issues/23), we have the option to customize the upstream branch of Google. The main branches are
| Clang Branch |
| ---------- |
| master |
| master-kernel-build-2021 |
| master-kernel-build-2022 |

Or other branches, please visit according to your needs: https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86

#### Clang version

Type the version of Clang you need to use
| Clang version | Corresponding Android version | AOSP-Clang version |
Expand Down
1 change: 1 addition & 0 deletions config.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ KERNEL_SOURCE_BRANCH=dsu-test
KERNEL_DEFCONFIG=vendor/wayne_defconfig
TARGET_ARCH=arm64
KERNEL_FILE=Image.gz-dtb
CLANG_BRANCH=master-kernel-build-2022
CLANG_VERSION=r450784d
EXTRA_BUILD_COMMAND:LD=ld.lld
DISABLE-LTO=false
Expand Down

0 comments on commit 88179f0

Please sign in to comment.