Skip to content

Commit a0c75d2

Browse files
authored
Merge pull request #148 from lool/s3-upload
Misc changes to allow testing with Axiom
2 parents 0ceb241 + 303d8cd commit a0c75d2

File tree

2 files changed

+35
-4
lines changed

2 files changed

+35
-4
lines changed

.github/workflows/debos.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ jobs:
117117
- name: Build flashable files with debos
118118
run: |
119119
set -ux
120-
debos -t u_boot_rb1:rb1-boot.img \
120+
debos \
121+
-t u_boot_rb1:rb1-boot.img \
122+
-t "buildid:${BUILD_ID}" \
121123
--print-recipe \
122124
debos-recipes/qualcomm-linux-debian-flash.yaml
123125
@@ -142,10 +144,20 @@ jobs:
142144
disk-sdcard.img2 \
143145
$(dirname flash_*/flash-emmc)
144146
145-
- name: Upload private artifacts
147+
# upload to a cloud storage space accessible by LAVA and developers
148+
- name: Upload private artifacts (GCP)
146149
uses: qualcomm-linux/upload-private-artifact-action@v1
147-
id: upload_artifacts
150+
id: upload_artifacts_gcp
151+
with:
152+
path: debos-artifacts
153+
154+
# upload to a cloud storage space accessible by Axiom
155+
- name: Upload private artifacts (S3)
156+
uses: qualcomm-linux/upload-private-artifact-action@aws-v2
148157
with:
158+
s3_bucket: qcom-prd-gh-artifacts
159+
# should be the default in that action, or ought to reuse BUILD_ID
160+
destination: ${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ github.run_id }}-${{ github.run_attempt }}/
149161
path: debos-artifacts
150162

151163
- name: Unpack rootfs to generate SBOM
@@ -198,7 +210,7 @@ jobs:
198210
path: sboms
199211
- name: "Print output"
200212
env:
201-
build_url: ${{ steps.upload_artifacts.outputs.url }}
213+
build_url: ${{ steps.upload_artifacts_gcp.outputs.url }}
202214
run: |
203215
echo "Downloads URL: ${build_url}"
204216
echo "url=\"${build_url}\"" >> $GITHUB_OUTPUT

debos-recipes/qualcomm-linux-debian-flash.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
{{- if .u_boot_rb1 -}}
77
{{- $build_rb1 = "true" }}
88
{{- end -}}
9+
{{- $buildid := or .buildid "" }}
910

1011
architecture: arm64
1112

@@ -251,6 +252,13 @@ actions:
251252
"${QCOM_PTOOL}/gen_contents.py" -p ptool-partitions.xml \
252253
-t "$contents" \
253254
-o contents.xml
255+
# XXX insert build_id element before windows_root_path;
256+
# this will be nicer to do when gen_contents.py supports
257+
# setting this; see also:
258+
# https://github.com/qualcomm-linux/qcom-ptool/pull/38
259+
sed -i \
260+
"/windows_root_path/ i \t\t\t\t<build_id>{{$buildid}}</build_id>" \
261+
contents.xml
254262
fi
255263
# generate flashing files from qcom-partitions.xml
256264
"${QCOM_PTOOL}/ptool.py" -x ptool-partitions.xml
@@ -263,6 +271,17 @@ actions:
263271
# copy platform partition files
264272
cp --preserve=mode,timestamps -v build/ptool/{{ $board.platform }}/* \
265273
"${flash_dir}"
274+
# adjust paths in contents.xml to use board-specific flash_* subdir
275+
if [ -e "${flash_dir}/contents.xml" ]; then
276+
# one set of backslashes for shell quoting, another one for sed
277+
# parsing
278+
windows_path=".\\\\flash_{{ $board.name }}\\\\"
279+
linux_path="./flash_{{ $board.name }}/"
280+
sed -i \
281+
-e "s:<windows_root_path>.*:<windows_root_path>${windows_path}</windows_root_path>:" \
282+
-e "s:<linux_root_path>.*:<linux_root_path>${linux_path}</linux_root_path>:" \
283+
"${flash_dir}/contents.xml"
284+
fi
266285
# remove BLANK_GPT and WIPE_PARTITIONS files as it's common for people
267286
# to run "qdl rawprogram*.xml", mistakingly including these; perhaps
268287
# ptool should have a flag not to generate these; note that there are

0 commit comments

Comments
 (0)