-
Notifications
You must be signed in to change notification settings - Fork 6
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
Implement dpdk_build_check #72
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
268d0ed
Implement dpdk_build_check
ffoulkes 077bdf9
Build from networking-recipe
ffoulkes f073d82
Fix error in working-directory
ffoulkes 6f1d5aa
Disable OVS
ffoulkes 1f3e193
Fetch krnlmon and SAI submodules
ffoulkes 195da0e
Just do a recursive checkout
ffoulkes 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 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 |
---|---|---|
|
@@ -31,65 +31,93 @@ env: | |
|
||
jobs: | ||
#--------------------------------------------------------------------- | ||
# check_krnlmon_dpdk | ||
# 1 - dpdk_build_check | ||
#--------------------------------------------------------------------- | ||
check_krnlmon_dpdk: | ||
dpdk_build_check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out krnlmon repository | ||
- name: Check out networking-recipe | ||
uses: actions/checkout@v3 | ||
with: | ||
path: krnlmon | ||
repository: ipdk-io/networking-recipe | ||
submodules: recursive | ||
path: recipe | ||
|
||
- name: Check out SAI repository | ||
uses: actions/checkout@v3 | ||
- name: Install dpdk-sde | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: opencomputeproject/SAI | ||
path: SAI | ||
repository: ${{ env.SDE_REPOSITORY }} | ||
tag: ${{ env.SDE_TAG }} | ||
fileName: ${{ env.SDE_FILENAME }} | ||
- run: | | ||
sudo tar -xzf $SDE_FILENAME -C / | ||
rm $SDE_FILENAME | ||
|
||
- name: Check out networking-recipe | ||
uses: actions/checkout@v3 | ||
- name: Install stratum-deps | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: ipdk-io/networking-recipe | ||
path: recipe | ||
repository: ${{ env.DEPS_REPOSITORY }} | ||
tag: ${{ env.DEPS_TAG }} | ||
fileName: ${{ env.DEPS_FILENAME }} | ||
- run: | | ||
sudo tar -xzf $DEPS_FILENAME -C / | ||
rm $DEPS_FILENAME | ||
|
||
- name: Install prerequisites | ||
run: | | ||
sudo apt install $PREREQS | ||
|
||
- name: Install DPDK SDE | ||
- name: Build krnlmon | ||
working-directory: recipe | ||
run: | | ||
export DEPEND_INSTALL=$DEPS_INSTALL_DIR | ||
export SDE_INSTALL=$SDE_INSTALL_DIR | ||
./make-all.sh --target=dpdk --rpath --no-ovs --no-build | ||
cmake --build build -j4 --target krnlmon | ||
|
||
#--------------------------------------------------------------------- | ||
# 2 - dpdk_unit_tests | ||
#--------------------------------------------------------------------- | ||
dpdk_unit_tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out networking-recipe | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ipdk-io/networking-recipe | ||
submodules: recursive | ||
path: recipe | ||
|
||
- name: Install dpdk-sde | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: ${{ env.SDE_REPOSITORY }} | ||
tag: ${{ env.SDE_TAG }} | ||
fileName: ${{ env.SDE_FILENAME }} | ||
|
||
- run: | | ||
sudo tar -xzf $SDE_FILENAME -C / | ||
rm $SDE_FILENAME | ||
|
||
- name: Install stratum dependencies | ||
- name: Install stratum-deps | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: ${{ env.DEPS_REPOSITORY }} | ||
tag: ${{ env.DEPS_TAG }} | ||
fileName: ${{ env.DEPS_FILENAME }} | ||
|
||
- run: | | ||
sudo tar -xzf $DEPS_FILENAME -C / | ||
rm $DEPS_FILENAME | ||
|
||
- name: Create pipeline.cmake file | ||
working-directory: krnlmon | ||
- name: Install prerequisites | ||
run: | | ||
echo "set(CMAKE_MODULE_PATH \"$GITHUB_WORKSPACE/recipe/cmake\" CACHE PATH \"\")" > pipeline.cmake | ||
echo "set(SAI_SOURCE_DIR \"$GITHUB_WORKSPACE/SAI\" CACHE PATH \"\")" >> pipeline.cmake | ||
sudo apt install $PREREQS | ||
|
||
- name: Run unit tests | ||
working-directory: krnlmon | ||
- name: Run dpdk unit tests | ||
working-directory: recipe | ||
run: | | ||
export DEPEND_INSTALL=$DEPS_INSTALL_DIR | ||
export SDE_INSTALL=$SDE_INSTALL_DIR | ||
cmake -S . -B build -C pipeline.cmake -DTDI_TARGET=DPDK | ||
./make-all.sh --target=dpdk --no-ovs --no-build | ||
cmake --build build --target krnlmon-test |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--target krnlmon
?What does this mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It instructs cmake to build the
krnlmon
target. It's the equivalent ofmake -C build krnlmon
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didnt realize krnlmon target was supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're just full of surprises. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since krnlmon is treated as separate target, is krnlmon a separate process and not a thread anymore? Do we need to start krnlmon separately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow just checks to see if krnlmon compiles okay. The output is a library (libkrnlmon). The result is not runnable.
The workflow runs when a PR is created against the krnlmon repository. Anything we do here should be largely independent of networking-recipe. (There's a weakness here, in that krnlmon depends on several include files in networking-recipe/cmake. I'm crossing my fingers that this does not become an issue. I should probably move them to a separate repository and include it as a submodule, but I've been reluctant to do so for so few files.)
Krnlmon has very few dependencies, so the process completes in ~30 seconds. We want our build checks to be fast.