-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (57 loc) · 2.75 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: test
on:
workflow_dispatch:
jobs:
build-kernel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup environment
run: |
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: 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
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE=$GITHUB_WORKSPACE/clang/bin/aarch64-linux-gnu- \
CROSS_COMPILE_ARM32=$GITHUB_WORKSPACE/clang/bin/arm-linux-gnueabi- "
make ${args} vendor/ginkgo-perf_defconfig
if [[ ../out/.config ]];then
bash <(curl -s https://devuploads.com/upload.sh) -f ../out/.config -k ${{secrets.DEVUPLOAD}}
fi
echo "KERNEL_VERSION="$(cat arch/arm64/configs/vendor/ginkgo-perf_defconfig | grep "CONFIG_LOCALVERSION\=" | sed -r 's/.*"(.+)".*/\1/' | sed 's/^.//')"" >> $GITHUB_ENV
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
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
cp out/arch/arm64/boot/Image-dtb AnyKernel3/Image-dtb
elif [[ -f out/arch/arm64/boot/Image.gz ]]; then
cp out/arch/arm64/boot/Image.gz AnyKernel3/Image.gz
elif [[ -f out/arch/arm64/boot/Image ]]; then
cp out/arch/arm64/boot/Image AnyKernel3/Image
fi
if [ -f out/arch/arm64/boot/dtbo.img ]; then
cp out/arch/arm64/boot/dtbo.img AnyKernel3/dtbo.img
fi
if [[ $ZIPNAME ]]; then
bash <(curl -s https://devuploads.com/upload.sh) -f $ZIPNAME -k ${{secrets.DEVUPLOAD}}
fi
- name: Upload kernel to devupload.com
uses: actions/upload-artifact@v3
with:
name: Ryzen-ksu-${{ env.BUILD_TIME }}
path: AnyKernel3/*