diff --git a/.github/workflows/hw-test.yml b/.github/workflows/hw-test.yml new file mode 100644 index 000000000000..adb912d24a22 --- /dev/null +++ b/.github/workflows/hw-test.yml @@ -0,0 +1,52 @@ +name: Hardware Test + +on: + workflow_call: + inputs: + test-set: + description: 'hw-test test set name, e.g. adsp/u-boot' + required: true + type: string + needs: + description: 'JSON array of hw-test needs, e.g. ["sc598", "ezkit"]' + required: false + type: string + default: '' + labgrid-target: + description: 'Optional explicit labgrid place, e.g. MUN-01-SC598_EZKIT-02' + required: false + type: string + default: '' + hw-test-ref: + description: 'analogdevicesinc/hw-test ref to check out' + required: false + type: string + default: 'main' + +permissions: + actions: read + contents: read + id-token: write + +jobs: + hardware-test: + runs-on: ${{ vars.RUNNER_HW_TEST != '' && fromJSON(vars.RUNNER_HW_TEST) || 'ubuntu-latest' }} + env: + LG_COORDINATOR: ${{ secrets.LG_COORDINATOR }} + + steps: + - name: Checkout hw-test + uses: actions/checkout@v6 + with: + repository: analogdevicesinc/hw-test + ref: ${{ inputs.hw-test-ref }} + + - name: Run hardware test (${{ inputs.test-set }}) + uses: ./run-test + with: + set: > + { + "name": "${{ inputs.test-set }}" + ${{ inputs.needs != '' && format(', "needs": {0}', inputs.needs) || '' }} + ${{ inputs.labgrid-target != '' && format(', "labgrid_target": "{0}"', inputs.labgrid-target) || '' }} + } diff --git a/.github/workflows/top-level.yml b/.github/workflows/top-level.yml index 2bcceb878c98..e016dd83c1c1 100644 --- a/.github/workflows/top-level.yml +++ b/.github/workflows/top-level.yml @@ -45,6 +45,26 @@ jobs: checks: uses: analogdevicesinc/u-boot/.github/workflows/checks.yml@ci + hardware-test: + needs: [build_arm, build_aarch64] + if: ${{ github.event_name != 'release' }} + strategy: + fail-fast: false + matrix: + include: + - needs: '["sc598", "ezkit"]' + - needs: '["sc598", "ezlite"]' + - needs: '["sc846", "ezkit"]' + uses: ./.github/workflows/hw-test.yml + with: + test-set: 'adsp/u-boot' + needs: ${{ matrix.needs }} + secrets: inherit + permissions: + actions: read + contents: read + id-token: write + deploy_cloudsmith: needs: [build_arm, build_aarch64, checks] if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' }}