-
Notifications
You must be signed in to change notification settings - Fork 44
178 lines (160 loc) · 4.63 KB
/
Copy pathbuild.yml
File metadata and controls
178 lines (160 loc) · 4.63 KB
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
name: Build
on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
name: Build for ${{ matrix.debian_codename }}
strategy:
matrix:
debian_codename:
- bullseye
- bookworm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache debian
id: cache-debian
uses: actions/cache@v4
with:
path: |
.apt_cache
debian-*-generic-arm64.tar
key: ${{ matrix.debian_codename }}-build-files
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build
run: |
set -x
make qemu_build DEBIAN_CODENAME=${{ matrix.debian_codename }}
sudo mv pixelpilot ${{ matrix.debian_codename }}_pixelpilot
sudo rm -r .apt_cache/archives/{lock,partial}
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.debian_codename }}-bin
path: |
${{ matrix.debian_codename }}_pixelpilot
build_deb:
name: Build DEB pkg for ${{ matrix.debian_codename }}
strategy:
matrix:
debian_codename:
- bullseye
- bookworm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache debian
id: cache-debian
uses: actions/cache@v4
with:
path: |
.apt_cache
debian-*-generic-arm64.tar
key: ${{ matrix.debian_codename }}-build_deb-files
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build deb package
run: |
set -x
make qemu_build_deb DEBIAN_CODENAME=${{ matrix.debian_codename }}
for f in `ls pixelpilot-rk*_arm64.deb`; do
mv $f "${{ matrix.debian_codename }}_${f}";
done
sudo rm -r .apt_cache/archives/{lock,partial}
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.debian_codename }}-deb
path: |
${{ matrix.debian_codename }}_pixelpilot-rk_*_arm64.deb
${{ matrix.debian_codename }}_pixelpilot-rk-dbgsym_*_arm64.deb
test:
name: Test (${{ matrix.debian_codename }})
runs-on: ubuntu-latest
strategy:
matrix:
debian_codename:
- bookworm
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache debian
id: cache-debian
uses: actions/cache@v4
with:
path: |
.apt_cache
debian-*-generic-arm64.tar
key: ${{ matrix.debian_codename }}-test-files
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: QEMU Test
run: |
make qemu_test DEBIAN_CODENAME=${{ matrix.debian_codename }}
sudo rm -r .apt_cache/archives/{lock,partial}
release:
name: Release Artifacts
runs-on: ubuntu-latest
needs:
- build
- build_deb
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Binaries
uses: actions/download-artifact@v5
with:
run-id: ${{ github.run_id }} # Download all artifacts
merge-multiple: true
- name: Versioned release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
bullseye_pixelpilot
bullseye_pixelpilot-rk_*_arm64.deb
bullseye_pixelpilot-rk-dbgsym_*_arm64.deb
bookworm_pixelpilot
bookworm_pixelpilot-rk_*_arm64.deb
bookworm_pixelpilot-rk-dbgsym_*_arm64.deb
config_osd.json
pixelpilot.yaml
gsmenu.sh
- name: Upload latest
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@v2
with:
tag_name: latest
files: |
bullseye_pixelpilot
bullseye_pixelpilot-rk_*_arm64.deb
bullseye_pixelpilot-rk-dbgsym_*_arm64.deb
bookworm_pixelpilot
bookworm_pixelpilot-rk_*_arm64.deb
bookworm_pixelpilot-rk-dbgsym_*_arm64.deb
config_osd.json
pixelpilot.yaml
gsmenu.sh