Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build
runs:
using: composite
steps:
- name: 'preparation: Checkout openh264'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: 'cisco/openh264'
ref: 'openh264v2.4.0'
path: 'openh264'
- name: 'preparation: Checkout FFmpeg'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: 'FFmpeg/FFmpeg'
ref: 'release/7.0'
path: 'ffmpeg'
- name: 'configuration: Install the build dependency'
run: |
sudo apt update
sudo apt-get remove -y pipenv || true
sudo apt-get install -y \
git gcc meson tar zip \
pkg-config \
python3 \
python3-pyelftools \
python3-virtualenv \
python3-pip \
libnuma-dev \
libjson-c-dev \
libpcap-dev \
libgtest-dev \
libsdl2-dev \
libsdl2-ttf-dev \
libssl-dev \
systemtap-sdt-dev \
libbpf-dev \
libelf1 \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-tools \
gstreamer1.0-libav \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev
shell: bash
- name: 'installation: Build mtl'
run: |
./build.sh
sudo ldconfig
shell: bash
- name: 'installation: Build openh264'
working-directory: openh264
run: |
make -j "$(nproc)"
sudo make install
sudo ldconfig
shell: bash
- name: 'installation: Build FFmpeg'
working-directory: ffmpeg
run: |
git am ../ecosystem/ffmpeg_plugin/7.0/*.patch
cp ../ecosystem/ffmpeg_plugin/mtl_*.c -rf libavdevice/
cp ../ecosystem/ffmpeg_plugin/mtl_*.h -rf libavdevice/
./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl
make -j "$(nproc)"
sudo make install
sudo ldconfig
shell: bash
- name: 'installation: Build GStreamer'
working-directory: ecosystem/gstreamer_plugin
run: |
./build.sh
shell: bash
3 changes: 1 addition & 2 deletions .github/linters/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
self-hosted-runner:
labels:
- DPDK
- XDP
- dpdk
4 changes: 2 additions & 2 deletions .github/workflows/gtest-bare-metal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
gtest-build-mtl:
needs: gtest-check-for-changes
if: github.repository == 'OpenVisualCloud/Media-Transport-Library' && (needs.gtest-check-for-changes.outputs.changed == 'true' || github.event_name == 'workflow_dispatch')
runs-on: [Linux, self-hosted, DPDK]
runs-on: [self-hosted, linux, x64, dpdk]
timeout-minutes: 60

steps:
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
gtest-perform-tests:
needs: [gtest-check-for-changes, gtest-build-mtl]
if: github.repository == 'OpenVisualCloud/Media-Transport-Library' && (needs.gtest-check-for-changes.outputs.changed == 'true' || github.event_name == 'workflow_dispatch')
runs-on: [Linux, self-hosted, DPDK]
runs-on: [self-hosted, linux, x64, dpdk]
steps:
- name: Harden Runner
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
Expand Down
120 changes: 10 additions & 110 deletions .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,139 +2,36 @@ name: nightly-tests-bare-metal
on:
schedule:
- cron: '0 0 * * *' # Every day at midnight UTC
env:
BUILD_TYPE: 'Release'
DPDK_VERSION: '25.03'
DPDK_REBUILD: 'false'
permissions:
contents: read
jobs:
validation-build-mtl:
runs-on: [Linux, self-hosted, DPDK]
timeout-minutes: 60
outputs:
pipenv-activate: ${{ steps.pipenv-install.outputs.VIRTUAL_ENV }}
run-nightly-tests:
runs-on: [self-hosted, linux, x64, dpdk]
timeout-minutes: 720
steps:
- name: 'preparation: Harden Runner'
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
- name: 'preparation: Restore valid repository owner and print env'
if: always()
run: |
sudo chown -R "${USER}" "$(pwd)" || true
env | grep TEST_ || true
- name: 'preparation: Checkout MTL'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: '${{ github.ref }}'
- name: 'preparation: Checkout DPDK'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
if: env.DPDK_REBUILD == 'true'
with:
repository: 'DPDK/dpdk'
ref: 'v${{ env.DPDK_VERSION }}'
path: 'dpdk'
- name: 'preparation: Checkout openh264'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: 'cisco/openh264'
ref: 'openh264v2.4.0'
path: 'openh264'
- name: 'preparation: Checkout FFmpeg'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: 'FFmpeg/FFmpeg'
ref: 'release/7.0'
path: 'ffmpeg'
- name: 'configuration: Install the build dependency'
run: |
sudo apt update
sudo apt-get remove -y pipenv || true
sudo apt-get install -y \
git gcc meson tar zip \
pkg-config \
python3 \
python3-pyelftools \
python3-virtualenv \
python3-pip \
libnuma-dev \
libjson-c-dev \
libpcap-dev \
libgtest-dev \
libsdl2-dev \
libsdl2-ttf-dev \
libssl-dev \
systemtap-sdt-dev \
libbpf-dev \
libelf1 \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-tools \
gstreamer1.0-libav \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev
- name: 'configuration: Apply dpdk patches'
if: env.DPDK_REBUILD == 'true'
run: |
patch -d "dpdk" -p1 -i <(cat patches/dpdk/${{ env.DPDK_VERSION }}/*.patch)
- name: 'installation: Build dpdk'
working-directory: dpdk
if: env.DPDK_REBUILD == 'true'
run: |
meson build
ninja -C build
sudo ninja -C build install
- name: 'installation: Build mtl'
run: |
./build.sh
sudo ldconfig
- name: 'installation: Build openh264'
working-directory: openh264
run: |
make -j "$(nproc)"
sudo make install
sudo ldconfig
- name: 'installation: Build FFmpeg'
working-directory: ffmpeg
run: |
git am ../ecosystem/ffmpeg_plugin/7.0/*.patch
cp ../ecosystem/ffmpeg_plugin/mtl_*.c -rf libavdevice/
cp ../ecosystem/ffmpeg_plugin/mtl_*.h -rf libavdevice/
./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl
make -j "$(nproc)"
sudo make install
sudo ldconfig
- name: 'installation: Build GStreamer'
working-directory: ecosystem/gstreamer_plugin
run: |
./build.sh
- uses: ./.github/actions/build
- name: 'installation: Install pipenv environment'
working-directory: tests/validation
id: pipenv-install
run: |
python3 -m venv venv
source venv/bin/activate
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
echo "VIRTUAL_ENV=$PWD/venv/bin/activate" >> "$GITHUB_ENV"
validation-run-tests:
needs: [validation-build-mtl]
runs-on: [Linux, self-hosted, DPDK]
timeout-minutes: 720
env:
PYTEST_RETRIES: '3'
steps:
- name: Replace secrets in example config files
run: |
sed -i "s+MTL_PATH_PLACEHOLDER+${{ secrets.BARE_METAL_MTL_PATH }}+" tests/validation/configs/test_config.yaml
sed -i "s/IP_ADDRESS_PLACEHOLDER/${{ secrets.BARE_METAL_IP_ADDRESS }}/" tests/validation/configs/topology_config.yaml
sed -i "s/SSH_PORT_PLACEHOLDER/${{ secrets.BARE_METAL_SSH_PORT }}/" tests/validation/configs/topology_config.yaml
sed -i "s/USERNAME_PLACEHOLDER/${{ secrets.BARE_METAL_USERNAME }}/" tests/validation/configs/topology_config.yaml
sed -i "s+KEY_PATH_PLACEHOLDER+${{ secrets.BARE_METAL_SSH_KEY_PATH }}+" tests/validation/configs/topology_config.yaml
- name: 'preparation: Harden Runner'
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit
- name: 'preparation: Evaluate chosen validation-test-port-p and validation-test-port-r'
run: |
eval "export TEST_PORT_P=TEST_VF_PORT_P_0"
Expand All @@ -158,7 +55,10 @@ jobs:
sudo MtlManager &
- name: 'execution: Run nightly-bare-metal tests in virtual environment'
run: |
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
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
- name: Restore repository owner
run: |
sudo chown -R "${USER}" .
- name: "upload report"
if: always()
id: upload-report
Expand Down
Loading