Skip to content

Commit

Permalink
Added: add publish artifacts in build workflow
Browse files Browse the repository at this point in the history
Add steps to copy build artifacts to shared directory for
downloading.

Signed-off-by: Jiaxing Shi <quic_jiaxshi@quicinc.com>
  • Loading branch information
jiaxshi committed Nov 14, 2024
1 parent 78fe014 commit f50960f
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/build-check-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
runs-on: [self-hosted, x86]
timeout-minutes: 720
steps:
- name: Install dependencies
run: |
sudo apt install -y zip
- name: Set up SDK
run: |
set -x
Expand Down Expand Up @@ -68,4 +72,23 @@ jobs:
-DPython3_NumPy_INCLUDE_DIR=${OECORE_TARGET_SYSROOT}/usr/lib/python3.10/site-packages/numpy/core/include \
-DPYTHON_SOABI=cpython-310-aarch64-linux-gnu -DCMAKE_STAGING_PREFIX=$(pwd)/install \
-DCMAKE_PREFIX_PATH=$(pwd)/install/share \
-DBUILD_TESTING=OFF
-DBUILD_TESTING=OFF
- name: Publish artifacts
run: |
set -x
build_dir=${PERSIST_DIR}/builds/${GITHUB_RUN_ID}
mkdir -p $build_dir
zip -r ${build_dir}/artifacts.zip ${WORKSPACE}/install ${WORKSPACE}/build ${WORKSPACE}/log
# Instruct our file server to make these files available for download
url="https://quic-qrt-ros-fileserver-1029608027416.us-central1.run.app/${GITHUB_RUN_ID}/"
retries=3
for ((i=0; i<retries; i++)); do
curl -X POST -v ${url} && break
echo "something went wrong, sleep and retry"
sleep 2
done
(( retries == i )) && { echo 'Failed to publish artifacts'; exit 1; }
echo Artifacts available at: ${url}

0 comments on commit f50960f

Please sign in to comment.