Build U-Boot for RB1 #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build U-Boot for RB1 | |
on: | |
# run weekly on Monday at 8:30am | |
schedule: | |
- cron: '30 6 * * 1' | |
# allow manual runs | |
workflow_dispatch: | |
# implicitely set all other permissions to none | |
permissions: | |
contents: read # actions/checkout | |
env: | |
# where results will be posted/hosted | |
FILESERVER_URL: https://quic-yocto-fileserver-1029608027416.us-central1.run.app | |
# github runs are only unique per repository and may also be re-run; create a | |
# build id for the current run | |
BUILD_ID: ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt }} | |
# cancel in progress builds for this workflow triggered by the same ref | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-u-boot-rb1: | |
# don't run cron from forks of the main repository or from other branches | |
if: github.repository == 'qualcomm-linux/qcom-deb-images' && github.ref == 'refs/heads/main' | |
# for cross-builds | |
runs-on: [self-hosted, qcom-u2404, amd64] | |
# alternative for native builds, but overkill to do both | |
#runs-on: [self-hosted, qcom-u2404, arm64] | |
container: | |
image: public.ecr.aws/debian/debian:trixie | |
volumes: | |
- /efs/qli/metaqcom/gh-runners/quic-yocto/downloads:/fileserver-downloads | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# make sure we have latest packages first, to get latest fixes, to avoid | |
# an automated update while we're building, and to prevent version skews | |
- name: Update OS packages | |
run: | | |
set -ux | |
apt update | |
apt -y upgrade | |
apt -y full-upgrade | |
- name: Build U-Boot Android boot image for RB1 | |
run: | | |
set -ux | |
# install build-dependencies | |
apt -y install git crossbuild-essential-arm64 make bison flex bc \ | |
libssl-dev gnutls-dev xxd coreutils gzip mkbootimg fwupd | |
scripts/build-u-boot-rb1.sh | |
- name: Stage artifacts for upload | |
run: | | |
set -ux | |
mkdir -v artifacts | |
cp -av \ | |
u-boot/u-boot-nodtb.bin.gz \ | |
u-boot/dts/upstream/src/arm64/qcom/qrb2210-rb1.dtb \ | |
u-boot/u-boot-nodtb.bin.gz-dtb \ | |
u-boot/u-boot.bin \ | |
u-boot/rb1-boot.img \ | |
u-boot/u-boot-cap.bin \ | |
u-boot/u-boot.cab \ | |
artifacts | |
- name: Upload results to fileserver space for downloads | |
run: | | |
set -ux | |
export BUILD_DIR="/fileserver-downloads/${BUILD_ID}" | |
mkdir -vp "${BUILD_DIR}" | |
cp -av artifacts/* "${BUILD_DIR}" | |
# create or update u-boot-rb1-latest symlink | |
mkdir -vp /fileserver-downloads/qcom-deb-images | |
( | |
cd /fileserver-downloads/qcom-deb-images | |
# remove what used to be a directory and create/update symlink to | |
# point to latest build | |
rm -rvf u-boot-rb1-latest | |
ln -fnsv "../${BUILD_ID}" u-boot-rb1-latest | |
) | |
# perhaps help NFS sync | |
sync | |
- name: Upload private artifacts | |
uses: qualcomm-linux/upload-private-artifact-action@v1 | |
id: upload_artifacts | |
with: | |
path: artifacts | |