Skip to content

ON-15113: Simplify DKMS using pure mkdist tarball #385

ON-15113: Simplify DKMS using pure mkdist tarball

ON-15113: Simplify DKMS using pure mkdist tarball #385

# SPDX-License-Identifier: BSD-2-Clause
# X-SPDX-Copyright-Text: (c) Copyright 2023 Advanced Micro Devices, Inc.
name: "perform_developing_md_build"
on:
push:
pull_request:
types: [opened]
jobs:
perform_developing_md_build:
runs-on: ubuntu-latest
steps:
- name: onload_internal
uses: actions/checkout@v4
with:
path: onload_internal
- name: Install Onload Deps
run: |
sudo apt-get update
sudo apt-get install -y libcap-dev libmnl-dev python3 python3-pip
sudo pip3 install pytest pyroute2
- name: setup Env
run: |
echo "$GITHUB_WORKSPACE/onload_internal/scripts" >> $GITHUB_PATH
- name: mmake buildtrees
run: |
cd $GITHUB_WORKSPACE/onload_internal
mmakebuildtree --user
- name: build NDEBUG driver
run: |
make -C "$(mmaketool --toppath)" -j $(nproc) NDEBUG=1
- name: build NDEBUG user
run: |
make -C "$(mmaketool --toppath)/build/$(mmaketool --userbuild)" -j $(nproc) NDEBUG=1
- name: Remake mmake buildtrees
run: |
cd $GITHUB_WORKSPACE/onload_internal
rm -rf build
mmakebuildtree --user
- name: build DEBUG driver (cloud)
env:
TRANSPORT_CONFIG_OPT_HDR: ci/internal/transport_config_opt_cloud.h
run: |
make -C "$(mmaketool --toppath)" -j $(nproc)
- name: build DEBUG user (cloud)
id: cloud_build_user
env:
TRANSPORT_CONFIG_OPT_HDR: ci/internal/transport_config_opt_cloud.h
run: |
make -C "$(mmaketool --toppath)/build/$(mmaketool --userbuild)" -j $(nproc)
- name: Check ef_vi char interface version hash
run: |
cd "$(mmaketool --toppath)"
# Get the hard-coded hash
pattern="^ *if\( strcmp\(EFCH_INTF_VER, \"([0-9a-f]+)\"\) \) \{$"
comparison=$(grep -E "$pattern" "./src/lib/ciul/pt_endpoint.c")
fixed_hash=$(echo "$comparison" | sed -E -e "s/$pattern/\1/g")
echo "Found fixed version hash: \"$fixed_hash\""
# Get the auto-generated hash
generated_hash=$(
cat "./build/$(mmaketool --userbuild)/lib/ciul/efch_intf_ver.h" \
| sed -E -e "s/^#define +EFCH_INTF_VER +\"([0-9a-f]+)\"$/\1/g"
)
echo "Found generated version hash: \"$generated_hash\""
# Compare the hashes, and make sure they aren't the empty string
if [ -n "$fixed_hash" ] && [ "$fixed_hash" = "$generated_hash" ]; then
echo "Succesfully found version hashes, and confirmed they match!"
else
echo "Failed to find version hashes, or they don't match!"
echo "Audit the change to check for compat breakages."
echo "If compatible, then update the fixed hash in pt_endpoint.c"
exit 1
fi
- name: cplane unit tests
if: ${{ ! cancelled() && steps.cloud_build_user.conclusion == 'success' }}
run: |
cd $GITHUB_WORKSPACE/onload_internal/build/gnu_x86_64
{
echo "# Test Summary"
echo "## CPlane Unit Tests"
echo "\`\`\`"
} >> $GITHUB_STEP_SUMMARY
make -C tests/onload/cplane_unit test UNIT_TEST_OUTPUT=$GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
- name: cplane system tests
if: ${{ ! cancelled() && steps.cloud_build_user.conclusion == 'success' }}
run: |
cd $GITHUB_WORKSPACE/onload_internal/build/gnu_x86_64
{
echo "## CPlane System Tests"
echo "\`\`\`"
} >> $GITHUB_STEP_SUMMARY
make -C tests/onload/cplane_sysunit test UNIT_TEST_OUTPUT=$GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
- name: orm tests
if: ${{ ! cancelled() && steps.cloud_build_user.conclusion == 'success' }}
run: |
cd $GITHUB_WORKSPACE/onload_internal/build/gnu_x86_64
{
echo "## Onload Remote Monitor Unit Tests"
echo "\`\`\`"
} >> $GITHUB_STEP_SUMMARY
make -C tests/onload/onload_remote_monitor/internal_tests test UNIT_TEST_OUTPUT=$GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
- name: oof tests
if: ${{ ! cancelled() && steps.cloud_build_user.conclusion == 'success' }}
run: |
cd $GITHUB_WORKSPACE/onload_internal/build/gnu_x86_64
{
echo "## OOF Unit Tests"
echo "\`\`\`"
} >> $GITHUB_STEP_SUMMARY
make -C tests/onload/oof tests UNIT_TEST_OUTPUT=$GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY