Skip to content

Commit 13d0760

Browse files
committed
Ci: Run smoke, nightly and gtest tests on new NICs
Add e810, e810-dell and e830 labels to distinguish the recently added runners with the new NICs. Add pci_device parameter to the config generator. Run smoke, nightly and gtest tests on all available NICs.
1 parent cae46cf commit 13d0760

File tree

5 files changed

+62
-8
lines changed

5 files changed

+62
-8
lines changed

.github/linters/actionlint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
self-hosted-runner:
22
labels:
33
- dpdk
4+
- e810
5+
- e810-dell
6+
- e830

.github/workflows/gtest-bare-metal.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ jobs:
4343
run-tests:
4444
needs: gtest-check-for-changes
4545
if: github.repository == 'OpenVisualCloud/Media-Transport-Library' && (needs.gtest-check-for-changes.outputs.changed == 'true' || github.event_name == 'workflow_dispatch')
46-
runs-on: [self-hosted, linux, x64, dpdk]
46+
strategy:
47+
matrix:
48+
nic:
49+
- e810
50+
- e810-dell
51+
- e830
52+
fail-fast: false
53+
runs-on: ${{ matrix.nic }}
4754
steps:
4855
- name: Harden Runner
4956
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2

.github/workflows/nightly-tests.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ permissions:
88
contents: read
99
jobs:
1010
run-nightly-tests:
11-
runs-on: [self-hosted, linux, x64, dpdk]
11+
strategy:
12+
matrix:
13+
nic:
14+
- e810
15+
- e810-dell
16+
- e830
17+
fail-fast: false
18+
runs-on: ${{ matrix.nic }}
1219
timeout-minutes: 720
1320
steps:
1421
- name: 'preparation: Harden Runner'
@@ -31,13 +38,23 @@ jobs:
3138
run: |
3239
runner_name=${{ runner.name }}
3340
echo "SESSION_ID=${runner_name##*-}" >> "$GITHUB_ENV"
41+
- name: Set PCI device env variable
42+
run: |
43+
if [ "${{ matrix.nic }}" = "e810" ]; then
44+
echo "PCI_DEVICE=8086:1592" >> "$GITHUB_ENV"
45+
elif [ "${{ matrix.nic }}" = "e810-dell" ]; then
46+
echo "PCI_DEVICE=8086:1592" >> "$GITHUB_ENV"
47+
elif [ "${{ matrix.nic }}" = "e830" ]; then
48+
echo "PCI_DEVICE=8086:12d2" >> "$GITHUB_ENV"
49+
fi
3450
- name: Generate test framework config files
3551
working-directory: tests/validation/configs
3652
run: |
3753
python3 gen_config.py \
3854
--session_id ${{ env.SESSION_ID }} \
3955
--build ${{ secrets.RUNNER_BUILD }} \
4056
--mtl_path ${{ secrets.RUNNER_MTL_PATH }} \
57+
--pci_device ${{ env.PCI_DEVICE }} \
4158
--ip_address 127.0.0.1 \
4259
--username ${{ secrets.RUNNER_USERNAME }} \
4360
--key_path ${{ secrets.RUNNER_KEY_PATH }}
@@ -78,14 +95,14 @@ jobs:
7895
id: upload-report
7996
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
8097
with:
81-
name: nightly-tests-report
98+
name: nightly-test-report-${{ matrix.nic }}
8299
path: |
83100
report.html
84101
- name: "upload report gtest"
85102
if: always()
86103
id: upload-report-gtest
87104
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
88105
with:
89-
name: nightly-tests-report-gtest
106+
name: nightly-gtest-report-${{ matrix.nic }}
90107
path: |
91108
gtest.log

.github/workflows/smoke-tests.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ permissions:
1313
contents: read
1414
jobs:
1515
run-smoke-tests:
16-
runs-on: [self-hosted, linux, x64, dpdk]
16+
strategy:
17+
matrix:
18+
nic:
19+
- e810
20+
- e810-dell
21+
- e830
22+
fail-fast: false
23+
runs-on: ${{ matrix.nic }}
1724
timeout-minutes: 720
1825
steps:
1926
- name: 'preparation: Harden Runner'
@@ -36,13 +43,23 @@ jobs:
3643
run: |
3744
runner_name=${{ runner.name }}
3845
echo "SESSION_ID=${runner_name##*-}" >> "$GITHUB_ENV"
46+
- name: Set PCI device env variable
47+
run: |
48+
if [ "${{ matrix.nic }}" = "e810" ]; then
49+
echo "PCI_DEVICE=8086:1592" >> "$GITHUB_ENV"
50+
elif [ "${{ matrix.nic }}" = "e810-dell" ]; then
51+
echo "PCI_DEVICE=8086:1592" >> "$GITHUB_ENV"
52+
elif [ "${{ matrix.nic }}" = "e830" ]; then
53+
echo "PCI_DEVICE=8086:12d2" >> "$GITHUB_ENV"
54+
fi
3955
- name: Generate test framework config files
4056
working-directory: tests/validation/configs
4157
run: |
4258
python3 gen_config.py \
4359
--session_id ${{ env.SESSION_ID }} \
4460
--build ${{ secrets.RUNNER_BUILD }} \
4561
--mtl_path ${{ secrets.RUNNER_MTL_PATH }} \
62+
--pci_device ${{ env.PCI_DEVICE }} \
4663
--ip_address 127.0.0.1 \
4764
--username ${{ secrets.RUNNER_USERNAME }} \
4865
--key_path ${{ secrets.RUNNER_KEY_PATH }}
@@ -74,7 +91,7 @@ jobs:
7491
id: upload-report
7592
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
7693
with:
77-
name: smoke-tests-report
94+
name: smoke-test-report-${{ matrix.nic }}
7895
path: |
7996
report.html
8097
- name: "Add report to summary"

tests/validation/configs/gen_config.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def gen_test_config(session_id: int, build: str, mtl_path: str) -> str:
2626

2727

2828
def gen_topology_config(
29-
ip_address: str, username: str, password: str, key_path: str
29+
pci_device: str, ip_address: str, username: str, password: str, key_path: str
3030
) -> str:
3131
topology_config = {
3232
"metadata": {"version": "2.4"},
@@ -36,7 +36,10 @@ def gen_topology_config(
3636
"instantiate": True,
3737
"role": "sut",
3838
"network_interfaces": [
39-
{"pci_device": "8086:1592", "interface_index": 0}
39+
{
40+
"pci_device": pci_device,
41+
"interface_index": 0,
42+
}
4043
],
4144
"connections": [
4245
{
@@ -82,6 +85,12 @@ def main() -> None:
8285
required=True,
8386
help="specify path to MTL directory",
8487
)
88+
parser.add_argument(
89+
"--pci_device",
90+
type=str,
91+
required=True,
92+
help="specify PCI ID of the NIC",
93+
)
8594
parser.add_argument(
8695
"--ip_address",
8796
type=str,
@@ -118,6 +127,7 @@ def main() -> None:
118127
with open("topology_config.yaml", "w") as file:
119128
file.write(
120129
gen_topology_config(
130+
pci_device=args.pci_device,
121131
ip_address=args.ip_address,
122132
username=args.username,
123133
password=args.password,

0 commit comments

Comments
 (0)