-
Notifications
You must be signed in to change notification settings - Fork 0
164 lines (144 loc) · 4.22 KB
/
main.yml
File metadata and controls
164 lines (144 loc) · 4.22 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
name: Build
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
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: 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
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