Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
Kang workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
reocat committed Jan 5, 2024
1 parent a18e5fd commit 62f6c0f
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build Kernel
on:
workflow_dispatch:
schedule:
# 每周周六00:00运行. 时间设置参考: http://crontab.guru
- cron: '0 0 * * 6'
push:
branches:
- HEAD
pull_request:
branches:
- HEAD

jobs:
build:
runs-on: ubuntu-latest
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: "true"
CCACHE_MAXSIZE: "2G"
CCACHE_HARDLINK: "true"
KERNEL_DEFCONFIG: "nokia_defconfig"
KERNEL_CMDLINE: "ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnueabi- O=out"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 100

- name: Set up ccache
uses: hendrikmuhs/[email protected]

- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt install gcc-aarch64-linux-gnu -y
sudo apt install gcc-arm-linux-gnueabi -y
sudo apt install binutils make python3 libssl-dev build-essential bc bison flex unzip libssl-dev ca-certificates xz-utils mkbootimg cpio device-tree-compiler git git-lfs -y
wget $(curl -fsSL https://github.com/ZyCromerZ/Clang/raw/main/Clang-main-link.txt)
tar -xzvf Clang-*.tar.gz
git clone https://github.com/kdrag0n/proton-clang --dept=1 -b master
git clone https://github.com/Coconutat/AnyKernel3_Backup -b Op6_KSU --depth=1
rm -rf AnyKernel3/.git
- name: GetTime
id: get_time
run: |
echo "TIME=$(TZ=UTC-8 date +%m%d%H%M )" >> $GITHUB_OUTPUT
- name: Build Kernel-With-KernelSU
run: |
export PATH=$(pwd)/proton-clang/bin/:$PATH
make $KERNEL_CMDLINE $KERNEL_DEFCONFIG CC="ccache clang"
make $KERNEL_CMDLINE CC="ccache clang" -j$(nproc --all)
cp out/arch/arm64/boot/Image.gz-dtb AnyKernel3_Backup
- name: Upload Kernel-SU
uses: actions/upload-artifact@v3
with:
name: Nyan_kernel-KSU-${{ steps.get_time.outputs.TIME }}
path: "AnyKernel3_Backup/*"

0 comments on commit 62f6c0f

Please sign in to comment.