-
Notifications
You must be signed in to change notification settings - Fork 3
202 lines (177 loc) · 5.54 KB
/
Copy pathmain.yml
File metadata and controls
202 lines (177 loc) · 5.54 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
name: Build
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions:
contents: read
concurrency:
group: build-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build image
runs-on: ubuntu-24.04
timeout-minutes: 360
steps:
- name: Check out sources
uses: actions/checkout@v6
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
bc \
bison \
build-essential \
ca-certificates \
cpio \
flex \
git \
libelf-dev \
libncurses-dev \
libssl-dev \
texinfo \
wget \
xz-utils
- name: Restore source downloads cache
id: restore-downloads
uses: actions/cache/restore@v5
with:
path: downloads
key: downloads-linux-${{ hashFiles('build.sh') }}
- name: Restore build workspace cache
id: restore-workspace
uses: actions/cache/restore@v5
with:
path: |
.build-state
bootwrapper
busybox-*
elf2flt-*
gcc-*
linux-*
rootfs
toolchain
uClibc-ng-*
binutils-*
key: workspace-linux-${{ github.ref_name }}-${{ hashFiles('build.sh', 'configs/**', 'patches/**', 'tools/**') }}
restore-keys: |
workspace-linux-${{ github.ref_name }}-
workspace-linux-${{ github.base_ref }}-
workspace-linux-main-
- name: Build image
id: build-image
env:
QUIET: 1
run: ./build.sh
- name: Build diagnostic subsystem rollup
if: success()
env:
QUIET: 1
KERNEL_DEBUG_INFO: reduced
run: ./build.sh linux bootwrapper
- name: Render subsystem rollup markdown
if: success()
run: |
python3 scripts/rollup-to-markdown.py \
--rollup profiles/kernel-pgo/none/subsystem-rollup.txt \
--budget-status profiles/kernel-pgo/none/subsystem-budget.txt \
--top 12 \
--output profiles/kernel-pgo/none/subsystem-rollup.md
- name: Add subsystem rollup to step summary
if: success()
run: cat profiles/kernel-pgo/none/subsystem-rollup.md >> "$GITHUB_STEP_SUMMARY"
- name: Save source downloads cache
if: always() && steps.restore-downloads.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: downloads
key: downloads-linux-${{ hashFiles('build.sh') }}
- name: Save build workspace cache
if: always() && steps.restore-workspace.outputs.cache-hit != 'true' && steps.build-image.outcome == 'success'
uses: actions/cache/save@v5
with:
path: |
.build-state
bootwrapper
busybox-*
elf2flt-*
gcc-*
linux-*
rootfs
toolchain
uClibc-ng-*
binutils-*
key: workspace-linux-${{ github.ref_name }}-${{ hashFiles('build.sh', 'configs/**', 'patches/**', 'tools/**') }}
- name: Summarize cache reuse
if: always()
run: |
{
echo "### Cache summary"
echo
echo "- downloads cache hit: ${{ steps.restore-downloads.outputs.cache-hit }}"
echo "- workspace cache hit: ${{ steps.restore-workspace.outputs.cache-hit }}"
} >> "$GITHUB_STEP_SUMMARY"
- name: Upload build image
if: success()
uses: actions/upload-artifact@v7
with:
name: bootable-image
compression-level: 0
path: bootwrapper/linux.axf
- name: Upload build logs
if: always()
uses: actions/upload-artifact@v7
with:
name: build-logs
compression-level: 0
path: |
logs
if-no-files-found: ignore
- name: Upload subsystem rollup artifacts
if: success()
uses: actions/upload-artifact@v7
with:
name: subsystem-rollup
compression-level: 0
path: |
profiles/kernel-pgo/none/subsystem-rollup.txt
profiles/kernel-pgo/none/subsystem-rollup.md
profiles/kernel-pgo/none/subsystem-budget.txt
profiles/kernel-pgo/none/subsystem-rollup-tree.html
profiles/kernel-pgo/none/subsystem-rollup-deep.html
profiles/kernel-pgo/none/subsystem-rollup-bars.svg
if-no-files-found: warn
qemu:
name: Validate boot in QEMU
runs-on: ubuntu-24.04
timeout-minutes: 30
needs: build
steps:
- name: Check out sources
uses: actions/checkout@v6
- name: Install QEMU dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
expect \
qemu-system-arm
- name: Download build image
uses: actions/download-artifact@v5
with:
name: bootable-image
path: bootwrapper
- name: Validate boot in QEMU
run: scripts/validate-qemu.sh bootwrapper/linux.axf qemu.log
- name: Upload QEMU logs
if: always()
uses: actions/upload-artifact@v7
with:
name: qemu-logs
compression-level: 0
path: |
qemu.log
if-no-files-found: ignore