forked from ApartTUSITU/kernel_xiaomi_sm8250_mod
-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (61 loc) · 2.11 KB
/
build-all.yml
File metadata and controls
72 lines (61 loc) · 2.11 KB
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
63
64
65
66
67
68
69
70
71
72
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 }}