forked from ros-realtime/linux-real-time-kernel-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (86 loc) · 2.92 KB
/
rpi4-kernel-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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# This is a callable workflow for the RPI4 RT kernel build. It is based on the Dockerfile located in the repo
# Workflow can be started from another workflow
# The build takes 1.5 hours and artifacts are available under workflow artifacts
# - kernel .deb packages
# TODO:
# - create Docker image and push it to the packages
name: 'RPI4 RT Kernel build'
# Controls when the workflow will run
on:
workflow_call:
inputs:
uname_r:
description: 'raspi release in a form of <5.15.0-1023-raspi>'
default: ''
required: false
type: string
rt_patch:
description: 'RT patch in a form of <5.15.76-rt53>'
default: ''
required: false
type: string
kernel_version:
description: 'Raspi kernel version'
default: '5.15.0'
required: false
type: string
ubuntu_version:
description: 'Ubuntu version'
default: 'jammy'
required: false
type: string
lttng_version:
description: 'LTTNG version'
default: '2.13'
required: false
type: string
env:
ARCH: arm64
triple: aarch64-linux-gnu
KERNEL_DIR: linux-raspi
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# Use Ubuntu 22.04 runner
runs-on: ubuntu-22.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Get available space
run: |
cd /
df -H
- name: Print input params
run: |
echo UBUNTU_VERSION=${{ inputs.ubuntu_version }}
echo KERNEL_VERSION=${{ inputs.kernel_version }}
echo UNAME_R=${{ inputs.uname_r }}
echo RT_PATCH=${{ inputs.rt_patch }}
echo LTTNG_VERSION=${{ inputs.lttng_version }}
- name: Build rtwg-image docker image
uses: docker/build-push-action@v3
with:
context: .
build-args: |
UBUNTU_VERSION=${{ inputs.ubuntu_version }}
KERNEL_VERSION=${{ inputs.kernel_version }}
UNAME_R=${{ inputs.uname_r }}
RT_PATCH=${{ inputs.rt_patch }}
LTTNG_VERSION=${{ inputs.lttng_version }}
push: false
tags: rtwg-image:22.04
- name: Build kernel
uses: addnab/docker-run-action@v3
with:
image: rtwg-image:22.04
options: -v ${{ github.workspace }}:/work
run: |
cd /home/user/linux_build/linux-raspi
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- LOCALVERSION=-raspi -j `nproc` bindeb-pkg
sudo cp ../*.deb /work
- uses: actions/upload-artifact@v3
with:
name: 'RPI4 RT Kernel deb packages'
path: ${{ github.workspace }}/*.deb