-
Notifications
You must be signed in to change notification settings - Fork 30
98 lines (88 loc) · 3.53 KB
/
build-all.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
name: Build-All
on: [push]
# TODO:
# - Verify output binary
# - Create releases if pushed to Master (w/binary attachment and sig)
# This would require a private key in repo. Maybe a short-expiring sub-key?
#
# We are using Matrix build here on Github Actions for parallel execution.
# We have 3 parameters: device, arch, boot
# While the Mark II allows for 4 builds (imx6ulz, imx6ul) this matrix becomes
# an issue with the Mark One because the Makefile errors if you pass eMMC as
# the boot parameter or imx6ulz/imx6ul as the arch.
#
# +----------+---------+------+------+
# | device | arch | boot | CI |
# +----------+---------+------+------+
# | mark-one | imx53 | uSD | PASS |
# | mark-one | imx53 | eMMC | FAIL |
# | mark-one | imx6ul | uSD | FAIL |
# | mark-one | imx6ul | eMMC | FAIL |
# | mark-one | imx6ulz | uSD | FAIL |
# | mark-one | imx6ulz | eMMC | FAIL |
# +----------+---------+------+------+
# | mark-two | imx53 | uSD | FAIL |
# | mark-two | imx53 | eMMC | FAIL |
# | mark-two | imx6ul | uSD | PASS |
# | mark-two | imx6ul | eMMC | PASS |
# | mark-two | imx6ulz | uSD | PASS |
# | mark-two | imx6ulz | eMMC | PASS |
# +----------+---------+------+------+
#
# Therefore, there are only 5 successful builds, and 7 expected failed
# builds per the above matrix. However, Github Actions doesn't have a clean
# way of testing for failed builds with specific matrix params. Therefore,
# we need two "jobs" below. One for mark one, and one for mark two.
#
jobs:
mark-one:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
arch: [imx53]
boot: [uSD]
device: [mark-one]
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: '1.22.0'
- name: Prerequisites
run: |
sudo apt-get update
sudo apt-get install -y \
bc binfmt-support bzip2 fakeroot file gcc gcc-arm-linux-gnueabihf git \
gnupg make parted rsync qemu-user-static wget xz-utils zip debootstrap \
sudo dirmngr bison flex libssl-dev kmod
- name: Import Signing Keys
run: | # public key servers time out on at least one test, therefore we fetch cached keys
wget https://usbarmory.github.io/keys/38DBBDC86092693E.asc && gpg --import 38DBBDC86092693E.asc
wget https://usbarmory.github.io/keys/147C39FF9634B72C.asc && gpg --import 147C39FF9634B72C.asc
- run: make V=${{ matrix.device }} IMX=${{ matrix.arch }} BOOT=${{ matrix.boot }}
mark-two:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
arch: [imx6ul, imx6ulz]
boot: [uSD, eMMC]
mem: [512M, 1G]
device: [mark-two]
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: '1.22.0'
- name: Prerequisites
run: |
sudo apt-get update
sudo apt-get install -y \
bc binfmt-support bzip2 fakeroot file gcc gcc-arm-linux-gnueabihf git \
gnupg make parted rsync qemu-user-static wget xz-utils zip debootstrap \
sudo dirmngr bison flex libssl-dev kmod
- name: Import Signing Keys
run: | # public key servers time out on at least one test, therefore we fetch cached keys
wget https://usbarmory.github.io/keys/38DBBDC86092693E.asc && gpg --import 38DBBDC86092693E.asc
wget https://usbarmory.github.io/keys/147C39FF9634B72C.asc && gpg --import 147C39FF9634B72C.asc
- run: make V=${{ matrix.device }} IMX=${{ matrix.arch }} MEM=${{ matrix.mem }} BOOT=${{ matrix.boot }}