Update version #92
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 | |
on: | |
push: | |
branches: | |
- kirkstone | |
- scarthgap | |
workflow_dispatch: | |
pull_request: | |
types: [ labeled ] | |
env: | |
SSTATE_DIR: /data/yocto/sstate-cache | |
DL_DIR: /data/yocto/downloads | |
jobs: | |
approve: | |
name: Approve | |
environment: | |
name: ${{ github.event_name == 'pull_request' && 'test-pr' || 'test-branch' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Wait for approval | |
run: echo "Approved" | |
build: | |
name: Build ${{ matrix.project }} ${{ matrix.machine }} | |
if: | | |
github.event_name != 'pull_request' || | |
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci')) | |
needs: [approve] | |
runs-on: | |
- self-hosted | |
- Linux | |
- X64 | |
- offsite_yocto | |
strategy: | |
fail-fast: false | |
matrix: | |
project: | |
- tedge-rauc | |
- tedge-mender | |
machine: | |
- raspberrypi | |
- raspberrypi2 | |
# RaspberryPi 64 bit: 3b, 4, 5, zero2w, cm3, cm4, cm4s | |
# https://git.yoctoproject.org/meta-raspberrypi/tree/conf/machine/raspberrypi-armv8.conf?h=master | |
- raspberrypi-armv8 | |
include: | |
- project: tedge-rauc | |
image_name: core-image-tedge-rauc | |
image_ext: "wic.bz2" | |
update_ext: "raucb" | |
manifest_ext: "manifest" | |
- project: tedge-mender | |
image_name: core-image-tedge-mender | |
image_ext: "sdimg.bz2" | |
update_ext: "mender" | |
manifest_ext: "manifest" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Only install tooling if not running on a self-hosted runner as the tools are already pre-installed | |
- uses: taiki-e/install-action@just | |
if: ${{ !startsWith(runner.name, 'tedge') }} | |
- uses: actions/setup-python@v5 | |
if: ${{ !startsWith(runner.name, 'tedge') }} | |
with: | |
python-version: '3.8' | |
- run: pip3 install kas | |
if: ${{ !startsWith(runner.name, 'tedge') }} | |
- name: Build | |
run: just build-project projects/${{ matrix.project }}.yaml | |
working-directory: kas | |
env: | |
KAS_MACHINE: ${{ matrix.machine }} | |
# Delete any symlinks as this affects the artifact upload pattern | |
- name: Delete image symlinks | |
run: | | |
find "kas/build/tmp/deploy/images/${{ matrix.machine }}/" -type l -name "${{ matrix.image_name }}*" -delete | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.image_name }}_${{ matrix.machine }} | |
path: | | |
kas/build/tmp/deploy/images/${{ matrix.machine }}/${{ matrix.image_name }}*${{ matrix.machine }}*.${{ matrix.image_ext }} | |
kas/build/tmp/deploy/images/${{ matrix.machine }}/${{ matrix.image_name }}*${{ matrix.machine }}*.${{ matrix.update_ext }} | |
kas/build/tmp/deploy/images/${{ matrix.machine }}/${{ matrix.image_name }}*${{ matrix.machine }}*.${{ matrix.manifest_ext }} |