-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (62 loc) · 2.46 KB
/
kernel.yml
File metadata and controls
72 lines (62 loc) · 2.46 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: Kernel Builder
on:
workflow_dispatch:
jobs:
build:
name: Kernel Builder
runs-on: ubuntu-latest
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: "true"
CCACHE_HARDLINK: "true"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup packages
run: |
sudo apt-get update -y
sudo apt-get -y install \
repo bc bison build-essential curl ccache coreutils flex g++-multilib gcc-multilib git gnupg \
gperf libxml2 lib32z1-dev liblz4-tool libncurses-dev libsdl1.2-dev libwxgtk3.2-dev imagemagick \
lunzip lzop schedtool squashfs-tools xsltproc zip zlib1g-dev perl xmlstarlet virtualenv xz-utils \
jq pngcrush git-lfs openjdk-11-jdk wget lib32readline-dev libssl-dev libxml2-utils \
android-sdk-libsparse-utils lld libc6-dev-i386 x11proto-core-dev libx11-dev libgl1-mesa-dev \
unzip fontconfig ca-certificates cpio bsdmainutils lz4 aria2 rclone ssh-client \
rsync python-is-python3 libarchive-tools python3 zstd
- name: Set swap to 10G
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 10
- name: Clone kernel repo
run: |
git clone https://github.com/Starrykernel/kernel_xiaomi_veux.git -b 16-Q2 kernel --depth=1
cd kernel
- name: Build
run: |
cd kernel
chmod +x ./build.sh
echo "Building kernel"
./build.sh
- name: Extract Version Info
id: extract_version_info
run: |
FILE_NAME=$(basename kernel/builds/*.zip)
KERNEL_NAME=$(echo $FILE_NAME | cut -d'-' -f4)
VERSION=$(echo $FILE_NAME | cut -d'-' -f5)
DEVICE=$(echo $FILE_NAME | cut -d'-' -f6)
echo "KERNEL_NAME=${KERNEL_NAME}" >> $GITHUB_ENV
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "DEVICE=${DEVICE}" >> $GITHUB_ENV
- name: Create Release Notes
run: |
touch release_notes.txt
echo "## Release Notes" > release_notes.txt
echo "- Initial Release" >> release_notes.txt
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: ${{ env.ZIP_PATH }}
tag: "${{ github.run_number }}"
name: "Release ${{ env.VERSION }}"
token: ${{ secrets.PAT_TOKEN }}
bodyFile: release_notes.txt