vpp-verify-hst #7
This file contains hidden or 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: vpp-verify-hst | |
| on: | |
| workflow_run: | |
| workflows: ["vpp-verify-checkstyle"] | |
| types: | |
| - completed | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: read | |
| actions: read | |
| concurrency: | |
| group: required-${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}-${{ github.event.workflow_run.id }} | |
| cancel-in-progress: true | |
| jobs: | |
| restore-gerrit-env: | |
| name: Restore VPP Gerrit Environment Variables | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: ubuntu-latest | |
| outputs: | |
| GERRIT_BRANCH: ${{ steps.export-gerrit-env.outputs.GERRIT_BRANCH }} | |
| GERRIT_CHANGE_URL: ${{ steps.export-gerrit-env.outputs.GERRIT_CHANGE_URL }} | |
| GERRIT_PROJECT: ${{ steps.export-gerrit-env.outputs.GERRIT_PROJECT }} | |
| GERRIT_REFSPEC: ${{ steps.export-gerrit-env.outputs.GERRIT_REFSPEC }} | |
| GERRIT_CHANGE_NUMBER: ${{ steps.export-gerrit-env.outputs.GERRIT_CHANGE_NUMBER }} | |
| GERRIT_PATCHSET_NUMBER: ${{ steps.export-gerrit-env.outputs.GERRIT_PATCHSET_NUMBER }} | |
| FDIO_NAMESPACE: ${{ steps.export-gerrit-env.outputs.FDIO_NAMESPACE }} | |
| steps: | |
| - name: Restore VPP Gerrit Environment Variables | |
| id: restore-gerrit-env | |
| # yamllint disable-line rule:line-length | |
| uses: fdio/.github/.github/actions/gerrit-env-vars-restore@a28ad9abc70855292df1ea0d59829e814e78c2f4 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Export Gerrit Environment Variables | |
| id: export-gerrit-env | |
| run: | | |
| { | |
| echo "GERRIT_BRANCH=${GERRIT_BRANCH}" | |
| echo "GERRIT_CHANGE_URL=${GERRIT_CHANGE_URL}" | |
| echo "GERRIT_PROJECT=${GERRIT_PROJECT}" | |
| echo "GERRIT_REFSPEC=${GERRIT_REFSPEC}" | |
| echo "GERRIT_CHANGE_NUMBER=${GERRIT_CHANGE_NUMBER}" | |
| echo "GERRIT_PATCHSET_NUMBER=${GERRIT_PATCHSET_NUMBER}" | |
| echo "FDIO_NAMESPACE=${FDIO_NAMESPACE}" | |
| } >> "$GITHUB_OUTPUT" | |
| verify-hst: | |
| name: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}-${{ matrix.build_type }}-${{ matrix.os }}-${{ matrix.executor_arch }} | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| needs: restore-gerrit-env | |
| runs-on: | |
| - self-hosted | |
| - nomad | |
| - fdio:arch=${{ matrix.executor_arch }} | |
| - fdio:class=hst | |
| - fdio:namespace=dev | |
| - fdio:os=${{ matrix.os }} | |
| # TODO: modify the self-hosted agent to ensure hst class workflows are placed on nomad clients | |
| # one at a time or on a per numa node basis to avoid resource contention | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ['ubuntu2404', 'ubuntu2204'] | |
| executor_arch: ['x86_64', 'aarch64'] | |
| build_type: ['dbg', 'rel'] | |
| exclude: | |
| # Exclude all ubuntu2404 on aarch64 | |
| - os: 'ubuntu2404' | |
| executor_arch: 'aarch64' | |
| # Exclude all release builds on ubuntu2404 | |
| - os: 'ubuntu2404' | |
| build_type: 'rel' | |
| # Exclude release builds on aarch64 (ubuntu2204 only, since ubuntu2404+aarch64 already excluded) | |
| - os: 'ubuntu2204' | |
| executor_arch: 'aarch64' | |
| build_type: 'rel' | |
| env: | |
| WORKSPACE: /scratch/docker-build/vpp | |
| HS_TEST_DIR: /scratch/docker-build/vpp/test-c/hs-test | |
| CCACHE_DIR: /scratch/ccache/${{ matrix.os }}-${{ matrix.executor_arch }} | |
| MAKE_PARALLEL_JOBS: 16 | |
| TEST_JOBS: 16 | |
| GERRIT_BRANCH: ${{ needs.restore-gerrit-env.outputs.GERRIT_BRANCH }} | |
| GERRIT_CHANGE_URL: ${{ needs.restore-gerrit-env.outputs.GERRIT_CHANGE_URL }} | |
| GERRIT_PROJECT: ${{ needs.restore-gerrit-env.outputs.GERRIT_PROJECT }} | |
| GERRIT_REFSPEC: ${{ needs.restore-gerrit-env.outputs.GERRIT_REFSPEC }} | |
| GERRIT_CHANGE_NUMBER: ${{ needs.restore-gerrit-env.outputs.GERRIT_CHANGE_NUMBER }} | |
| GERRIT_PATCHSET_NUMBER: ${{ needs.restore-gerrit-env.outputs.GERRIT_PATCHSET_NUMBER }} | |
| FDIO_NAMESPACE: ${{ needs.restore-gerrit-env.outputs.FDIO_NAMESPACE }} | |
| TUI_LINE: "*******************************************************************" | |
| steps: | |
| - name: Actions Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Environment | |
| # yamllint disable-line rule:line-length | |
| uses: fdio/.github/.github/actions/setup-executor-env@b728d1589228e2891a4241a1bba362d76895c225 | |
| - name: Show Nomad Dockerfile | |
| # yamllint disable-line rule:line-length | |
| uses: fdio/.github/.github/actions/show-nomad-dockerfile@b728d1589228e2891a4241a1bba362d76895c225 | |
| - name: Checkout VPP Gerrit Change | |
| # yamllint disable-line rule:line-length | |
| uses: fdio/vpp/.github/actions/vpp-checkout-gerrit-change@3cadd680be3814d9737a341c0b563f3441157a7c | |
| with: | |
| WORKSPACE: ${{ env.WORKSPACE }} | |
| GERRIT_BRANCH: ${{ env.GERRIT_BRANCH }} | |
| GERRIT_REFSPEC: ${{ env.GERRIT_REFSPEC }} | |
| TUI_LINE: ${{ env.TUI_LINE }} | |
| - name: Install VPP dependencies | |
| # yamllint disable-line rule:line-length | |
| uses: fdio/vpp/.github/actions/vpp-install-deps@f9e0f384d665800c8e580da853e26558dd6d2668 | |
| with: | |
| WORKSPACE: ${{ env.WORKSPACE }} | |
| TUI_LINE: ${{ env.TUI_LINE }} | |
| - name: Install VPP external dependencies | |
| # yamllint disable-line rule:line-length | |
| uses: fdio/vpp/.github/actions/vpp-install-ext-deps@f9e0f384d665800c8e580da853e26558dd6d2668 | |
| with: | |
| WORKSPACE: ${{ env.WORKSPACE }} | |
| TUI_LINE: ${{ env.TUI_LINE }} | |
| - name: HST VPP Build | |
| # yamllint disable-line rule:line-length | |
| uses: fdio/vpp/.github/actions/vpp-build@f9e0f384d665800c8e580da853e26558dd6d2668 | |
| with: | |
| WORKSPACE: ${{ env.WORKSPACE }} | |
| MAKE_PARALLEL_JOBS: ${{ env.MAKE_PARALLEL_JOBS }} | |
| BUILD_TYPE: ${{ matrix['build_type'] }} | |
| BUILD_HST: 'true' | |
| TUI_LINE: ${{ env.TUI_LINE }} | |
| - name: Start Docker Daemon | |
| uses: fdio/vpp/.github/actions/vpp-start-docker@f9e0f384d665800c8e580da853e26558dd6d2668 | |
| with: | |
| START_DOCKER_SCRIPT: start-docker.sh | |
| TUI_LINE: ${{ env.TUI_LINE }} | |
| - name: HST Test VPP | |
| if: success() | |
| uses: fdio/vpp/.github/actions/vpp-hst-test@f9e0f384d665800c8e580da853e26558dd6d2668 | |
| timeout-minutes: 90 | |
| with: | |
| WORKSPACE: ${{ env.WORKSPACE }} | |
| BUILD_TYPE: ${{ matrix['build_type'] }} | |
| HS_TEST_DIR: ${{ env.HS_TEST_DIR }} | |
| TEST_JOBS: ${{ env.TEST_JOBS }} | |
| TUI_LINE: ${{ env.TUI_LINE }} | |
| - name: Report Success | |
| if: success() | |
| run: | | |
| echo "VPP Verify HST passed for Gerrit Refspec: $GERRIT_REFSPEC, Gerrit Change URL: $GERRIT_CHANGE_URL" | |
| echo "::notice::VPP Verify HST workflow completed successfully! Workflow ID: ${{ github.run_id }}, Name: ${{ github.workflow }}, Branch: $GERRIT_BRANCH, Change: $GERRIT_CHANGE_NUMBER, Patchset: $GERRIT_PATCHSET_NUMBER" | |
| vote: | |
| if: ${{ always() }} | |
| needs: | |
| - restore-gerrit-env | |
| - verify-hst | |
| runs-on: ubuntu-latest | |
| env: | |
| GERRIT_CHANGE_NUMBER: ${{ needs.restore-gerrit-env.outputs.GERRIT_CHANGE_NUMBER }} | |
| GERRIT_PATCHSET_NUMBER: ${{ needs.restore-gerrit-env.outputs.GERRIT_PATCHSET_NUMBER }} | |
| steps: | |
| - name: Get conclusion | |
| uses: im-open/workflow-conclusion@e4f7c4980600fbe0818173e30931d3550801b992 # v2.2.3 | |
| - name: Set vote | |
| # yamllint disable-line rule:line-length | |
| uses: lfreleng-actions/gerrit-review-action@537251ec667665b386f70b330b05446e3fc29087 # v0.9 | |
| with: | |
| host: ${{ vars.GERRIT_SERVER }} | |
| username: ${{ vars.GERRIT_SSH_USER }} | |
| key: ${{ secrets.GERRIT_SSH_PRIVKEY }} | |
| known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }} | |
| gerrit-change-number: ${{ env.GERRIT_CHANGE_NUMBER }} | |
| gerrit-patchset-number: ${{ env.GERRIT_PATCHSET_NUMBER }} | |
| vote-type: ${{ env.WORKFLOW_CONCLUSION }} | |
| comment-only: true # Do not add vote to gerrit change |