Skip to content

vpp-verify-maketest #70

vpp-verify-maketest

vpp-verify-maketest #70

name: vpp-verify-maketest
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-maketest:
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=builder
- fdio:namespace=${{ needs.restore-gerrit-env.outputs.FDIO_NAMESPACE || 'prod' }}
- fdio:os=${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu2404', 'ubuntu2204', 'debian12']
executor_arch: ['x86_64', 'aarch64']
build_type: ['dbg', 'rel']
exclude:
# Exclude debian12 on aarch64 for all builds
- os: 'debian12'
executor_arch: 'aarch64'
# Exclude non-ubuntu2204 OS for debug builds
- build_type: 'dbg'
os: 'ubuntu2404'
- build_type: 'dbg'
os: 'debian12'
# Exclude aarch64 architecture for debug builds
- build_type: 'dbg'
executor_arch: 'aarch64'
env:
WORKSPACE: /scratch/docker-build/vpp
CCACHE_DIR: /scratch/ccache/${{ matrix.os }}-${{ matrix.executor_arch }}
MAKE_PARALLEL_JOBS: 16
TEST_JOBS: 16
TEST_RETRIES: 3
MAKE_TEST_OS: ${{ matrix.os == 'ubuntu2204' && 'ubuntu-22.04' || 'ubuntu-24.04' }}
MAKE_TEST_MULTIWORKER_OS: 'debian-12'
VPPAPIGEN_TEST_OS: ${{ matrix.os == 'ubuntu2204' && 'ubuntu-22.04' || 'ubuntu-24.04' }}
SHM_SIZE: ${{ matrix.executor_arch == 'aarch64' && '4096M' || '2048M' }}
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: Build VPP
# 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'] }}
TUI_LINE: ${{ env.TUI_LINE }}
- name: Setup Docker VPP Runtime Environment for 'make test'
# yamllint disable-line rule:line-length
uses: fdio/vpp/.github/actions/vpp-docker-runtime-setup@f9e0f384d665800c8e580da853e26558dd6d2668
with:
WORKSPACE: ${{ env.WORKSPACE }}
SHM_SIZE: ${{ env.SHM_SIZE }}
TUI_LINE: ${{ env.TUI_LINE }}
- name: VPP Make Test
# yamllint disable-line rule:line-length
uses: fdio/vpp/.github/actions/vpp-make-test@f9e0f384d665800c8e580da853e26558dd6d2668
timeout-minutes: 90
with:
WORKSPACE: ${{ env.WORKSPACE }}
TEST_JOBS: ${{ env.TEST_JOBS }}
TEST_RETRIES: ${{ env.TEST_RETRIES }}
MAKE_TEST_OS: ${{ env.MAKE_TEST_OS }}
MAKE_TEST_MULTIWORKER_OS: ${{ env.MAKE_TEST_MULTIWORKER_OS }}
VPPAPIGEN_TEST_OS: ${{ env.VPPAPIGEN_TEST_OS }}
TUI_LINE: ${{ env.TUI_LINE }}
- name: Report Success
if: success()
run: |
echo "VPP Verify Make Test passed for Gerrit Refspec: $GERRIT_REFSPEC, Gerrit Change URL: $GERRIT_CHANGE_URL"
echo "::notice::VPP Verify Make Test 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-maketest
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