101f6dafca3eeed6a116c54a3262953876d79741
[openwrt/staging/svanheule.git] / target / linux / bcm27xx / patches-6.1 / 950-0508-.github-workflows-Create-workflow-to-CI-kernel-build.patch
1 From baa2e8235af7143148d8799c5caed2a2eefd9107 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Fri, 11 Nov 2022 17:09:32 +0000
4 Subject: [PATCH] .github/workflows: Create workflow to CI kernel
5 builds
6
7 Builds the bcmrpi, bcm2709, bcm2711, and bcm2835 32 bit kernels,
8 and defconfig and bcm2711 64bit kernels, saving the artifacts for
9 7 days.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 .github/workflows/kernel-build.yml | 266 +++++++++++++++++++++++++++++
14 1 file changed, 266 insertions(+)
15 create mode 100644 .github/workflows/kernel-build.yml
16
17 --- /dev/null
18 +++ b/.github/workflows/kernel-build.yml
19 @@ -0,0 +1,266 @@
20 +name: Pi kernel build tests
21 +
22 +on:
23 + pull_request:
24 + paths-ignore:
25 + - '.github/**'
26 + branches: [ "rpi-*" ]
27 + push:
28 + paths-ignore:
29 + - '.github/**'
30 + branches: [ "rpi-*" ]
31 + workflow_dispatch:
32 +
33 +env:
34 + NUM_JOBS: 3
35 +
36 +jobs:
37 + build-bcm2835:
38 +
39 + runs-on: ubuntu-latest
40 +
41 + steps:
42 + - name: Update install
43 + run:
44 + sudo apt-get update
45 +
46 + - name: Install toolchain
47 + run:
48 + sudo apt-get install gcc-arm-linux-gnueabihf
49 + timeout-minutes: 5
50 +
51 + - uses: actions/checkout@v3
52 + with:
53 + fetch-depth: 1
54 + clean: true
55 +
56 + - name: Build kernel
57 + run: |
58 + mkdir ${{github.workspace}}/build
59 + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2835_defconfig
60 + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image modules dtbs
61 + mkdir -p ${{github.workspace}}/install/boot
62 + make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
63 + cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/
64 + cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
65 + cp ${{github.workspace}}/build/arch/arm/boot/Image ${{github.workspace}}/install/boot/
66 +
67 + - name: Tar build
68 + run: tar -cvf bcm2835_build.tar -C ${{github.workspace}}/install .
69 +
70 + - name: Upload results
71 + uses: actions/upload-artifact@v3
72 + with:
73 + name: bcm2835_build
74 + path: bcm2835_build.tar
75 + retention-days: 7
76 +
77 + build-arm64:
78 +
79 + runs-on: ubuntu-latest
80 +
81 + steps:
82 + - name: Update install
83 + run:
84 + sudo apt-get update
85 +
86 + - name: Install toolchain
87 + run:
88 + sudo apt-get install gcc-aarch64-linux-gnu
89 + timeout-minutes: 5
90 +
91 + - uses: actions/checkout@v3
92 + with:
93 + fetch-depth: 1
94 + clean: true
95 +
96 + - name: Build kernel
97 + run: |
98 + mkdir ${{github.workspace}}/build
99 + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build defconfig
100 + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs
101 + mkdir -p ${{github.workspace}}/install/boot
102 + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
103 + cp ${{github.workspace}}/build/arch/arm64/boot/dts/broadcom/*.dtb ${{github.workspace}}/install/boot/
104 + cp -r ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
105 + cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/
106 +
107 + - name: Tar build
108 + run: tar -cvf arm64_build.tar -C ${{github.workspace}}/install .
109 +
110 + - name: Upload results
111 + uses: actions/upload-artifact@v3
112 + with:
113 + name: arm64_build
114 + path: arm64_build.tar
115 + retention-days: 7
116 +
117 + build-bcmrpi:
118 +
119 + runs-on: ubuntu-latest
120 +
121 + steps:
122 + - name: Update install
123 + run:
124 + sudo apt-get update
125 +
126 + - name: Install toolchain
127 + run:
128 + sudo apt-get install gcc-arm-linux-gnueabihf
129 + timeout-minutes: 5
130 +
131 + - uses: actions/checkout@v3
132 + with:
133 + fetch-depth: 1
134 + clean: true
135 +
136 + - name: Build kernel
137 + run: |
138 + mkdir ${{github.workspace}}/build
139 + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig
140 + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs
141 + mkdir -p ${{github.workspace}}/install/boot
142 + make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
143 + cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/
144 + cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
145 + cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/
146 +
147 + - name: Tar build
148 + run: tar -cvf bcmrpi_build.tar -C ${{github.workspace}}/install .
149 +
150 + - name: Upload results
151 + uses: actions/upload-artifact@v3
152 + with:
153 + name: bcmrpi_build
154 + path: bcmrpi_build.tar
155 + retention-days: 7
156 +
157 + build-bcm2709:
158 +
159 + runs-on: ubuntu-latest
160 +
161 + steps:
162 + - name: Update install
163 + run:
164 + sudo apt-get update
165 +
166 + - name: Install toolchain
167 + run:
168 + sudo apt-get install gcc-arm-linux-gnueabihf
169 + timeout-minutes: 5
170 +
171 + - uses: actions/checkout@v3
172 + with:
173 + fetch-depth: 1
174 + clean: true
175 +
176 + - name: Build kernel
177 + run: |
178 + mkdir ${{github.workspace}}/build
179 + make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2709_defconfig
180 + make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs
181 + mkdir -p ${{github.workspace}}/install/boot
182 + make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
183 + cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/
184 + cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
185 + cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/
186 +
187 + - name: Tar build
188 + run: tar -cvf bcm2709_build.tar -C ${{github.workspace}}/install .
189 +
190 + - name: Upload results
191 + uses: actions/upload-artifact@v3
192 + with:
193 + name: bcm2709_build
194 + path: bcm2709_build.tar
195 + retention-days: 7
196 +
197 + build-bcm2711:
198 +
199 + runs-on: ubuntu-latest
200 +
201 + steps:
202 + - name: Update install
203 + run:
204 + sudo apt-get update
205 +
206 + - name: Install toolchain
207 + run:
208 + sudo apt-get install gcc-arm-linux-gnueabihf
209 + timeout-minutes: 5
210 +
211 + - uses: actions/checkout@v3
212 + with:
213 + fetch-depth: 1
214 + clean: true
215 +
216 + - name: Build kernel
217 + run: |
218 + mkdir ${{github.workspace}}/build
219 + make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig
220 + make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs
221 + mkdir -p ${{github.workspace}}/install/boot
222 + make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
223 + cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/
224 + cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
225 + cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/
226 +
227 + - name: Tar build
228 + run: tar -cvf bcm2711_build.tar -C ${{github.workspace}}/install .
229 +
230 + - name: Upload results
231 + uses: actions/upload-artifact@v3
232 + with:
233 + name: bcm2711_build
234 + path: bcm2711_build.tar
235 + retention-days: 7
236 +
237 + build-bcm2711-arm64:
238 +
239 + runs-on: ubuntu-latest
240 +
241 + steps:
242 + - name: Update install
243 + run:
244 + sudo apt-get update
245 +
246 + - name: Install toolchain
247 + run:
248 + sudo apt-get install gcc-arm-linux-gnueabihf
249 + timeout-minutes: 5
250 +
251 + - uses: actions/checkout@v3
252 + with:
253 + fetch-depth: 1
254 + clean: true
255 +
256 + - name: Install toolchain
257 + run:
258 + sudo apt-get install gcc-aarch64-linux-gnu
259 + timeout-minutes: 5
260 +
261 + - uses: actions/checkout@v3
262 + with:
263 + fetch-depth: 1
264 + clean: true
265 +
266 + - name: Build kernel
267 + run: |
268 + mkdir ${{github.workspace}}/build
269 + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build bcm2711_defconfig
270 + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs
271 + mkdir -p ${{github.workspace}}/install/boot
272 + make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install
273 + cp ${{github.workspace}}/build/arch/arm64/boot/dts/broadcom/*.dtb ${{github.workspace}}/install/boot/
274 + cp -r ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/
275 + cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/
276 +
277 + - name: Tar build
278 + run: tar -cvf bcm2711_arm64_build.tar -C ${{github.workspace}}/install .
279 +
280 + - name: Upload results
281 + uses: actions/upload-artifact@v3
282 + with:
283 + name: bcm2711_arm64_build
284 + path: bcm2711_arm64_build.tar
285 + retention-days: 7