Skip to content

Commit 612ec88

Browse files
committed
[CI] Add RDMA (Soft-RoCE) GitHub Action for ibverbs testing
1 parent eec1eda commit 612ec88

1 file changed

Lines changed: 99 additions & 0 deletions

File tree

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: RDMA (Soft-RoCE)
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
workflow_call:
9+
workflow_dispatch:
10+
11+
env:
12+
ccache: ON
13+
14+
jobs:
15+
rdma_soft_roce:
16+
strategy:
17+
matrix:
18+
mode: [ Debug, Release ]
19+
compiler:
20+
- { cc: gcc, cxx: g++ }
21+
- { cc: clang, cxx: clang++ }
22+
runs-on: ubuntu-24.04
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Install Dependencies
29+
run: |
30+
sudo apt-get update
31+
# Install rdma_rxe kernel module (Azure kernel ships it in linux-modules-extra)
32+
sudo apt-get install -y linux-modules-extra-$(uname -r)
33+
sudo apt-get install -y libibverbs-dev librdmacm-dev rdma-core ibverbs-utils iproute2 perftest
34+
35+
- name: Setup Soft-RoCE
36+
run: |
37+
set -e
38+
39+
# Check available RDMA kernel modules
40+
echo "=== Kernel: $(uname -r) ==="
41+
find /lib/modules/$(uname -r)/kernel/drivers/infiniband -name "*.ko*" 2>/dev/null || true
42+
43+
# Load required kernel modules
44+
sudo modprobe ib_core
45+
sudo modprobe ib_uverbs
46+
sudo modprobe rdma_ucm
47+
sudo modprobe rdma_rxe
48+
49+
# Find the default network interface
50+
DEFAULT_IFACE=$(ip -o -4 route show to default | awk '{print $5}' | head -n1)
51+
echo "Using network interface: ${DEFAULT_IFACE}"
52+
53+
# Create a Soft-RoCE device on the default interface
54+
sudo rdma link add rxe0 type rxe netdev ${DEFAULT_IFACE}
55+
56+
# Verify the RDMA device is created
57+
echo "=== RDMA links ==="
58+
rdma link show
59+
echo "=== RDMA devices ==="
60+
ibv_devices
61+
echo "=== RDMA device info ==="
62+
ibv_devinfo
63+
64+
- name: Install ninja-build tool
65+
uses: seanmiddleditch/gha-setup-ninja@master
66+
67+
- name: ccache
68+
uses: hendrikmuhs/ccache-action@v1.2
69+
with:
70+
key: ${{ github.job }}-${{ matrix.compiler.cc }}-${{ matrix.mode }}
71+
72+
- name: Configure
73+
run: |
74+
cmake -B ${{github.workspace}}/build -G Ninja \
75+
-DCMAKE_C_COMPILER=${{matrix.compiler.cc}} \
76+
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} \
77+
-DCMAKE_BUILD_TYPE=${{matrix.mode}} \
78+
-DYLT_ENABLE_IBV=ON \
79+
-DUSE_CCACHE=${{env.ccache}} \
80+
-DBUILD_STRUCT_JSON=OFF \
81+
-DBUILD_STRUCT_XML=OFF \
82+
-DBUILD_STRUCT_PACK=OFF \
83+
-DBUILD_STRUCT_YAML=OFF \
84+
-DBUILD_UTIL=OFF
85+
86+
- name: Build
87+
run: cmake --build ${{github.workspace}}/build --config ${{matrix.mode}}
88+
89+
- name: Test coro_io ibverbs
90+
working-directory: ${{github.workspace}}/build
91+
run: ctest -C ${{matrix.mode}} -j 1 -V -R "ibverbs_test"
92+
93+
- name: Test coro_io ibverbs pressure
94+
working-directory: ${{github.workspace}}/build
95+
run: ctest -C ${{matrix.mode}} -j 1 -V -R "ibverbs_pressure_test"
96+
97+
- name: Test coro_rpc
98+
working-directory: ${{github.workspace}}/build
99+
run: ctest -C ${{matrix.mode}} -j 1 -V -R "coro_rpc_test"

0 commit comments

Comments
 (0)