build boards #364
This file contains 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 boards | |
on: | |
workflow_dispatch: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '5 2 * * 6' | |
env: | |
BUILDDIR: gh | |
jobs: | |
prepare: | |
runs-on: [self-hosted, linux, x64] | |
outputs: | |
artifact_path: ${{ steps.artifact_path.outputs.artifact_path }} | |
steps: | |
- name: Clean up | |
run: rm -fR $BUILDDIR | |
- uses: actions/checkout@v4 | |
- name: cache metadata layers | |
run: ./ci/update-repos | |
env: | |
LAYERCACHE: ${{ vars.PERSISTENT_DIR }}/layers | |
- name: define artifact output directory path | |
id: artifact_path | |
run: echo "artifact_path=${{ vars.ARTIFACT_OUTPUT_DIR }}/$GITHUB_REPOSITORY/$GITHUB_WORKFLOW/$GITHUB_RUN_NUMBER" >> "$GITHUB_OUTPUT" | |
- name: show artifact output directory path | |
run: echo "artifact_path - ${{ steps.artifact_path.outputs.artifact_path }}" | |
- name: create artifact directory | |
run: mkdir -p ${{ steps.artifact_path.outputs.artifact_path }} | |
build: | |
needs: [prepare] | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
fail-fast: false | |
matrix: | |
board: [ | |
beaglebone, | |
beaglebone-ai64, | |
beagleplay, | |
raspberrypi, | |
raspberrypi-cm, | |
raspberrypi0, | |
raspberrypi0-wifi, | |
raspberrypi2, | |
raspberrypi0-2w, | |
raspberrypi0-2w-64, | |
raspberrypi3, | |
raspberrypi3-64, | |
raspberrypi-cm3, | |
raspberrypi4, | |
raspberrypi4-64, | |
raspberrypi5, | |
qemuarm64, | |
qemux86-64, | |
vexpress-qemu, | |
vexpress-qemu-flash, | |
x86-virtual, | |
beaglebone-uboot, | |
] | |
experimental: [false] | |
subpath: [.] | |
include: | |
- board: raspberrypi4-64-app-updates | |
subpath: demos | |
experimental: true | |
- board: qemuarm64-client-only | |
subpath: demos | |
experimental: false | |
- board: qemuarm64-bootloader-validation | |
subpath: demos | |
experimental: false | |
- board: imx93-var-som | |
experimental: true | |
- board: olimex-imx8mp-evb | |
experimental: true | |
- board: jetson-agx-orin-devkit | |
experimental: true | |
- board: jetson-agx-xavier-devkit | |
experimental: true | |
- board: jetson-orin-nano-devkit | |
experimental: true | |
runs-on: [self-hosted, linux, x64] | |
container: | |
# the container image needs to be effectively hardcoded, it seems. | |
image: ghcr.io/theyoctojester/devcontainer-base-yoep:main | |
volumes: | |
- ${{ vars.PERSISTENT_DIR }}/downloads:${{ vars.BUILD_DL_DIR }} | |
- ${{ vars.PERSISTENT_DIR }}/sstate-cache:${{ vars.BUILD_SSTATE_DIR }} | |
- ${{ vars.PERSISTENT_DIR }}/layers:${{ vars.BUILD_LAYERCACHE_DIR }} | |
- ${{ vars.PERSISTENT_DIR }}/assets:${{ vars.BUILD_ASSETS_DIR }} | |
options: --user ${{ vars.KAS_UID }}:${{ vars.KAS_GID }} | |
steps: | |
- name: enter build dir and build | |
env: | |
DL_DIR: ${{ vars.BUILD_DL_DIR}} | |
SSTATE_DIR: ${{ vars.BUILD_SSTATE_DIR}} | |
KAS_REPO_REF_DIR: ${{ vars.BUILD_LAYERCACHE_DIR}} | |
run: > | |
mkdir -p $BUILDDIR/${{ matrix.board }} && | |
cd $BUILDDIR/${{ matrix.board }} && | |
kas checkout ../../kas/${{ matrix.subpath }}/${{ matrix.board }}.yml && | |
if [ -f "${{ vars.BUILD_ASSETS_DIR }}/site.conf" ]; then | |
cp ${{ vars.BUILD_ASSETS_DIR }}/site.conf build/conf/site.conf; | |
fi && | |
kas build ../../kas/${{ matrix.subpath }}/${{ matrix.board }}.yml | |
- name: collect artifacts | |
env: | |
ARTIFACT_PATH: ${{ needs.prepare.outputs.artifact_path }} | |
run: > | |
echo "artifact_path: ${{ steps.artifact_path.outputs.artifact_path }}/$ARTIFACT_PATH" && | |
cp -fR $BUILDDIR/${{ matrix.board }}/build/tmp/deploy/images $ARTIFACT_PATH/images-${{ matrix.board }} | |