Build BYD-Kernel For Xiaomi 8 EE & UD #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build BYD-Kernel For Xiaomi 8 EE & UD | |
on: | |
workflow_dispatch: | |
schedule: | |
# Run once at 12:00 on Saturday.. See http://crontab.guru | |
- cron: '00 12 * * 6' | |
push: | |
branches: | |
- HEAD | |
pull_request: | |
branches: | |
- HEAD | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
env: | |
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion" | |
CCACHE_NOHASHDIR: "true" | |
CCACHE_MAXSIZE: "2G" | |
CCACHE_HARDLINK: "true" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
fetch-depth: 100 | |
- name: Set up ccache | |
uses: hendrikmuhs/ccache-action@v1.2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt install binutils make python2 libssl-dev flex unzip libssl-dev ca-certificates xz-utils mkbootimg cpio device-tree-compiler git git-lfs bc bison build-essential ccache curl flex g++-multilib gcc-multilib git git-lfs gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev adb fastboot -y | |
git clone https://github.com/kdrag0n/proton-clang.git | |
- name: GetTime | |
id: get_time | |
run: | | |
echo "TIME=$(TZ=UTC-8 date +%m%d%H%M )" >> $GITHUB_OUTPUT | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@v1.3.1 | |
with: | |
# this might remove tools that are actually needed, | |
# if set to "true" but frees about 6 GB | |
tool-cache: false | |
# all of these default to true, but feel free to set to | |
# "false" if necessary for your workflow | |
android: false # I need android tools | |
dotnet: true | |
haskell: true | |
large-packages: true | |
docker-images: true | |
swap-storage: true | |
- name: Build Kernel | |
run: | | |
rm -rf .git | |
sudo ln -sf /usr/bin/python2.7 /usr/bin/python | |
bash sync_wireguard.sh | |
bash syncanykernel3.sh | |
bash synckernelsu_all.sh | |
bash build_kernel_byd_git_clang.sh | |
rm -rf tools/AnyKernel3/.git | |
rm -rf tools/AnyKernel3/.github | |
- name: Upload BYD-Kernel | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Mi8_sdm845-BYD_Kernel-${{ steps.get_time.outputs.TIME }} | |
path: "tools/AnyKernel3/*" |