|
| 1 | +# Copyright (C) 2024 Intel Corporation |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +name: Weekly test all examples on multiple HWs |
| 5 | + |
| 6 | +on: |
| 7 | + schedule: |
| 8 | + - cron: "30 2 * * 6" # UTC time |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | +env: |
| 12 | + EXAMPLES: ${{ vars.NIGHTLY_RELEASE_EXAMPLES }} |
| 13 | + NODES: "gaudi,xeon,rocm,arc" |
| 14 | + |
| 15 | +jobs: |
| 16 | + get-test-matrix: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + outputs: |
| 19 | + examples: ${{ steps.get-matrix.outputs.examples }} |
| 20 | + nodes: ${{ steps.get-matrix.outputs.nodes }} |
| 21 | + steps: |
| 22 | + - name: Create Matrix |
| 23 | + id: get-matrix |
| 24 | + run: | |
| 25 | + examples=($(echo ${EXAMPLES} | tr ',' ' ')) |
| 26 | + examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.') |
| 27 | + echo "examples=$examples_json" >> $GITHUB_OUTPUT |
| 28 | + nodes=($(echo ${NODES} | tr ',' ' ')) |
| 29 | + nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.') |
| 30 | + echo "nodes=$nodes_json" >> $GITHUB_OUTPUT |
| 31 | +
|
| 32 | + build-comps-base: |
| 33 | + needs: [get-test-matrix] |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }} |
| 37 | + uses: ./.github/workflows/_build_comps_base_image.yml |
| 38 | + with: |
| 39 | + node: ${{ matrix.node }} |
| 40 | + |
| 41 | + run-examples: |
| 42 | + needs: [get-test-matrix, build-comps-base] |
| 43 | + strategy: |
| 44 | + matrix: |
| 45 | + example: ${{ fromJson(needs.get-test-matrix.outputs.examples) }} |
| 46 | + node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }} |
| 47 | + fail-fast: false |
| 48 | + uses: ./.github/workflows/_example-workflow.yml |
| 49 | + with: |
| 50 | + node: ${{ matrix.node }} |
| 51 | + example: ${{ matrix.example }} |
| 52 | + build: true |
| 53 | + test_compose: true |
| 54 | + test_helmchart: true |
| 55 | + secrets: inherit |
0 commit comments