From 1809f27f102132b8248e7378230bfa6200c49982 Mon Sep 17 00:00:00 2001 From: Sergei Lukianov Date: Thu, 17 Jul 2025 18:31:16 -0700 Subject: [PATCH] ci: add optional vlab job Signed-off-by: Sergei Lukianov --- .github/workflows/build.yml | 51 ++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 189c88f..c7e85c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,6 +79,7 @@ jobs: - uses: "actions/checkout@v4" with: + # make sure to update the vlab prebuild script if changing it ref: ${{ github.event.pull_request.head.sha }} - name: "install nix" @@ -200,6 +201,48 @@ jobs: with: limit-access-to-actor: true + vlab: + needs: + - run + + name: "${{ matrix.hybrid && 'hlab' || 'vlab' }}-${{ matrix.fabricmode == 'spine-leaf' && 'sl' || 'cc' }}-${{ matrix.gateway && 'gw-' || '' }}${{ matrix.includeonie && 'onie-' || '' }}${{ matrix.buildmode }}-${{ matrix.vpcmode }}" + + uses: githedgehog/fabricator/.github/workflows/run-vlab.yaml@master + with: + skip: ${{ matrix.hybrid && !contains(github.event.pull_request.labels.*.name, 'ci:+hlab') || !matrix.hybrid && !contains(github.event.pull_request.labels.*.name, 'ci:+vlab') }} + fabricatorref: master + prebuild: "just bump frr ${{ github.event.pull_request.head.sha }}.debug" + fabricmode: ${{ matrix.fabricmode }} + gateway: ${{ matrix.gateway }} + includeonie: ${{ matrix.includeonie }} + buildmode: ${{ matrix.buildmode }} + vpcmode: ${{ matrix.vpcmode }} + releasetest: ${{ contains(github.event.pull_request.labels.*.name, 'ci:+release') }} + hybrid: ${{ matrix.hybrid }} + + strategy: + fail-fast: false + matrix: + fabricmode: + - spine-leaf + gateway: + - true + includeonie: + - false + buildmode: + - iso + vpcmode: + - l2vni + - l3vni + hybrid: + - false + include: + - fabricmode: spine-leaf + gateway: true + includeonie: false + buildmode: iso + vpcmode: l2vni + hybrid: true summary: name: "summary" @@ -208,9 +251,15 @@ jobs: - "ubuntu-latest" needs: - run + - vlab steps: - name: "Flag any build matrix failures" - if: ${{ needs.run.result != 'success' }} + if: ${{ needs.run.result != 'success' && needs.run.result != 'skipped' }} + run: | + >&2 echo "A critical step failed!" + exit 1 + - name: "Flag any vlab matrix failures" + if: ${{ needs.vlab.result != 'success' && needs.vlab.result != 'skipped' }} run: | >&2 echo "A critical step failed!" exit 1