Build All Devices Kernel (Matrix Parallel) #2
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 All Devices Kernel (Matrix Parallel) | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| device: [psyche, umi, munch, lmi, cmi, cas, apollo, alioth, elish, enuma, dagu, pipa] | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y build-essential git curl wget bison flex zip bc cpio libssl-dev ccache python-is-python3 tar | |
| - name: Setup zyc-clang toolchain | |
| run: | | |
| mkdir -p $HOME/zyc-clang | |
| cd $HOME/zyc-clang | |
| wget https://github.com/ZyCromerZ/Clang/releases/download/15.0.7-20251111-release/Clang-15.0.7-20251111.tar.gz | |
| tar -zxvf Clang-15.0.7-20251111.tar.gz | |
| cd $GITHUB_WORKSPACE | |
| - name: Build kernel for ${{ matrix.device }} (No KSU) | |
| run: | | |
| bash build.sh ${{ matrix.device }} | |
| - name: Build kernel for ${{ matrix.device }} (With KSU) | |
| run: | | |
| bash build.sh ${{ matrix.device }} ksu | |
| - name: Upload zips for ${{ matrix.device }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: zips-${{ matrix.device }} | |
| path: | | |
| Kernel_MIUI_${{ matrix.device }}*.zip | |
| Kernel_AOSP_${{ matrix.device }}*.zip | |
| release: | |
| runs-on: ubuntu-22.04 | |
| needs: build | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./release_zips | |
| - name: Get date and short SHA | |
| id: vars | |
| run: | | |
| echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT | |
| echo "sha=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: build-${{ steps.vars.outputs.date }}-${{ steps.vars.outputs.sha }} | |
| name: "Kernel Build ${{ steps.vars.outputs.date }}-${{ steps.vars.outputs.sha }}" | |
| body: "Automated kernel build for commit ${{ github.sha }}" | |
| files: ./release_zips/**/*.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |