add more variant #12
This file contains hidden or 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 Kernel | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| Build: | |
| name: Build Kernel | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| defconfig: | |
| - lineageos_A57_defconfig | |
| - lineageos_R9s_defconfig | |
| - lineageos_R9sPlus_defconfig | |
| - lineageos_R9Plus_defconfig | |
| steps: | |
| - name: Set builddate | |
| id: generate-builddate | |
| run: echo "BUILDDATE=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT | |
| - name: Set swap to 10G | |
| uses: pierotofy/set-swap-space@master | |
| with: | |
| swap-size-gb: 10 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| path: kernel | |
| submodules: true | |
| - name: ⭐ Install prerequisites | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y curl git ftp lftp wget libarchive-tools ccache python2 python2-dev python3 | |
| sudo apt-get install -y pngcrush schedtool dpkg-dev liblz4-tool make optipng maven device-tree-compiler | |
| sudo apt-get install -y libc6-dev-i386 lib32ncurses5-dev libx11-dev lib32z-dev libgl1-mesa-dev xsltproc | |
| sudo apt-get install -y libxml2-utils libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools lzop flex tree | |
| sudo apt-get install -y build-essential bc gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi libssl-dev libfl-dev | |
| sudo apt-get install -y pwgen libswitch-perl policycoreutils minicom libxml-sax-base-perl libxml-simple-perl | |
| sudo apt-get install -y zip unzip tar gzip bzip2 rar unrar llvm g++-multilib bison gperf zlib1g-dev automake | |
| - name: Get build tools | |
| run: | | |
| wget https://github.com/ZyCromerZ/Clang/releases/download/13.0.1-20230207-release/Clang-13.0.1-20230207.tar.gz | |
| mkdir zyc13 | |
| tar zxvf "Clang-13.0.1-20230207.tar.gz" -C zyc13 | |
| - name: Build Kernel | |
| working-directory: kernel | |
| run: | | |
| git submodule update --init --recursive | |
| cd KernelSU | |
| git fetch | |
| git checkout origin/main | |
| cd .. | |
| PATH=$GITHUB_WORKSPACE/zyc13/bin:$PATH | |
| make O=out ARCH=arm64 CC=clang CLANG_TRIBLE=aarch64-linux-gnu- CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnueabi- CROSS_COMPILE_COMPAT=arm-linux-gnueabi- ${{matrix.defconfig}} | |
| make O=out ARCH=arm64 CC=clang CLANG_TRIBLE=aarch64-linux-gnu- CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnueabi- CROSS_COMPILE_COMPAT=arm-linux-gnueabi- -j$(nproc) | |
| - name: Bundle | |
| working-directory: kernel | |
| run: | | |
| zip -q -r "unpatch-${{ matrix.defconfig }}.zip" ./out/arch/arm64/boot/* | |
| - name: Upload to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: r${{ github.run_number }}-${{ steps.generate-builddate.outputs.BUILDDATE }} | |
| files: ./kernel/patches-${{ matrix.defconfig }}.zip |