Skip to content

Commit ae475c7

Browse files
committed
Merge remote-tracking branch 'origin/main' into netsniff-autom
2 parents 7643980 + 8cd7999 commit ae475c7

File tree

81 files changed

+1827
-644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1827
-644
lines changed

.github/actions/build/action.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Build
2+
runs:
3+
using: composite
4+
steps:
5+
- name: 'preparation: Checkout openh264'
6+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7+
with:
8+
repository: 'cisco/openh264'
9+
ref: 'openh264v2.4.0'
10+
path: 'openh264'
11+
- name: 'preparation: Checkout FFmpeg'
12+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
with:
14+
repository: 'FFmpeg/FFmpeg'
15+
ref: 'release/7.0'
16+
path: 'ffmpeg'
17+
- name: 'configuration: Install the build dependency'
18+
run: |
19+
sudo apt update
20+
sudo apt-get remove -y pipenv || true
21+
sudo apt-get install -y \
22+
git gcc meson tar zip \
23+
pkg-config \
24+
python3 \
25+
python3-pyelftools \
26+
python3-virtualenv \
27+
python3-pip \
28+
libnuma-dev \
29+
libjson-c-dev \
30+
libpcap-dev \
31+
libgtest-dev \
32+
libsdl2-dev \
33+
libsdl2-ttf-dev \
34+
libssl-dev \
35+
systemtap-sdt-dev \
36+
libbpf-dev \
37+
libelf1 \
38+
gstreamer1.0-plugins-base \
39+
gstreamer1.0-plugins-good \
40+
gstreamer1.0-tools \
41+
gstreamer1.0-libav \
42+
libgstreamer1.0-dev \
43+
libgstreamer-plugins-base1.0-dev
44+
shell: bash
45+
- name: 'installation: Build mtl'
46+
run: |
47+
./build.sh
48+
sudo ldconfig
49+
shell: bash
50+
- name: 'installation: Build openh264'
51+
working-directory: openh264
52+
run: |
53+
make -j "$(nproc)"
54+
sudo make install
55+
sudo ldconfig
56+
shell: bash
57+
- name: 'installation: Build FFmpeg'
58+
working-directory: ffmpeg
59+
run: |
60+
git am ../ecosystem/ffmpeg_plugin/7.0/*.patch
61+
cp ../ecosystem/ffmpeg_plugin/mtl_*.c -rf libavdevice/
62+
cp ../ecosystem/ffmpeg_plugin/mtl_*.h -rf libavdevice/
63+
./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl
64+
make -j "$(nproc)"
65+
sudo make install
66+
sudo ldconfig
67+
shell: bash
68+
- name: 'installation: Build GStreamer'
69+
working-directory: ecosystem/gstreamer_plugin
70+
run: |
71+
./build.sh
72+
shell: bash

.github/linters/actionlint.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
self-hosted-runner:
22
labels:
3-
- DPDK
4-
- XDP
3+
- dpdk

.github/scripts/setup_environment.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ function setup_ubuntu_install_dependencies() {
182182
echo "Installing GStreamer dependencies"
183183
apt install -y \
184184
gstreamer1.0-plugins-base \
185+
libgstreamer-plugins-base1.0-dev \
185186
gstreamer1.0-plugins-good \
186187
gstreamer1.0-tools \
187188
gstreamer1.0-libav \

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
gtest-build-mtl:
5656
needs: gtest-check-for-changes
5757
if: github.repository == 'OpenVisualCloud/Media-Transport-Library' && (needs.gtest-check-for-changes.outputs.changed == 'true' || github.event_name == 'workflow_dispatch')
58-
runs-on: [Linux, self-hosted, DPDK]
58+
runs-on: [self-hosted, linux, x64, dpdk]
5959
timeout-minutes: 60
6060

6161
steps:
@@ -97,7 +97,7 @@ jobs:
9797
gtest-perform-tests:
9898
needs: [gtest-check-for-changes, gtest-build-mtl]
9999
if: github.repository == 'OpenVisualCloud/Media-Transport-Library' && (needs.gtest-check-for-changes.outputs.changed == 'true' || github.event_name == 'workflow_dispatch')
100-
runs-on: [Linux, self-hosted, DPDK]
100+
runs-on: [self-hosted, linux, x64, dpdk]
101101
steps:
102102
- name: Harden Runner
103103
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2

.github/workflows/nightly-tests.yml

Lines changed: 10 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -2,139 +2,36 @@ name: nightly-tests-bare-metal
22
on:
33
schedule:
44
- cron: '0 0 * * *' # Every day at midnight UTC
5-
env:
6-
BUILD_TYPE: 'Release'
7-
DPDK_VERSION: '25.03'
8-
DPDK_REBUILD: 'false'
95
permissions:
106
contents: read
117
jobs:
12-
validation-build-mtl:
13-
runs-on: [Linux, self-hosted, DPDK]
14-
timeout-minutes: 60
15-
outputs:
16-
pipenv-activate: ${{ steps.pipenv-install.outputs.VIRTUAL_ENV }}
8+
run-nightly-tests:
9+
runs-on: [self-hosted, linux, x64, dpdk]
10+
timeout-minutes: 720
1711
steps:
1812
- name: 'preparation: Harden Runner'
1913
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
2014
with:
2115
egress-policy: audit
22-
- name: 'preparation: Restore valid repository owner and print env'
23-
if: always()
24-
run: |
25-
sudo chown -R "${USER}" "$(pwd)" || true
26-
env | grep TEST_ || true
2716
- name: 'preparation: Checkout MTL'
2817
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2918
with:
3019
ref: '${{ github.ref }}'
31-
- name: 'preparation: Checkout DPDK'
32-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33-
if: env.DPDK_REBUILD == 'true'
34-
with:
35-
repository: 'DPDK/dpdk'
36-
ref: 'v${{ env.DPDK_VERSION }}'
37-
path: 'dpdk'
38-
- name: 'preparation: Checkout openh264'
39-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
40-
with:
41-
repository: 'cisco/openh264'
42-
ref: 'openh264v2.4.0'
43-
path: 'openh264'
44-
- name: 'preparation: Checkout FFmpeg'
45-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46-
with:
47-
repository: 'FFmpeg/FFmpeg'
48-
ref: 'release/7.0'
49-
path: 'ffmpeg'
50-
- name: 'configuration: Install the build dependency'
51-
run: |
52-
sudo apt update
53-
sudo apt-get remove -y pipenv || true
54-
sudo apt-get install -y \
55-
git gcc meson tar zip \
56-
pkg-config \
57-
python3 \
58-
python3-pyelftools \
59-
python3-virtualenv \
60-
python3-pip \
61-
libnuma-dev \
62-
libjson-c-dev \
63-
libpcap-dev \
64-
libgtest-dev \
65-
libsdl2-dev \
66-
libsdl2-ttf-dev \
67-
libssl-dev \
68-
systemtap-sdt-dev \
69-
libbpf-dev \
70-
libelf1 \
71-
gstreamer1.0-plugins-base \
72-
gstreamer1.0-plugins-good \
73-
gstreamer1.0-tools \
74-
gstreamer1.0-libav \
75-
libgstreamer1.0-dev \
76-
libgstreamer-plugins-base1.0-dev
77-
- name: 'configuration: Apply dpdk patches'
78-
if: env.DPDK_REBUILD == 'true'
79-
run: |
80-
patch -d "dpdk" -p1 -i <(cat patches/dpdk/${{ env.DPDK_VERSION }}/*.patch)
81-
- name: 'installation: Build dpdk'
82-
working-directory: dpdk
83-
if: env.DPDK_REBUILD == 'true'
84-
run: |
85-
meson build
86-
ninja -C build
87-
sudo ninja -C build install
88-
- name: 'installation: Build mtl'
89-
run: |
90-
./build.sh
91-
sudo ldconfig
92-
- name: 'installation: Build openh264'
93-
working-directory: openh264
94-
run: |
95-
make -j "$(nproc)"
96-
sudo make install
97-
sudo ldconfig
98-
- name: 'installation: Build FFmpeg'
99-
working-directory: ffmpeg
100-
run: |
101-
git am ../ecosystem/ffmpeg_plugin/7.0/*.patch
102-
cp ../ecosystem/ffmpeg_plugin/mtl_*.c -rf libavdevice/
103-
cp ../ecosystem/ffmpeg_plugin/mtl_*.h -rf libavdevice/
104-
./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl
105-
make -j "$(nproc)"
106-
sudo make install
107-
sudo ldconfig
108-
- name: 'installation: Build GStreamer'
109-
working-directory: ecosystem/gstreamer_plugin
110-
run: |
111-
./build.sh
20+
- uses: ./.github/actions/build
11221
- name: 'installation: Install pipenv environment'
11322
working-directory: tests/validation
11423
id: pipenv-install
11524
run: |
116-
python3 -m venv venv
117-
source venv/bin/activate
25+
python3 -m venv .venv
26+
source .venv/bin/activate
11827
pip install -r requirements.txt
119-
echo "VIRTUAL_ENV=$PWD/venv/bin/activate" >> "$GITHUB_ENV"
120-
validation-run-tests:
121-
needs: [validation-build-mtl]
122-
runs-on: [Linux, self-hosted, DPDK]
123-
timeout-minutes: 720
124-
env:
125-
PYTEST_RETRIES: '3'
126-
steps:
12728
- name: Replace secrets in example config files
12829
run: |
12930
sed -i "s+MTL_PATH_PLACEHOLDER+${{ secrets.BARE_METAL_MTL_PATH }}+" tests/validation/configs/test_config.yaml
13031
sed -i "s/IP_ADDRESS_PLACEHOLDER/${{ secrets.BARE_METAL_IP_ADDRESS }}/" tests/validation/configs/topology_config.yaml
13132
sed -i "s/SSH_PORT_PLACEHOLDER/${{ secrets.BARE_METAL_SSH_PORT }}/" tests/validation/configs/topology_config.yaml
13233
sed -i "s/USERNAME_PLACEHOLDER/${{ secrets.BARE_METAL_USERNAME }}/" tests/validation/configs/topology_config.yaml
13334
sed -i "s+KEY_PATH_PLACEHOLDER+${{ secrets.BARE_METAL_SSH_KEY_PATH }}+" tests/validation/configs/topology_config.yaml
134-
- name: 'preparation: Harden Runner'
135-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
136-
with:
137-
egress-policy: audit
13835
- name: 'preparation: Evaluate chosen validation-test-port-p and validation-test-port-r'
13936
run: |
14037
eval "export TEST_PORT_P=TEST_VF_PORT_P_0"
@@ -158,7 +55,10 @@ jobs:
15855
sudo MtlManager &
15956
- name: 'execution: Run nightly-bare-metal tests in virtual environment'
16057
run: |
161-
sudo tests/validation/venv/bin/python3 -m pytest --topology_config=tests/validation/configs/topology_config.yaml --test_config=tests/validation/configs/test_config.yaml -m nightly --template=html/index.html --report=report.html
58+
sudo tests/validation/.venv/bin/python3 -m pytest --topology_config=tests/validation/configs/topology_config.yaml --test_config=tests/validation/configs/test_config.yaml -m nightly --template=html/index.html --report=report.html
59+
- name: Restore repository owner
60+
run: |
61+
sudo chown -R "${USER}" .
16262
- name: "upload report"
16363
if: always()
16464
id: upload-report

0 commit comments

Comments
 (0)