From 97bb1564e56f96ce3605fcf1dbba79be1f1aa3ba Mon Sep 17 00:00:00 2001 From: abmantis Date: Thu, 6 Aug 2026 18:27:09 +0100 Subject: [PATCH] Pass images as input --- .github/workflows/builder.yml | 21 ++++++------------ .github/workflows/e2e-tests.yml | 39 +++++++++++++-------------------- 2 files changed, 22 insertions(+), 38 deletions(-) diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index de0c0c2d30cd..796753bbd8eb 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -16,6 +16,10 @@ env: # Base image version from https://github.com/home-assistant/docker BASE_IMAGE_VERSION: "2026.07.0" ARCHITECTURES: '["amd64", "aarch64"]' + MACHINES: >- + ["generic-x86-64", "khadas-vim3", "odroid-c2", "odroid-c4", "odroid-m1", + "odroid-n2", "qemuarm-64", "qemux86-64", "raspberrypi3-64", + "raspberrypi4-64", "raspberrypi5-64", "yellow", "green"] permissions: {} @@ -35,6 +39,7 @@ jobs: channel: ${{ steps.version.outputs.channel }} publish: ${{ steps.version.outputs.publish }} architectures: ${{ env.ARCHITECTURES }} + machines: ${{ env.MACHINES }} base_image_version: ${{ env.BASE_IMAGE_VERSION }} steps: - name: Checkout the repository @@ -218,20 +223,7 @@ jobs: id-token: write # For cosign signing strategy: matrix: - machine: - - generic-x86-64 - - khadas-vim3 - - odroid-c2 - - odroid-c4 - - odroid-m1 - - odroid-n2 - - qemuarm-64 - - qemux86-64 - - raspberrypi3-64 - - raspberrypi4-64 - - raspberrypi5-64 - - yellow - - green + machine: ${{ fromJson(needs.init.outputs.machines) }} include: # Default: aarch64 on native ARM runner - arch: aarch64 @@ -289,6 +281,7 @@ jobs: uses: ./.github/workflows/e2e-tests.yml with: version: ${{ needs.init.outputs.version }} + images: ${{ needs.init.outputs.machines }} publish_ha: name: Publish version files diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index d8394d420881..67aad992c6e0 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -8,12 +8,24 @@ on: description: "Image tag to test (e.g. dev, 2026.7.1, 2026.8.0b0)" default: "dev" required: true + images: + description: "JSON array of machine images to test" + default: >- + ["generic-x86-64", "khadas-vim3", "odroid-c2", "odroid-c4", + "odroid-m1", "odroid-n2", "qemuarm-64", "qemux86-64", + "raspberrypi3-64", "raspberrypi4-64", "raspberrypi5-64", + "yellow", "green"] + required: true workflow_call: inputs: version: description: "Image tag to test (e.g. dev, 2026.7.1, 2026.8.0b0)" required: true type: string + images: + description: "JSON array of machine images to test" + required: true + type: string permissions: {} @@ -25,34 +37,13 @@ jobs: boot_check: name: Boot check ${{ matrix.machine }} image if: github.repository_owner == 'home-assistant' - runs-on: ${{ matrix.runs-on }} + # amd64 machines need an x86 runner; all others are aarch64 + runs-on: ${{ contains(fromJson('["generic-x86-64", "qemux86-64"]'), matrix.machine) && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} timeout-minutes: 20 strategy: fail-fast: false matrix: - # Keep in sync with the build_machine matrix in builder.yml - machine: - - generic-x86-64 - - khadas-vim3 - - odroid-c2 - - odroid-c4 - - odroid-m1 - - odroid-n2 - - qemuarm-64 - - qemux86-64 - - raspberrypi3-64 - - raspberrypi4-64 - - raspberrypi5-64 - - yellow - - green - include: - # Default: aarch64 on native ARM runner - - runs-on: ubuntu-24.04-arm - # Overrides for amd64 machines - - machine: generic-x86-64 - runs-on: ubuntu-24.04 - - machine: qemux86-64 - runs-on: ubuntu-24.04 + machine: ${{ fromJson(inputs.images) }} env: BASE_URL: http://localhost:8123 services: