-
Notifications
You must be signed in to change notification settings - Fork 206
Expand file tree
/
Copy pathgigabyte-ampere-cloud-installer.yaml
More file actions
485 lines (475 loc) · 22 KB
/
gigabyte-ampere-cloud-installer.yaml
File metadata and controls
485 lines (475 loc) · 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
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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
name: Workflow for Cloud image installer for Gigabye Ampere server.
on:
pull_request:
paths:
- 'gigabyte-ampere-cloud-installer/**'
push:
branchs:
- '**'
jobs:
build-cloud-installer-initramfs-job:
runs-on: ubuntu-22.04-arm
container:
image: debian@sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 # debian:trixie-20260202
options: --privileged
defaults:
run:
working-directory: ./gigabyte-ampere-cloud-installer
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setting up build environment
run: |
apt-get update
apt-get upgrade -y
apt-get install -y sudo
apt-get install -y debconf-utils
echo "tzdata tzdata/Areas select Etc" | debconf-set-selections -v
echo "tzdata tzdata/Zones/Etc select UTC" | debconf-set-selections -v
DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
dpkg-reconfigure --frontend noninteractive tzdata
echo "pbuilder pbuilder/mirrorsite string http://deb.debian.org/debian/" | debconf-set-selections -v
DEBIAN_FRONTEND=noninteractive apt-get install -y pbuilder
dpkg-reconfigure --frontend noninteractive pbuilder
apt-get install -y lsb-release
- name: Generate new initramfs
run: |
export HOME=$GITHUB_WORKSPACE
./regenerate-initramfs.sh
- name: Upload artifacts for initramfs
uses: actions/upload-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-initramfs-artifacts
path: gigabyte-ampere-cloud-installer/initrd.img-*
build-cloud-installer-job:
needs: [build-cloud-installer-initramfs-job]
runs-on: ubuntu-22.04-arm
container:
image: debian@sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 # debian:trixie-20260202
options: --privileged
defaults:
run:
working-directory: ./gigabyte-ampere-cloud-installer
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-initramfs-artifacts
path: ./gigabyte-ampere-cloud-installer
- name: Setting up build environment
run: |
apt-get update
apt-get upgrade -y
apt-get install -y sudo
apt-get install -y debconf-utils
echo "tzdata tzdata/Areas select Etc" | debconf-set-selections -v
echo "tzdata tzdata/Zones/Etc select UTC" | debconf-set-selections -v
DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
dpkg-reconfigure --frontend noninteractive tzdata
apt-get install -y util-linux util-linux-extra
apt-get install -y xz-utils
apt-get install -y qemu-system-arm qemu-user-static binfmt-support
apt-get install -y e2tools e2fsprogs
apt-get install -y ubuntu-dev-tools
apt-get install -y wget curl
apt-get install -y live-build
- name: Download Debian cloud image
run: ./download_debian.sh
- name: Modify Debian's cloud image for new initramfs.
run: ./replace-initramfs.sh
- name: Live build
run: |
./lb_setup.sh
./lb_build.sh
- name: Compression
run: xz -9e live-image-arm64.iso
- name: Clean build directory
run: ./lb_clean.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-artifacts
path: gigabyte-ampere-cloud-installer/live-image-arm64.iso.xz
download-cidata-job:
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use github CLI to search for run-id
id: search-run
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RUN_ID=$(gh run list --workflow "Workflow for Cloud init image for Cuttlefish" --status success --limit 1 --json databaseId --jq '.[0].databaseId')
echo "Found Run ID is : ${RUN_ID}"
echo "target_id=$RUN_ID" >> $GITHUB_OUTPUT
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: cloud-init-image-for-cuttlefish-artifacts
run-id: ${{ steps.search-run.outputs.target_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Reupload artifact for later test cases
uses: actions/upload-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-cidata
path: gigabyte-cidata.iso
test-iso-qemu-job:
needs:
- build-cloud-installer-job
- download-cidata-job
runs-on: ubuntu-22.04-arm
container:
image: debian@sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 # debian:trixie-20260202
defaults:
run:
working-directory: ./gigabyte-ampere-cloud-installer
env:
TEST_DISK_SIZE: "10G"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download installer artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-artifacts
path: ./gigabyte-ampere-cloud-installer
- name: Download cidata artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-cidata
path: ./gigabyte-ampere-cloud-installer
- name: Prepare test environment
uses: ./.github/actions/gigabyte-ampere-cloud-installer-prepare-testbed
- name: Extract artifacts
run: xz -d live-image-arm64.iso.xz
- name: Run installer on qemu
run: ./tests/run-qemu.sh live-image-arm64.iso "-display none"
- name: Check partitions
run: |
partx uboot_qemu_disk1.img
partx uboot_qemu_disk1.img | grep esp
partx uboot_qemu_disk1.img | grep pvlina
- name: Cloud image first boot with qemu
uses: ./.github/actions/gigabyte-ampere-cloud-installer-test-first-boot
- name: Shutdown qemu
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'echo cuttlefish | sudo -S -k shutdown -h 1'
while ! grep "reboot: Power down" console_001.log; do sleep 30; done
tail -n +"${CONSOLELINES}" console_001.log
- name: Extract partitions
run: |
./tests/installer-iso-extract-partitions-multidisk.sh
- name: Check if kernel is installed
run: |
e2ls -l rootfs.img:/boot/vmlinuz-*
e2cp rootfs.img:/boot/$(e2ls rootfs.img:/boot/vmlinuz-* | tail -1) .
test -e vmlinuz-*
- name: Check if Cuttlefish Debian packages are installed
run: |
e2ls -l rootfs.img:/usr/bin/cvd_host_orchestrator
e2ls -l rootfs.img:/usr/bin/cvd_host_orchestrator | grep cvd_host_orchestrator | grep root
test-iso-multidisk-qemu-empty-disk-job:
needs:
- build-cloud-installer-job
- download-cidata-job
runs-on: ubuntu-22.04-arm
container:
image: debian@sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 # debian:trixie-20260202
defaults:
run:
working-directory: ./gigabyte-ampere-cloud-installer
env:
TEST_DISK_SIZE: "10G"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download installer artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-artifacts
path: ./gigabyte-ampere-cloud-installer
- name: Download cidata artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-cidata
path: ./gigabyte-ampere-cloud-installer
- name: Prepare test environment
uses: ./.github/actions/gigabyte-ampere-cloud-installer-prepare-testbed
- name: Extract artifacts
run: xz -d live-image-arm64.iso.xz
- name: Create Empty 2 disks
run: ../gigabyte-ampere-cuttlefish-installer/tests/multidisk/installer-create-empty-disk2.sh
- name: Run installer on qemu
run: ./tests/run-qemu.sh live-image-arm64.iso "-display none"
- name: Check partitions
run: |
partx uboot_qemu_disk1.img
partx uboot_qemu_disk1.img | grep esp
partx uboot_qemu_disk1.img | grep pvlina
- name: Cloud image first boot with qemu
uses: ./.github/actions/gigabyte-ampere-cloud-installer-test-first-boot
- name: Shutdown qemu
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'echo cuttlefish | sudo -S -k shutdown -h 1'
while ! grep "reboot: Power down" console_001.log; do sleep 30; done
tail -n +"${CONSOLELINES}" console_001.log
- name: Extract partitions
run: |
./tests/installer-iso-extract-partitions-multidisk.sh
- name: Check if kernel is installed
run: |
e2ls -l rootfs.img:/boot/vmlinuz-*
e2cp rootfs.img:/boot/$(e2ls rootfs.img:/boot/vmlinuz-* | tail -1) .
test -e vmlinuz-*
- name: Check if Cuttlefish Debian packages are installed
run: |
e2ls -l rootfs.img:/usr/bin/cvd_host_orchestrator
e2ls -l rootfs.img:/usr/bin/cvd_host_orchestrator | grep cvd_host_orchestrator | grep root
test-iso-multidisk-qemu-disk2-with-data-job:
needs:
- build-cloud-installer-job
- download-cidata-job
runs-on: ubuntu-22.04-arm
container:
image: debian@sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 # debian:trixie-20260202
defaults:
run:
working-directory: ./gigabyte-ampere-cloud-installer
env:
TEST_DISK_SIZE: "10G"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download installer artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-artifacts
path: ./gigabyte-ampere-cloud-installer
- name: Download cidata artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-cidata
path: ./gigabyte-ampere-cloud-installer
- name: Prepare test environment
uses: ./.github/actions/gigabyte-ampere-cloud-installer-prepare-testbed
- name: Extract artifacts
run: xz -d live-image-arm64.iso.xz
- name: Create 2 disks with preinstalled partitions.
run: ../gigabyte-ampere-cuttlefish-installer/tests/multidisk/installer-create-preinstalled-disk2.sh
- name: Run installer on qemu
run: ./tests/run-qemu.sh live-image-arm64.iso "-display none"
- name: Check partitions
run: |
partx uboot_qemu_disk1.img
partx uboot_qemu_disk1.img | grep esp
partx uboot_qemu_disk1.img | grep pvlina
- name: Cloud image first boot with qemu
uses: ./.github/actions/gigabyte-ampere-cloud-installer-test-first-boot
- name: Shutdown qemu
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'echo cuttlefish | sudo -S -k shutdown -h 1'
while ! grep "reboot: Power down" console_001.log; do sleep 30; done
tail -n +"${CONSOLELINES}" console_001.log
- name: Extract partitions
run: |
./tests/installer-iso-extract-partitions-multidisk.sh
- name: Check if kernel is installed
run: |
e2ls -l rootfs.img:/boot/vmlinuz-*
e2cp rootfs.img:/boot/$(e2ls rootfs.img:/boot/vmlinuz-* | tail -1) .
test -e vmlinuz-*
- name: Check if Cuttlefish Debian packages are installed
run: |
e2ls -l rootfs.img:/usr/bin/cvd_host_orchestrator
e2ls -l rootfs.img:/usr/bin/cvd_host_orchestrator | grep cvd_host_orchestrator | grep root
test-iso-multidisk-qemu-disk5-with-data-job:
needs:
- build-cloud-installer-job
- download-cidata-job
runs-on: ubuntu-22.04-arm
container:
image: debian@sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 # debian:trixie-20260202
defaults:
run:
working-directory: ./gigabyte-ampere-cloud-installer
env:
TEST_DISK_SIZE: "10G"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download installer artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-artifacts
path: ./gigabyte-ampere-cloud-installer
- name: Download cidata artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-cidata
path: ./gigabyte-ampere-cloud-installer
- name: Prepare test environment
uses: ./.github/actions/gigabyte-ampere-cloud-installer-prepare-testbed
- name: Extract artifacts
run: xz -d live-image-arm64.iso.xz
- name: Create 5 disks with preinstalled partitions.
run: ../gigabyte-ampere-cuttlefish-installer/tests/multidisk/installer-create-preinstalled-disk5.sh
- name: Run installer on qemu
run: ./tests/run-qemu.sh live-image-arm64.iso "-display none"
- name: Check partitions
run: |
partx uboot_qemu_disk0.img
partx uboot_qemu_disk0.img | grep esp
partx uboot_qemu_disk0.img | grep pvlina
partx uboot_qemu_disk1.img
partx uboot_qemu_disk1.img | grep pvlina
- name: Cloud image first boot with qemu
uses: ./.github/actions/gigabyte-ampere-cloud-installer-test-first-boot
- name: Shutdown qemu
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'echo cuttlefish | sudo -S -k shutdown -h 1'
while ! grep "reboot: Power down" console_001.log; do sleep 30; done
tail -n +"${CONSOLELINES}" console_001.log
- name: Extract partitions
run: |
./tests/installer-iso-extract-partitions-multidisk.sh
- name: Check if kernel is installed
run: |
e2ls -l rootfs.img:/boot/vmlinuz-*
e2cp rootfs.img:/boot/$(e2ls rootfs.img:/boot/vmlinuz-* | tail -1) .
test -e vmlinuz-*
- name: Check if Cuttlefish Debian packages are installed
run: |
e2ls -l rootfs.img:/usr/bin/cvd_host_orchestrator
e2ls -l rootfs.img:/usr/bin/cvd_host_orchestrator | grep cvd_host_orchestrator | grep root
test-iso-cf-qemu-job:
needs:
- build-cloud-installer-job
- download-cidata-job
runs-on: ubuntu-22.04-arm
container:
image: debian@sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 # debian:trixie-20260202
defaults:
run:
working-directory: ./gigabyte-ampere-cloud-installer
env:
TEST_DISK_SIZE: "10G"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download installer artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-artifacts
path: ./gigabyte-ampere-cloud-installer
- name: Download cidata artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-cidata
path: ./gigabyte-ampere-cloud-installer
- name: Prepare test environment
uses: ./.github/actions/gigabyte-ampere-cloud-installer-prepare-testbed
- name: Extract artifacts
run: xz -d live-image-arm64.iso.xz
- name: Run installer on qemu
run: ./tests/run-qemu.sh live-image-arm64.iso "-display none"
- name: Check partitions
run: |
partx uboot_qemu_disk1.img
partx uboot_qemu_disk1.img | grep esp
partx uboot_qemu_disk1.img | grep pvlina
- name: Cloud image first boot with qemu
uses: ./.github/actions/gigabyte-ampere-cloud-installer-test-first-boot
- name: Download Cuttlefish
run: |
../gigabyte-ampere-cuttlefish-installer/utils/download-ci-cf.sh
- name: Deploy cuttlefish
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'echo cuttlefish | sudo -S -k apt-get install -y unzip'
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'mkdir cf'
sshpass -p cuttlefish scp -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -P 33322 cvd-host_package.tar.gz vsoc-01@localhost:/home/vsoc-01/
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'cd cf; tar -xvf ../cvd-host_package.tar.gz'
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'rm -f cvd-host_package.tar.gz'
sshpass -p cuttlefish scp -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -P 33322 aosp_cf_arm64*_phone-*.zip vsoc-01@localhost:/home/vsoc-01/
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'cd cf; unzip ../aosp_cf_arm64*_phone-*.zip'
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'rm -f aosp_cf_arm64*_phone-*.zip'
- name: Run cuttlefish command line
run: sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'cd cf; HOME=$PWD ./bin/launch_cvd -help' || true
- name: Run apt-cache policy
run: sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'apt-cache policy'
- name: Test for lzop
run: sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'lzop -V'
- name: Test for Google NTP server
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'ntpq -p'
CHECK_GOOGLE_TIME_SERVER=0
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'ntpq -p' | grep 'time1.google' && CHECK_GOOGLE_TIME_SERVER=1
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'ntpq -p' | grep '.GOOG.' && CHECK_GOOGLE_TIME_SERVER=1
if [ x"${CHECK_GOOGLE_TIME_SERVER}" != x"1" ]; then echo "Google Time Servers not found!"; false; fi
- name: Test for ulimit
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'ulimit -a'
test $(sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'ulimit -n') -ge 2048
- name: Test for iptables
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'update-alternatives --display iptables' | grep "link currently points to /usr/sbin/iptables-legacy"
- name: Shutdown qemu
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'echo cuttlefish | sudo -S -k shutdown -h 1'
while ! grep "reboot: Power down" console_001.log; do sleep 30; done
tail -n +"${CONSOLELINES}" console_001.log
test-iso-cf-container-qemu-job:
needs:
- build-cloud-installer-job
- download-cidata-job
runs-on: ubuntu-22.04-arm
container:
image: debian@sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 # debian:trixie-20260202
defaults:
run:
working-directory: ./gigabyte-ampere-cloud-installer
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download installer artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-artifacts
path: ./gigabyte-ampere-cloud-installer
- name: Download cidata artifacts
uses: actions/download-artifact@v4
with:
name: gigabyte-ampere-cloud-installer-cidata
path: ./gigabyte-ampere-cloud-installer
- name: Prepare test environment
uses: ./.github/actions/gigabyte-ampere-cloud-installer-prepare-testbed
- name: Extract artifacts
run: xz -d live-image-arm64.iso.xz
- name: Run installer on qemu
run: ./tests/run-qemu.sh live-image-arm64.iso "-display none"
- name: Check partitions
run: |
partx uboot_qemu_disk1.img
partx uboot_qemu_disk1.img | grep esp
partx uboot_qemu_disk1.img | grep pvlina
- name: Cloud image first boot with qemu
uses: ./.github/actions/gigabyte-ampere-cloud-installer-test-first-boot
- name: Download Cuttlefish
run: |
../gigabyte-ampere-cuttlefish-installer/utils/download-ci-cf.sh
- name: Test whether Host Orchestrator in the docker instance is alive or not.
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'echo cuttlefish | sudo -S -k docker pull us-docker.pkg.dev/android-cuttlefish-artifacts/cuttlefish-orchestration/cuttlefish-orchestration:nightly'
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'echo cuttlefish | sudo -S -k docker run -d --privileged -p 4080:2080 us-docker.pkg.dev/android-cuttlefish-artifacts/cuttlefish-orchestration/cuttlefish-orchestration:nightly'
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'curl http://localhost:4080/cvds -v --retry 6 --retry-all-errors --retry-delay 10'
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'curl http://localhost:4080/cvds -v' | tr -d '[:space:]' | grep -xq '{"cvds":\[\]}'
- name: Shutdown qemu
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'echo cuttlefish | sudo -S -k shutdown -h 1'
while ! grep "reboot: Power down" console_001.log; do sleep 30; done
tail -n +"${CONSOLELINES}" console_001.log