Flat images for RB1 #1
Workflow file for this run
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 Linux deb for Qualcomm hardware | ||
| on: | ||
| # run on pull requests to the main branch | ||
| pull_request: | ||
| branches: [main] | ||
| # run on pushes to the main branch | ||
| push: | ||
| branches: [main] | ||
| # run weekly on Monday at 8:30am | ||
| schedule: | ||
| - cron: '30 8 * * 1' | ||
| # allow manual runs | ||
| workflow_dispatch: | ||
| # only need permission to read repository; implicitely set all other | ||
| # permissions to none | ||
| permissions: | ||
| contents: read | ||
| 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-linux-deb: | ||
| # TODO test whether this builds on x86 too | ||
| # XXX currently missing docker | ||
| #runs-on: [self-hosted, x86] | ||
| runs-on: [self-hosted, arm64, debbuilder] | ||
| container: | ||
| image: debian:trixie | ||
| volumes: | ||
| - /srv/gh-runners/quic-yocto/builds:/fileserver-builds | ||
| 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 Linux kernel deb for Qualcomm hardware | ||
| run: | | ||
| set -ux | ||
| # install build-dependencies | ||
| apt -y install git crossbuild-essential-arm64 make flex bison bc \ | ||
| libelf-dev libssl-dev coreutils | ||
| scripts/build-linux-deb.sh | ||
| - name: Upload results to fileserver | ||
| run: | | ||
| set -ux | ||
| # curl will be used to talk to fileserver; should be installed by | ||
| # default | ||
| apt -y install curl | ||
| # create directory for results on fileserver | ||
| dir="/fileserver-builds/${BUILD_ID}" | ||
| mkdir -vp "${dir}" | ||
| # copy output files | ||
| cp -av *.deb "${dir}" | ||
| # instruct fileserver to publish this directory | ||
| url="${FILESERVER_URL}/${BUILD_ID}/" | ||
| curl -X POST -H 'Accept: text/event-stream' "${url}" | ||
| # create files with directory and URL of these results | ||
| echo "${dir}" >linux-deb.dir | ||
| echo "${url}" >linux-deb.url | ||
| - name: Save URL of build results as an artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| path: linux-deb.dir | ||
| path: linux-deb.url | ||