forked from radxa-pkg/radxa-overlays
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (77 loc) · 2.67 KB
/
build.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
name: build
on:
workflow_dispatch:
push:
paths:
- '**.dts'
- '**Makefile'
pull_request:
paths:
- '**.dts'
- '**Makefile'
merge_group:
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
version: [linux-rockchip, linux-rk356x, linux-stable]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check if there is missing files
shell: bash
run: |
MISSING=0
for VENDOR in amlogic rockchip
do
OVERLAY_PATH="arch/arm64/boot/dts/$VENDOR/overlays"
for i in "$OVERLAY_PATH"/*.dts
do
OVERLAY_NAME="$(basename "$i")"
OVERLAY_NAME="${OVERLAY_NAME/.dts}.dtbo"
if ! grep "$OVERLAY_NAME" "${OVERLAY_PATH}/Makefile" >/dev/null 2>/dev/null
then
echo "$OVERLAY_NAME is not included in $VENDOR Makefile!"
MISSING=1
fi
done
done
exit $MISSING
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y --no-install-recommends device-tree-compiler
sudo dpkg --add-architecture arm64
case "${{ matrix.version }}" in
linux-rockchip)
wget https://github.com/radxa-pkg/linux-rockchip/releases/download/5.10.110-11/linux-headers-5.10.110-11-rockchip_5.10.110-11-8c4e8d205_arm64.deb
sudo apt install ./linux-headers-5.10.110-11-rockchip_5.10.110-11-8c4e8d205_arm64.deb
;;
linux-rk356x)
wget https://github.com/radxa-pkg/linux-rk356x/releases/download/5.10.160-7/linux-headers-5.10.160-7-rk356x_5.10.160-7-fc20e0bcd_arm64.deb
sudo apt install ./linux-headers-5.10.160-7-rk356x_5.10.160-7-fc20e0bcd_arm64.deb
;;
esac
- name: Build
run: |
case "${{ matrix.version }}" in
linux-stable)
make -f Makefile.dkms build -j$(nproc)
;;
linux-rockchip)
make -f Makefile.dkms build -j$(nproc) KERNELRELEASE=5.10.110-11-rockchip CONFIG_ARCH_MESON=n CONFIG_CPU_RK3399=rockchip CONFIG_CPU_RK3568=rockchip CONFIG_CPU_RK3588=rockchip
;;
linux-rk356x)
make -f Makefile.dkms build -j$(nproc) KERNELRELEASE=5.10.160-7-rk356x CONFIG_ARCH_MESON=n CONFIG_CPU_RK3399=rockchip CONFIG_CPU_RK3568=rockchip CONFIG_CPU_RK3588=rockchip
;;
esac
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.version }}
path: |
arch/**/*.dtbo