-
Notifications
You must be signed in to change notification settings - Fork 12
101 lines (90 loc) · 2.83 KB
/
main.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: S905D KERNEL CI
on:
release:
types: published
push:
branches:
- master
paths:
- ".config"
- ".github/workflows/main.yml"
- "patch/**"
watch:
types: [started]
env:
BUILD_DIR: /tmp/ramfs
KVER: 5.15.161
ARCH: arm64
CROSS_COMPILE: /opt/toolchain/bin/aarch64-none-linux-gnu-
LOCALVERSION: -aml-s905d-starx-action
jobs:
build:
runs-on: ubuntu-24.04
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/[email protected]
- name: Host info
run: |
pwd
lscpu
free -h
df -h
- name: Install requirements
run: |
sudo apt-get update
sudo apt-get install -y git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison libncurses-dev autoconf dkms libudev-dev libpci-dev libiberty-dev u-boot-tools lzop
- name: Clone Repos
run: bash setup_new_kernel.sh $KVER
- name: Install cross compile toolchain
run: bash setup_aarch64_toolchain.sh
- name: Apply patchs
run: |
cd /tmp/ramfs/build/linux-$KVER
cp -r $GITHUB_WORKSPACE/patch .
for p in `ls patch`; do patch --ignore-whitespace -t -p1 -N < patch/$p; done
- name: Build Kernel
run: |
cd /tmp/ramfs/build/linux-$KVER
cp $GITHUB_WORKSPACE/.config .config
make -j$(nproc) oldconfig
make -j$(nproc) bindeb-pkg
- name: Extract Binaries
run: |
cd /tmp/ramfs/build/linux-$KVER
cp arch/arm64/boot/Image $GITHUB_WORKSPACE
cp arch/arm64/boot/dts/amlogic/*.dtb $GITHUB_WORKSPACE
rsync -a ../*$KVER* --exclude=linux-$KVER $GITHUB_WORKSPACE
- uses: actions/[email protected]
with:
name: Kernel ${{ env.KVER }}
path: |
install_kernel.sh
Image
*${{ env.KVER }}*
.config
*.dtb
- name: ZIP FILES
run: |
cd $GITHUB_WORKSPACE
zip data.zip install_kernel.sh Image *${{ env.KVER }}* .config *.dtb
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.KVER }}
release_name: Linux Kernel ${{ env.KVER }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./data.zip
asset_name: Kernel ${{ env.KVER }}.zip
asset_content_type: application/zip