Skip to content

Commit

Permalink
Update Build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
roniwae authored Dec 24, 2023
1 parent 6b00791 commit ef4b9a3
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,38 @@ jobs:
- uses: actions/checkout@v3
- name: Setup environment
run: |
git config --global init.defaultBranch MiuiQ
sudo apt install python2 -y
echo "BUILD_TIME=$(TZ=Asia/Jakarta date "+%H-%M~%d_%m_%Y")" >> $GITHUB_ENV
echo "TIME=$(TZ=Asia/Jakarta date "+%d_%m_%Y")" >> $GITHUB_ENV
- name: Pull toolchain
run: |
mkdir clang && git clone -b clang-12.0 https://github.com/roniwae/RastaMod69-Clang.git clang --depth=1
- name: Pull kernel source
run: |
git clone --depth=1 https://github.com/roniwae/MiuiKernel.git -b main kernel-source
echo "KERNEL_VERSION="$(cat kernel-source/arch/arm64/configs/vendor/ginkgo-perf_defconfig | grep "CONFIG_LOCALVERSION\=" | sed -r 's/.*"(.+)".*/\1/' | sed 's/^.//')"" >> $GITHUB_ENV
mkdir clang && git clone -q https://github.com/roniwae/RastaMod69-Clang.git clang --depth=1
echo "KERNEL_VERSION="$(cat arch/arm64/configs/vendor/ginkgo-perf_defconfig | grep "CONFIG_LOCALVERSION\=" | sed -r 's/.*"(.+)".*/\1/' | sed 's/^.//')"" >> $GITHUB_ENV
- name: Build kernel
run: |
export KBUILD_BUILD_USER="@roni_saja"
export KBUILD_BUILD_HOST="AmateurMan"
export PATH=$GITHUB_WORKSPACE/clang/bin:${PATH}
args=" ARCH=arm64 \
O=../out \
CC=clang
LD=ld.lld
O=out \
CC=clang \
LD=ld.lld\
AR=llvm-ar \
AS=llvm-as \
NM=llvm-nm \
OBJCOPY=llvm-objcopy \
OBJDUMP=llvm-objdump \
STRIP=llvm-strip \
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE=$GITHUB_WORKSPACE/clang/bin/aarch64-linux-gnu- \
CROSS_COMPILE_ARM32=$GITHUB_WORKSPACE/clang/bin/arm-linux-gnueabi- "
cd kernel-source
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -
make ${args} vendor/ginkgo-perf_defconfig
make -j$(($(getconf _NPROCESSORS_ONLN) * 2)) ${args}
- name: Package kernel
run: |
git clone --depth=1 https://github.com/roniwae/AnyKernel3.git -b MIUI AnyKernel3 && rm -rf AnyKernel3/.git AnyKernel3/.github AnyKernel3/LICENSE AnyKernel3/README.md
git clone --depth=1 https://github.com/roniwae/AnyKernel3.git -b MIUI AnyKernel3 && rm -rf AnyKernel3/.git AnyKernel3/.github AnyKernel3/README.md
if [[ -f out/arch/arm64/boot/Image.gz-dtb ]]; then
cp out/arch/arm64/boot/Image.gz-dtb AnyKernel3/Image.gz-dtb
elif [[ -f out/arch/arm64/boot/Image-dtb ]]; then
Expand All @@ -57,5 +59,5 @@ jobs:
- name: Upload kernel to artifact
uses: actions/upload-artifact@v3
with:
name: Ryzen-ksu-${{ env.BUILD_TIME }}
name: Xoplak-kernel-ksu-${{ env.BUILD_TIME }}
path: AnyKernel3/*

0 comments on commit ef4b9a3

Please sign in to comment.