-
Notifications
You must be signed in to change notification settings - Fork 205
288 lines (268 loc) · 10.2 KB
/
test_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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
name: Test_Build
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
name:
description: 'App Name, PR #, or zip URL'
required: true
default: ''
buster:
description: 'Build on PiOS Buster'
required: true
type: boolean
bullseye:
description: 'Build on PiOS Bullseye'
required: true
type: boolean
architecture:
type: choice
description: 'For Buster/Bullseye, test on 32bit, 64bit, or Both if available'
options:
- 32bit
- 64bit
- Both
bookworm_64:
description: 'Build on Debian Bookworm 64bit'
required: true
type: boolean
bionic_64:
description: 'Build on Switchroot Ubuntu 5.1.1 Bionic 64bit'
required: true
type: boolean
focal_64:
description: 'Build on Nvidia Jetpack 35.3.1 Focal 64bit'
required: true
type: boolean
jammy_64:
description: 'Build on RPI Ubuntu Jammy 64bit'
required: true
type: boolean
popos_jammy_64:
description: 'Build on RPI PopOS Jammy 64bit'
required: true
type: boolean
lunar_64:
description: 'Build on RPI Ubuntu Lunar 64bit'
required: true
type: boolean
run-name: Testing ${{ inputs.name }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
buster-32bit:
# The type of runner that the job will run on
runs-on: ubuntu-latest
if: ${{ inputs.buster && ( inputs.architecture == '32bit' || inputs.architecture == 'Both' ) }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Test installing app on buster armhf
uses: theofficialgman/arm-runner-action@v9
with:
# this is a buster armhf image
base_image: https://downloads.raspberrypi.org/raspios_oldstable_armhf/images/raspios_oldstable_armhf-2023-05-03/2023-05-03-raspios-buster-armhf.img.xz
# bind mount the directory so any changes propogate to outside the chroot
bind_mount_repository: yes
# give the image more space
image_additional_mb: 5000
# set CPUs to use
cpu: cortex-a7:cortex-a72
# user runner name as default path
copy_repository_path: /home/runner/pi-apps
# export github env back to outside the chroot
export_github_env: yes
import_github_env: true
# set shell to bash
shell: /bin/bash
commands: |
export name="${{ inputs.name }}"
./.github/workflows/test_build_commands.sh
bullseye-32bit:
runs-on: ubuntu-latest
if: ${{ inputs.bullseye && ( inputs.architecture == '32bit' || inputs.architecture == 'Both' ) }}
steps:
- uses: actions/checkout@v3
- name: Test installing app on bullseye armhf
uses: theofficialgman/arm-runner-action@v9
with:
base_image: https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2023-05-03/2023-05-03-raspios-bullseye-armhf.img.xz
bind_mount_repository: yes
image_additional_mb: 5000
cpu: cortex-a7:cortex-a72
copy_repository_path: /home/runner/pi-apps
export_github_env: yes
import_github_env: true
shell: /bin/bash
commands: |
export name="${{ inputs.name }}"
./.github/workflows/test_build_commands.sh
buster-64bit:
runs-on: ubuntu-latest
if: ${{ inputs.buster && ( inputs.architecture == '64bit' || inputs.architecture == 'Both' ) }}
steps:
- uses: actions/checkout@v3
- name: Test installing app on buster arm64
uses: theofficialgman/arm-runner-action@v9
with:
base_image: https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2021-05-28/2021-05-07-raspios-buster-arm64.zip
bind_mount_repository: yes
image_additional_mb: 5000
cpu: cortex-a7:cortex-a72
copy_repository_path: /home/runner/pi-apps
export_github_env: yes
import_github_env: true
shell: /bin/bash
commands: |
export name="${{ inputs.name }}"
./.github/workflows/test_build_commands.sh
bullseye-64bit:
runs-on: ubuntu-latest
if: ${{ inputs.bullseye && ( inputs.architecture == '64bit' || inputs.architecture == 'Both' ) }}
steps:
- uses: actions/checkout@v3
- name: Test installing app on bullseye arm64
uses: theofficialgman/arm-runner-action@v9
with:
base_image: https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64.img.xz
bind_mount_repository: yes
image_additional_mb: 5000
cpu: cortex-a7:cortex-a72
copy_repository_path: /home/runner/pi-apps
export_github_env: yes
import_github_env: true
shell: /bin/bash
commands: |
export name="${{ inputs.name }}"
./.github/workflows/test_build_commands.sh
bookworm-64bit:
runs-on: ubuntu-latest
if: ${{ inputs.bookworm_64 }}
steps:
- uses: actions/checkout@v3
- name: Test installing app on bookworm arm64
uses: theofficialgman/arm-runner-action@v10
with:
base_image: https://raspi.debian.net/daily/raspi_4_bookworm.img.xz
bind_mount_repository: yes
install_standard_packages: yes
image_additional_mb: 5000
cpu: cortex-a7:cortex-a72
copy_repository_path: /home/runner/pi-apps
export_github_env: yes
import_github_env: true
shell: /bin/bash
commands: |
export name="${{ inputs.name }}"
./.github/workflows/test_build_commands.sh
bionic-64bit:
runs-on: ubuntu-latest
if: ${{ inputs.bionic_64 }}
steps:
- uses: actions/checkout@v3
- name: Test installing app on bionic arm64
uses: theofficialgman/arm-runner-action@v9
with:
base_image: https://download.switchroot.org/ubuntu/switchroot-ubuntu-5.1.1-2023-06-12.7z
# add special arguments for switchroot image format
bootpartition:
rootpartition: 1
bind_mount_repository: yes
image_additional_mb: 5000
# use TX1 ARM CPU cores
cpu: cortex-a7:cortex-a57
copy_repository_path: /home/runner/pi-apps
export_github_env: yes
import_github_env: true
shell: /bin/bash
commands: |
export name="${{ inputs.name }}"
./.github/workflows/test_build_commands.sh
focal-64bit:
runs-on: ubuntu-latest
if: ${{ inputs.focal_64 }}
steps:
- uses: actions/checkout@v3
- name: Clear up some disk space
run: |
# Workaround to provide additional free space for testing.
# https://github.com/actions/virtual-environments/issues/2840
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Test installing app on focal arm64
uses: theofficialgman/arm-runner-action@v9
with:
base_image: https://developer.nvidia.com/downloads/embedded/l4t/r35_release_v3.1/sd_card_b49/jp511-xnx-sd-card-image.zip
bootpartition:
rootpartition: 1
bind_mount_repository: yes
image_additional_mb: 5000
enable_image_caching: no
cpu: cortex-a7:cortex-a72
copy_repository_path: /home/runner/pi-apps
export_github_env: yes
import_github_env: true
shell: /bin/bash
commands: |
export name="${{ inputs.name }}"
./.github/workflows/test_build_commands.sh
jammy-64bit:
runs-on: ubuntu-latest
if: ${{ inputs.jammy_64 }}
steps:
- uses: actions/checkout@v3
- name: Test installing app on jammy arm64
uses: theofficialgman/arm-runner-action@v9
with:
base_image: https://cdimage.ubuntu.com/releases/22.04.2/release/ubuntu-22.04.2-preinstalled-desktop-arm64+raspi.img.xz
bind_mount_repository: yes
image_additional_mb: 5000
cpu: cortex-a7:cortex-a72
copy_repository_path: /home/runner/pi-apps
export_github_env: yes
import_github_env: true
shell: /bin/bash
commands: |
export name="${{ inputs.name }}"
./.github/workflows/test_build_commands.sh
popos-jammy-64bit:
runs-on: ubuntu-latest
if: ${{ inputs.popos_jammy_64 }}
steps:
- uses: actions/checkout@v3
- name: Test installing app on PopOS jammy arm64
uses: theofficialgman/arm-runner-action@v9
with:
base_image: https://iso.pop-os.org/22.04/arm64/raspi/3/pop-os_22.04_arm64_raspi_3.img.xz
bind_mount_repository: yes
image_additional_mb: 5000
cpu: cortex-a7:cortex-a72
copy_repository_path: /home/runner/pi-apps
export_github_env: yes
import_github_env: true
shell: /bin/bash
commands: |
export name="${{ inputs.name }}"
./.github/workflows/test_build_commands.sh
lunar-64bit:
runs-on: ubuntu-latest
if: ${{ inputs.lunar_64 }}
steps:
- uses: actions/checkout@v3
- name: Test installing app on lunar arm64
uses: theofficialgman/arm-runner-action@v9
with:
base_image: https://cdimage.ubuntu.com/releases/23.04/release/ubuntu-23.04-preinstalled-desktop-arm64+raspi.img.xz
bind_mount_repository: yes
image_additional_mb: 5000
cpu: cortex-a7:cortex-a72
copy_repository_path: /home/runner/pi-apps
export_github_env: yes
import_github_env: true
shell: /bin/bash
commands: |
export name="${{ inputs.name }}"
./.github/workflows/test_build_commands.sh