-
Notifications
You must be signed in to change notification settings - Fork 0
314 lines (286 loc) · 10.8 KB
/
Copy pathci.yml
File metadata and controls
314 lines (286 loc) · 10.8 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
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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
name: ci
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
# Daily run picks up oe-core / bitbake master drift even when no
# change to this repo has fired CI.
schedule:
- cron: '23 5 * * *'
# Cancel superseded runs for the same ref to save CI minutes.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
parse:
# poky-the-distro covers up to walnascar; whinlatter+ no longer
# publish a poky combo repo and are handled by parse-oe-core below.
name: parse (${{ matrix.poky_branch }} / ${{ matrix.machine }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
poky_branch: [kirkstone, scarthgap, styhead, walnascar]
# MACHINE controls which Microsoft binary tarball the recipe
# resolves to:
# qemux86-64 -> linux-x64
# qemuarm64 -> linux-arm64
# qemuarm -> linux-armhf
machine: [qemux86-64, qemuarm64, qemuarm]
steps:
- uses: actions/checkout@v4
with:
path: meta-vscode
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/opt/hostedtoolcache/CodeQL /usr/local/share/boost \
"$AGENT_TOOLSDIRECTORY"
- name: Cache poky checkout
uses: actions/cache@v4
with:
path: poky
key: poky-${{ matrix.poky_branch }}-v1
restore-keys: poky-${{ matrix.poky_branch }}-
- name: Clone poky
run: |
# When the cache restores an older poky and upstream has since
# rebased the release branch (scarthgap has done this), a plain
# `fetch ... ref:remote-ref` refuses the non-fast-forward update
# and the job dies before bitbake even starts. Force-refspec
# (`+ref`) makes the fetch overwrite the local tracking ref;
# any harder breakage (corrupt cache, repository moved) falls
# back to a clean re-clone.
set -eo pipefail
clone_fresh() {
rm -rf poky
git clone --depth 1 --branch ${{ matrix.poky_branch }} \
https://git.yoctoproject.org/poky poky
}
if [ ! -d poky/.git ]; then
clone_fresh
else
if ! git -C poky fetch --depth 1 origin \
"+${{ matrix.poky_branch }}:refs/remotes/origin/${{ matrix.poky_branch }}"; then
echo "fetch failed; falling back to fresh clone"
clone_fresh
else
git -C poky checkout -B ${{ matrix.poky_branch }} \
refs/remotes/origin/${{ matrix.poky_branch }}
fi
fi
- name: Install Yocto host dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gawk wget git diffstat unzip texinfo gcc build-essential chrpath \
socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool \
file locales libacl1
sudo locale-gen en_US.UTF-8
- name: Parse the layer (MACHINE=${{ matrix.machine }})
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd poky
source oe-init-build-env build
cat >> conf/local.conf <<EOF
MACHINE = "${{ matrix.machine }}"
BB_NUMBER_THREADS = "2"
PARALLEL_MAKE = "-j 2"
CONF_VERSION = "2"
EOF
bitbake-layers add-layer "$GITHUB_WORKSPACE/meta-vscode"
bitbake-layers show-layers
bitbake -p
- name: Fetch vscode (MACHINE=${{ matrix.machine }})
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd poky
source oe-init-build-env build
bitbake -c fetch vscode
parse-oe-core:
# whinlatter and wrynose dropped the combined poky repository, so
# we clone openembedded-core + bitbake separately.
name: parse (${{ matrix.release }} / ${{ matrix.machine }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
release: [whinlatter, wrynose]
machine: [qemux86-64, qemuarm64, qemuarm]
# include adds the bitbake-version axis as a value-mapping
# against an existing matrix axis (release); GHA pairs the
# extra key (bitbake) with each existing combo that shares the
# release value.
include:
- release: whinlatter
bitbake: '2.16'
- release: wrynose
bitbake: '2.18'
steps:
- uses: actions/checkout@v4
with:
path: meta-vscode
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/opt/hostedtoolcache/CodeQL /usr/local/share/boost \
"$AGENT_TOOLSDIRECTORY"
- name: Clone oe-core (${{ matrix.release }})
run: |
git clone --depth 1 --branch ${{ matrix.release }} \
https://git.openembedded.org/openembedded-core oe-core
- name: Clone bitbake (${{ matrix.bitbake }})
run: |
git clone --depth 1 --branch ${{ matrix.bitbake }} \
https://git.openembedded.org/bitbake oe-core/bitbake
- name: Install Yocto host dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gawk wget git diffstat unzip texinfo gcc build-essential chrpath \
socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool \
file locales libacl1
sudo locale-gen en_US.UTF-8
- name: Parse the layer (MACHINE=${{ matrix.machine }})
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd oe-core
source oe-init-build-env build
cat >> conf/local.conf <<EOF
MACHINE = "${{ matrix.machine }}"
BB_NUMBER_THREADS = "2"
PARALLEL_MAKE = "-j 2"
CONF_VERSION = "2"
EOF
bitbake-layers add-layer "$GITHUB_WORKSPACE/meta-vscode"
bitbake-layers show-layers
bitbake -p
- name: Fetch vscode (MACHINE=${{ matrix.machine }})
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd oe-core
source oe-init-build-env build
bitbake -c fetch vscode
# Track oe-core / bitbake master for early warning on bitbake API
# drift, new QA checks, layer.conf format changes, etc. This job is
# informational (continue-on-error) so a hot bitbake-master breakage
# doesn't block merges; the value is the alert, not the gate.
parse-oe-core-master:
name: parse (oe-core master / ${{ matrix.machine }}) [informational]
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
fail-fast: false
matrix:
machine: [qemux86-64, qemuarm64, qemuarm]
steps:
- uses: actions/checkout@v4
with:
path: meta-vscode
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/opt/hostedtoolcache/CodeQL /usr/local/share/boost \
"$AGENT_TOOLSDIRECTORY"
- name: Clone oe-core (master)
run: |
git clone --depth 1 --branch master \
https://git.openembedded.org/openembedded-core oe-core
- name: Clone bitbake (master)
run: |
git clone --depth 1 --branch master \
https://git.openembedded.org/bitbake oe-core/bitbake
- name: Install Yocto host dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gawk wget git diffstat unzip texinfo gcc build-essential chrpath \
socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool \
file locales libacl1
sudo locale-gen en_US.UTF-8
- name: Parse the layer (MACHINE=${{ matrix.machine }})
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd oe-core
source oe-init-build-env build
cat >> conf/local.conf <<EOF
MACHINE = "${{ matrix.machine }}"
BB_NUMBER_THREADS = "2"
PARALLEL_MAKE = "-j 2"
CONF_VERSION = "2"
EOF
bitbake-layers add-layer "$GITHUB_WORKSPACE/meta-vscode"
bitbake-layers show-layers
bitbake -p
- name: Fetch vscode (MACHINE=${{ matrix.machine }})
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd oe-core
source oe-init-build-env build
bitbake -c fetch vscode
# Build vscode end-to-end on the LTS we care most about today
# (scarthgap). This catches QA failures (libdir, file-rdeps, etc.)
# that bitbake -p doesn't run. Single arch (x86_64) for cost; the
# parse matrix above still proves the other arches' URLs resolve.
build:
name: build vscode (scarthgap / qemux86-64)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
path: meta-vscode
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/opt/hostedtoolcache/CodeQL /usr/local/share/boost \
"$AGENT_TOOLSDIRECTORY"
- name: Clone poky (scarthgap)
run: git clone --depth 1 --branch scarthgap https://git.yoctoproject.org/poky poky
- name: Install Yocto host dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gawk wget git diffstat unzip texinfo gcc build-essential chrpath \
socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool \
file locales libacl1
sudo locale-gen en_US.UTF-8
- name: Build vscode
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
run: |
set -eo pipefail
cd poky
source oe-init-build-env build
cat >> conf/local.conf <<'EOF'
MACHINE = "qemux86-64"
BB_NUMBER_THREADS = "2"
PARALLEL_MAKE = "-j 2"
INHERIT += "rm_work"
CONF_VERSION = "2"
EOF
bitbake-layers add-layer "$GITHUB_WORKSPACE/meta-vscode"
bitbake vscode