Skip to content

Commit 476da92

Browse files
committed
WIP: Example for making files downloadable
Signed-off-by: Andy Doan <andy@foundries.io>
1 parent b9ed15b commit 476da92

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/build-check-sdk.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,27 @@ jobs:
6868
-DPython3_NumPy_INCLUDE_DIR=${OECORE_TARGET_SYSROOT}/usr/lib/python3.10/site-packages/numpy/core/include \
6969
-DPYTHON_SOABI=cpython-310-aarch64-linux-gnu -DCMAKE_STAGING_PREFIX=$(pwd)/install \
7070
-DCMAKE_PREFIX_PATH=$(pwd)/install/share \
71-
-DBUILD_TESTING=OFF
71+
-DBUILD_TESTING=OFF
72+
73+
- name: Publish artifacts
74+
run: |
75+
build_dir=${PERSIST_DIR}/builds/${GITHUB_RUN_ID}
76+
mkdir -p $build_dir
77+
78+
# TODO - copy files from the "Compile" step above
79+
# For now just make some fake files
80+
echo "This is persistent 1" > ${build_dir}/example1.txt
81+
echo "This is persistent 2" > ${build_dir}/example2.txt
82+
83+
# Instruct our file server to make these files available for download
84+
url="https://quic-qrt-ros-gh-runners-1029608027416.us-central1.run.app/${GITHUB_RUN_ID}/"
85+
86+
retries=3
87+
for ((i=0; i<retries; i++)); do
88+
curl -X POST -v ${url} && break
89+
echo "something went wrong, sleep and retry"
90+
sleep 2
91+
done
92+
(( retries == i )) && { echo 'Failed to publish artifacts'; exit 1; }
93+
94+
echo Artifacts available at: ${url}

0 commit comments

Comments
 (0)