-
Notifications
You must be signed in to change notification settings - Fork 510
Try to reenable the DPDK PTF Testgen workflow. #5572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
fruffy
wants to merge
12
commits into
main
Choose a base branch
from
fruffy/reenable_dpdk_ptf_tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c2e74b1
Try to reenable the DPDK PTF Testgen workflow.
fruffy 1aff337
Try some fixes.
fruffy bc0a34e
Remove non-dpdk pna P4 programs.
fruffy a96722a
Workarounds.
fruffy 21f7805
More fixes in the runner script.
fruffy 9becca2
API compatibility.
fruffy 0af0a2b
Use UV.
fruffy c99e96f
Runner.
fruffy 7fb10e8
Error handling and pin deps.
fruffy a3fda74
Cleanups.
fruffy bf299d8
Xfails.
fruffy 66a2574
Potential fix for code scanning alert no. 24: Workflow does not conta…
fruffy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| name: "p4c-dpdk-ptf-p4testgen-tests" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| merge_group: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| # Cancel any preceding run on the pull request. | ||
| concurrency: | ||
| group: p4c-dpdk-ptf-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
|
||
| # Envs for infrap4d and dpdk libs. | ||
| # IPDK_INSTALL_DIR is set to a default search directory for | ||
| # visibility of different libs like libprotobuf. | ||
| env: | ||
| IPDK_INSTALL_DIR: ${{ github.workspace }}/ipdk_install | ||
| DEPS_REPOSITORY: ipdk-io/stratum-deps | ||
| DEPS_TAG: v1.3.5 | ||
| DEPS_FILENAME: deps-ubuntu-22.04-1.3.5-x86_64.tar.gz | ||
| DEPS_INSTALL_DIR: /opt/p4dev/x86deps | ||
| CMAKE_UNITY_BUILD: ON | ||
| ENABLE_TEST_TOOLS: ON | ||
| ENABLE_DPDK: ON | ||
| ENABLE_BMV2: OFF | ||
| ENABLE_EBPF: OFF | ||
| IMAGE_TYPE: test | ||
| CTEST_PARALLEL_LEVEL: 4 | ||
| BUILD_GENERATOR: Ninja | ||
|
|
||
| jobs: | ||
| build-p4dpdk-ubuntu: | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: ccache | ||
| uses: hendrikmuhs/ccache-action@v1 | ||
| with: | ||
| key: ptf-${{ runner.os }}-test | ||
| max-size: 1000M | ||
|
|
||
| - name: Checkout DPDK target | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| repository: p4lang/p4-dpdk-target | ||
| ref: 1604e1829dcc613067cda6dd26a8a784fb804bd7 | ||
| path: p4sde | ||
| submodules: recursive | ||
|
|
||
| - name: Checkout ipdk-recipe | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| repository: ipdk-io/networking-recipe | ||
| ref: cd584d4acccc49e9577fde2bfcdf16522577ac22 | ||
| path: ipdk.recipe | ||
| submodules: recursive | ||
|
|
||
| - name: Checkout P4C | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| path: p4c | ||
| submodules: recursive | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Install hugepages and set transparent hugepages to madvise | ||
| run: | | ||
| sudo apt-get update -y | ||
| sudo apt-get install -y libhugetlbfs-bin | ||
| sudo hugeadm --thp-madvise | ||
|
|
||
| - name: Install DPDK dependencies | ||
| working-directory: p4sde/tools/setup | ||
| run: | | ||
| sudo apt-get update -y | ||
| python3 install_dep.py | ||
|
|
||
| - name: Compile p4sde dpdk target | ||
| working-directory: p4sde | ||
| run: | | ||
| ./autogen.sh | ||
| ./configure --prefix="$IPDK_INSTALL_DIR" | ||
| make | ||
| make install | ||
|
|
||
| - name: Install infrap4d build prerequisites | ||
| working-directory: ipdk.recipe | ||
| run: | | ||
| sudo apt-get update -y | ||
| sudo apt-get install -y libatomic1 libbsd-dev libnl-3-dev libnl-route-3-dev libnl-genl-3-dev openssl | ||
| python3 -m pip install -r requirements.txt | ||
|
|
||
| - name: Install stratum dependencies | ||
| uses: robinraju/release-downloader@v1.12 | ||
| with: | ||
| repository: ${{ env.DEPS_REPOSITORY }} | ||
| tag: ${{ env.DEPS_TAG }} | ||
| fileName: ${{ env.DEPS_FILENAME }} | ||
|
|
||
| - name: Extract stratum dependencies | ||
| run: | | ||
| sudo tar -xzf "$DEPS_FILENAME" -C / | ||
| rm "$DEPS_FILENAME" | ||
|
|
||
| - name: Build infrap4d | ||
| working-directory: ipdk.recipe | ||
| run: | | ||
| ./make-all.sh --target=dpdk --no-krnlmon --no-ovs -S "$IPDK_INSTALL_DIR" -D "$DEPS_INSTALL_DIR" --prefix="$IPDK_INSTALL_DIR" | ||
|
|
||
| - name: Build P4C with only the DPDK backend | ||
| working-directory: p4c | ||
| run: | | ||
| export CMAKE_FLAGS+="-DENABLE_BMV2=OFF " | ||
| export CMAKE_FLAGS+="-DENABLE_EBPF=OFF " | ||
| export CMAKE_FLAGS+="-DENABLE_UBPF=OFF " | ||
| export CMAKE_FLAGS+="-DENABLE_GTESTS=OFF " | ||
| export CMAKE_FLAGS+="-DENABLE_P4TEST=OFF " | ||
| export CMAKE_FLAGS+="-DENABLE_P4TC=OFF " | ||
| export CMAKE_FLAGS+="-DENABLE_P4C_GRAPHS=OFF " | ||
| export CMAKE_FLAGS+="-DENABLE_TEST_TOOLS=ON " | ||
| export CMAKE_FLAGS+="-DIPDK_INSTALL_DIR=$IPDK_INSTALL_DIR " | ||
| tools/ci-build.sh | ||
|
|
||
| - name: Run DPDK PTF tests using P4Testgen | ||
| working-directory: p4c/build | ||
| run: | | ||
| sudo "$IPDK_INSTALL_DIR"/sbin/set_hugepages.sh | ||
| sudo -E env PATH="$PATH" uv run ctest -j1 --output-on-failure --schedule-random -R "testgen-p4c-pna-ptf|dpdk-ptf" | ||
113 changes: 0 additions & 113 deletions
113
.github/workflows/disabled/ci-dpdk-ptf-p4testgen-tests.yml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.