1818permissions :
1919 contents : read
2020
21- defaults :
22- # run all commands from the debos-recipes directory
23- run :
24- working-directory : debos-recipes
25-
2621env :
22+ # github runs are only unique per repository and may also be re-run; create a
23+ # build id for the current run
24+ BUILD_ID : ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }}
2725 FILESERVER_URL : https://quic-yocto-fileserver-1029608027416.us-central1.run.app
2826
2927# cancel in progress builds for this workflow triggered by the same ref
@@ -38,69 +36,75 @@ jobs:
3836 image : debian:trixie
3937 volumes :
4038 - /srv/gh-runners/quic-yocto/builds:/fileserver-builds
41- - /srv/gh-runners/quic-yocto/downloads/qcom-deb-images :/fileserver-downloads
39+ - /srv/gh-runners/quic-yocto/downloads:/fileserver-downloads
4240 options : --privileged
4341 steps :
44- - uses : actions/checkout@v4
45- with :
46- fetch-depth : 0
47-
48- - name : Copy Linux deb and U-Boot for RB1 from fileserver's downloads
49- run : |
50- set -ux
51- mkdir -v local-debs
52- # copy linux-image but not the -dbg e.g.
53- # linux-image-6.15.0-..._6.15.0...-1_arm64.deb but not
54- # linux-image-6.15.0-...-dbg_6.15.0...-1_arm64.deb
55- find /fileserver-downloads/linux-deb-latest/ \
56- -name linux-image\*.deb \
57- -not -name linux-image\*-dbg_\*.deb \
58- -exec cp -av '{}' local-debs/ \;
59- # copy U-Boot RB1 binary
60- cp -av /fileserver-downloads/u-boot-rb1-latest/rb1-boot.img .
61-
6242 # make sure we have latest packages first, to get latest fixes and to
6343 # avoid an automated update while we're building
6444 - name : Update OS packages
6545 run : |
66- set -x
46+ set -ux
6747 apt update
6848 apt -y upgrade
6949 apt -y full-upgrade
70- # debos is needed to build recipes, mtools is needed for the flash
71- # recipe
72- apt -y install debos mtools
7350
74- - name : Build debos recipe
51+ - uses : actions/checkout@v4
52+ with :
53+ fetch-depth : 0
54+
55+ - name : Copy Linux deb and U-Boot for RB1 from fileserver space for downloads
56+ run : |
57+ set -ux
58+ mkdir -v debos-recipes/local-debs
59+ dir="/fileserver-downloads/qcom-deb-images"
60+ # copy linux-image but not the -dbg e.g.
61+ # linux-image-6.15.0-..._6.15.0...-1_arm64.deb but not
62+ # linux-image-6.15.0-...-dbg_6.15.0...-1_arm64.deb
63+ find "${dir}/linux-deb-latest/" \
64+ -name linux-image\*.deb \
65+ -not -name linux-image\*-dbg_\*.deb \
66+ -exec cp -av '{}' debos-recipes/local-debs/ \;
67+ # copy U-Boot RB1 binary
68+ cp -av "${dir}/u-boot-rb1-latest/rb1-boot.img" .
69+
70+ # mtools is needed for the flash recipe
71+ - name : Install debos and dependencies of the recipes
72+ run : apt -y install debos mtools
73+
74+ - name : Build rootfs with debos
7575 run : |
76- set -x
77- # start by building the root filesystem
76+ set -ux
7877 debos -t xfcedesktop:true -t localdebs:local-debs/ \
79- qualcomm-linux-debian-rootfs.yaml
78+ debos-recipes/qualcomm-linux-debian-rootfs.yaml
79+
80+ - name : Build UFS and SD card images with debos
81+ run : |
82+ set -ux
8083 # debos tries KVM and UML as backends, and falls back to
8184 # building directly on the host, but that requires loop
82- # devices; use qemu backend explicitly even if it's slower
85+ # devices; use qemu backend explicitly even if it's slower;
8386 # qemu backend also requires to set scratchsize, otherwise the
8487 # whole build is done from memory and the out of memory killer
8588 # gets triggered
8689 debos -b qemu --scratchsize 4GiB -t imagetype:ufs \
87- qualcomm-linux-debian-image.yaml
90+ debos-recipes/ qualcomm-linux-debian-image.yaml
8891 debos -b qemu --scratchsize 4GiB -t imagetype:sdcard \
89- qualcomm-linux-debian-image.yaml
90- # build flashable files
91- debos -t u_boot_rb1:rb1-boot.img qualcomm-linux-debian-flash.yaml
92+ debos-recipes/qualcomm-linux-debian-image.yaml
93+
94+ - name : Build flashable files with debos
95+ run : |
96+ set -ux
97+ debos -t u_boot_rb1:rb1-boot.img \
98+ debos-recipes/qualcomm-linux-debian-flash.yaml
9299
93- - name : Upload artifacts to fileserver
100+ - name : Upload artifacts to fileserver space for builds
94101 run : |
95- set -x
102+ set -ux
96103 # curl will be used to talk to fileserver; should be installed by
97104 # default
98105 apt -y install curl
99- # github runs are only unique per repository and may also be re-run;
100- # create an unique id with repository, run id, and run attempt
101- id="${GITHUB_REPOSITORY}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
102106 # create a directory for the current run
103- dir="/fileserver-builds/${id }"
107+ dir="/fileserver-builds/${BUILD_ID }"
104108 mkdir -vp "${dir}"
105109 # copy output files
106110 cp -av rootfs.tar.gz "${dir}"
@@ -117,6 +121,6 @@ jobs:
117121 disk-sdcard.img2 \
118122 flash_rb1*
119123 # instruct fileserver to publish this directory
120- url="${FILESERVER_URL}/${id }/"
124+ url="${FILESERVER_URL}/${BUILD_ID }/"
121125 curl -X POST -H 'Accept: text/event-stream' "${url}"
122126
0 commit comments