Skip to content

vpp-verify-arm-drivers #15

vpp-verify-arm-drivers

vpp-verify-arm-drivers #15

name: vpp-verify-arm-drivers
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-arm-drivers:
name: ${{ github.workflow }}-master-rel-ubuntu2404-aarch64
if: ${{ github.event.workflow_run.conclusion == 'success' }}
needs: restore-gerrit-env
runs-on:
- self-hosted
- nomad
- fdio:arch=aarch64
- fdio:class=builder
- fdio:namespace=${{ needs.restore-gerrit-env.outputs.FDIO_NAMESPACE || 'prod' }}
- fdio:os=ubuntu2404
env:
WORKSPACE: /scratch/docker-build/vpp
CCACHE_DIR: /scratch/ccache/ubuntu2404-aarch64
MAKE_PARALLEL_JOBS: 16
GERRIT_BRANCH: ""
GERRIT_CHANGE_URL: ""
GERRIT_PROJECT: ""
GERRIT_REFSPEC: ""
GERRIT_CHANGE_NUMBER: ""
GERRIT_PATCHSET_NUMBER: ""
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
uses: fdio/vpp/.github/actions/vpp-install-deps@master
with:
WORKSPACE: ${{ env.WORKSPACE }}
TUI_LINE: ${{ env.TUI_LINE }}
- name: Install VPP external dependencies
uses: fdio/vpp/.github/actions/vpp-install-ext-deps@master
with:
WORKSPACE: ${{ env.WORKSPACE }}
TUI_LINE: ${{ env.TUI_LINE }}
- name: Build VPP ARM Drivers
run: |
set -euxo pipefail
cd $WORKSPACE
BUILD_RESULT="* SUCCESSFULLY COMPLETED"
BUILD_ERROR=""
RETVAL="0"
make_pkg_verify_arm_driver() {
vpp_platform="$1"
git clean -fdx || true
if ! make UNATTENDED=yes MAKE_PARALLEL_JOBS=${MAKE_PARALLEL_JOBS} pkg-verify VPP_PLATFORM="$vpp_platform"; then
BUILD_ERROR+="* FAILED 'make UNATTENDED=yes MAKE_PARALLEL_JOBS=${MAKE_PARALLEL_JOBS} pkg-verify VPP_PLATFORM=$vpp_platform'\n"
fi
}
make_pkg_verify_arm_driver cn913x
make_pkg_verify_arm_driver octeon9
make_pkg_verify_arm_driver octeon10
if [ -n "$BUILD_ERROR" ] ; then
BUILD_RESULT="$BUILD_ERROR"
RETVAL="1"
fi
echo -e "\n$TUI_LINE\n* VPP ${OS_ID^^}-${OS_VERSION_ID}-${OS_ARCH^^} ARM DRIVERS BUILD\n$BUILD_RESULT\n$TUI_LINE\n"
exit "$RETVAL"
- name: Report Success
if: success()
run: |
echo "VPP Verify ARM Drivers passed for Gerrit Refspec: $GERRIT_REFSPEC, Gerrit Change URL: $GERRIT_CHANGE_URL"
echo "::notice::VPP Verify ARM Drivers 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-arm-drivers
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