From 07a39e7d9bd6ee698abd4f825f35af5f42240b1c Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Wed, 10 Sep 2025 11:26:53 +0000 Subject: [PATCH 01/18] Add dual marker --- tests/validation/pytest.ini | 1 + .../tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_dual.py | 1 + .../tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_rgb24_dual.py | 1 + .../dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_rgb24_multiple_dual.py | 1 + .../tests/dual/ffmpeg/test_rx_ffmpeg_tx_rxtxapp_dual.py | 1 + .../tests/dual/gstreamer/anc_format/test_anc_format_dual.py | 1 + .../tests/dual/gstreamer/audio_format/test_audio_format_dual.py | 1 + .../tests/dual/gstreamer/video_format/test_video_format_dual.py | 1 + .../gstreamer/video_resolution/test_video_resolution_dual.py | 1 + tests/validation/tests/dual/st20p/fps/test_fps.py | 1 + tests/validation/tests/dual/st20p/integrity/test_integrity.py | 1 + tests/validation/tests/dual/st20p/interlace/test_interlace.py | 1 + tests/validation/tests/dual/st20p/pacing/test_pacing.py | 1 + tests/validation/tests/dual/st20p/packing/test_packing.py | 1 + .../validation/tests/dual/st20p/resolutions/test_resolutions.py | 1 + tests/validation/tests/dual/st20p/test_mode/test_multicast.py | 1 + tests/validation/tests/dual/st30p/integrity/test_integrity.py | 1 + .../tests/dual/st30p/st30p_channel/test_st30p_channel.py | 1 + .../tests/dual/st30p/st30p_format/test_st30p_format.py | 1 + .../validation/tests/dual/st30p/st30p_ptime/test_st30p_ptime.py | 1 + .../tests/dual/st30p/st30p_sampling/test_st30p_sampling.py | 1 + tests/validation/tests/dual/st30p/test_mode/test_multicast.py | 1 + .../tests/dual/st40/test_format_dual/test_format_dual.py | 1 + tests/validation/tests/dual/st40/test_mode/test_mode.py | 1 + tests/validation/tests/dual/st40/type_mode/type_mode.py | 1 + 25 files changed, 25 insertions(+) diff --git a/tests/validation/pytest.ini b/tests/validation/pytest.ini index 967e3f6f9..0196d17fa 100644 --- a/tests/validation/pytest.ini +++ b/tests/validation/pytest.ini @@ -3,3 +3,4 @@ log_file=pytest.log markers= smoke: mark test as part of the smoke test suite nightly: mark test as part of the nightly test suite + dual: mark test as part of the dual host test suite diff --git a/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_dual.py b/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_dual.py index 95d96cd4a..161daa1a5 100755 --- a/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_dual.py +++ b/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_dual.py @@ -8,6 +8,7 @@ from mtl_engine.media_files import yuv_files +@pytest.mark.dual @pytest.mark.parametrize( "video_format, test_time_multipler,", [ diff --git a/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_rgb24_dual.py b/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_rgb24_dual.py index 56ebfe24d..e21905db4 100755 --- a/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_rgb24_dual.py +++ b/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_rgb24_dual.py @@ -8,6 +8,7 @@ from mtl_engine.media_files import yuv_files +@pytest.mark.dual @pytest.mark.parametrize( "video_format, test_time_mutlipler", [ diff --git a/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_rgb24_multiple_dual.py b/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_rgb24_multiple_dual.py index e831afd33..7d69af7f9 100755 --- a/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_rgb24_multiple_dual.py +++ b/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_ffmpeg_rgb24_multiple_dual.py @@ -8,6 +8,7 @@ from mtl_engine.media_files import yuv_files +@pytest.mark.dual @pytest.mark.parametrize( "video_format_1, video_format_2, test_time_mutlipler", [ diff --git a/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_rxtxapp_dual.py b/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_rxtxapp_dual.py index 2ff984aae..1cfc06fbc 100755 --- a/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_rxtxapp_dual.py +++ b/tests/validation/tests/dual/ffmpeg/test_rx_ffmpeg_tx_rxtxapp_dual.py @@ -8,6 +8,7 @@ from mtl_engine.media_files import yuv_files +@pytest.mark.dual @pytest.mark.parametrize( "video_format, multiple_sessions, test_time_multipler", [ diff --git a/tests/validation/tests/dual/gstreamer/anc_format/test_anc_format_dual.py b/tests/validation/tests/dual/gstreamer/anc_format/test_anc_format_dual.py index f05b8780f..15e289008 100755 --- a/tests/validation/tests/dual/gstreamer/anc_format/test_anc_format_dual.py +++ b/tests/validation/tests/dual/gstreamer/anc_format/test_anc_format_dual.py @@ -8,6 +8,7 @@ from mtl_engine import GstreamerApp +@pytest.mark.dual @pytest.mark.parametrize("fps", [24, 25, 30, 50, 60]) @pytest.mark.parametrize("file_size_kb", [10, 100]) @pytest.mark.parametrize("framebuff", [3]) diff --git a/tests/validation/tests/dual/gstreamer/audio_format/test_audio_format_dual.py b/tests/validation/tests/dual/gstreamer/audio_format/test_audio_format_dual.py index 64d7c982a..68f1968af 100755 --- a/tests/validation/tests/dual/gstreamer/audio_format/test_audio_format_dual.py +++ b/tests/validation/tests/dual/gstreamer/audio_format/test_audio_format_dual.py @@ -8,6 +8,7 @@ from mtl_engine import GstreamerApp +@pytest.mark.dual @pytest.mark.parametrize("audio_format", ["S8", "S16BE", "S24BE"]) @pytest.mark.parametrize("audio_channel", [1, 2]) @pytest.mark.parametrize("audio_rate", [44100, 48000, 96000]) diff --git a/tests/validation/tests/dual/gstreamer/video_format/test_video_format_dual.py b/tests/validation/tests/dual/gstreamer/video_format/test_video_format_dual.py index b2554f1fb..ea56f8447 100755 --- a/tests/validation/tests/dual/gstreamer/video_format/test_video_format_dual.py +++ b/tests/validation/tests/dual/gstreamer/video_format/test_video_format_dual.py @@ -9,6 +9,7 @@ from mtl_engine.media_files import gstreamer_formats +@pytest.mark.dual @pytest.mark.parametrize("file", gstreamer_formats.keys()) def test_video_format_dual( hosts, diff --git a/tests/validation/tests/dual/gstreamer/video_resolution/test_video_resolution_dual.py b/tests/validation/tests/dual/gstreamer/video_resolution/test_video_resolution_dual.py index b37a908f6..e6b420476 100755 --- a/tests/validation/tests/dual/gstreamer/video_resolution/test_video_resolution_dual.py +++ b/tests/validation/tests/dual/gstreamer/video_resolution/test_video_resolution_dual.py @@ -10,6 +10,7 @@ from tests.xfail import SDBQ1971_conversion_v210_720p_error +@pytest.mark.dual @pytest.mark.parametrize("file", yuv_files.keys()) def test_video_resolutions_dual( hosts, diff --git a/tests/validation/tests/dual/st20p/fps/test_fps.py b/tests/validation/tests/dual/st20p/fps/test_fps.py index d13fa23d3..654a3d4c4 100755 --- a/tests/validation/tests/dual/st20p/fps/test_fps.py +++ b/tests/validation/tests/dual/st20p/fps/test_fps.py @@ -7,6 +7,7 @@ from mtl_engine.media_files import yuv_files_422rfc10 +@pytest.mark.dual @pytest.mark.parametrize( "fps", ["p23", "p24", "p25", "p29", "p30", "p50", "p59", "p60", "p100", "p119", "p120"], diff --git a/tests/validation/tests/dual/st20p/integrity/test_integrity.py b/tests/validation/tests/dual/st20p/integrity/test_integrity.py index 024024bc9..8f652d3cc 100755 --- a/tests/validation/tests/dual/st20p/integrity/test_integrity.py +++ b/tests/validation/tests/dual/st20p/integrity/test_integrity.py @@ -15,6 +15,7 @@ logger = logging.getLogger(__name__) +@pytest.mark.dual @pytest.mark.parametrize( "st20p_file, fps", [ diff --git a/tests/validation/tests/dual/st20p/interlace/test_interlace.py b/tests/validation/tests/dual/st20p/interlace/test_interlace.py index 89fce582e..bd6ecf7cf 100755 --- a/tests/validation/tests/dual/st20p/interlace/test_interlace.py +++ b/tests/validation/tests/dual/st20p/interlace/test_interlace.py @@ -7,6 +7,7 @@ from mtl_engine.media_files import yuv_files_interlace +@pytest.mark.dual @pytest.mark.parametrize("file", yuv_files_interlace.keys()) def test_interlace_dual(hosts, build, media, nic_port_list, test_time, file): st20p_file = yuv_files_interlace[file] diff --git a/tests/validation/tests/dual/st20p/pacing/test_pacing.py b/tests/validation/tests/dual/st20p/pacing/test_pacing.py index acada8cb2..6cb428084 100755 --- a/tests/validation/tests/dual/st20p/pacing/test_pacing.py +++ b/tests/validation/tests/dual/st20p/pacing/test_pacing.py @@ -7,6 +7,7 @@ from mtl_engine.media_files import yuv_files_422rfc10 +@pytest.mark.dual @pytest.mark.parametrize("pacing", ["narrow", "wide", "linear"]) @pytest.mark.parametrize("file", ["Crosswalk_720p", "ParkJoy_1080p", "Pedestrian_4K"]) def test_pacing_dual(hosts, build, media, nic_port_list, test_time, file, pacing): diff --git a/tests/validation/tests/dual/st20p/packing/test_packing.py b/tests/validation/tests/dual/st20p/packing/test_packing.py index d9dd8542e..f35bcc547 100755 --- a/tests/validation/tests/dual/st20p/packing/test_packing.py +++ b/tests/validation/tests/dual/st20p/packing/test_packing.py @@ -7,6 +7,7 @@ from mtl_engine.media_files import yuv_files_422rfc10 +@pytest.mark.dual @pytest.mark.parametrize("packing", ["GPM_SL", "GPM"]) @pytest.mark.parametrize("file", ["Crosswalk_720p", "ParkJoy_1080p", "Pedestrian_4K"]) def test_packing_dual(hosts, build, media, nic_port_list, test_time, file, packing): diff --git a/tests/validation/tests/dual/st20p/resolutions/test_resolutions.py b/tests/validation/tests/dual/st20p/resolutions/test_resolutions.py index f2b8c43f6..ffbc3736b 100755 --- a/tests/validation/tests/dual/st20p/resolutions/test_resolutions.py +++ b/tests/validation/tests/dual/st20p/resolutions/test_resolutions.py @@ -7,6 +7,7 @@ from mtl_engine.media_files import yuv_files_422rfc10 +@pytest.mark.dual @pytest.mark.parametrize("file", yuv_files_422rfc10.keys()) def test_resolutions_dual( hosts, diff --git a/tests/validation/tests/dual/st20p/test_mode/test_multicast.py b/tests/validation/tests/dual/st20p/test_mode/test_multicast.py index e4a2e00cb..03da187ce 100755 --- a/tests/validation/tests/dual/st20p/test_mode/test_multicast.py +++ b/tests/validation/tests/dual/st20p/test_mode/test_multicast.py @@ -7,6 +7,7 @@ from mtl_engine.media_files import yuv_files_422rfc10 +@pytest.mark.dual @pytest.mark.parametrize("file", ["Crosswalk_720p", "ParkJoy_1080p", "Pedestrian_4K"]) def test_multicast_dual( hosts, diff --git a/tests/validation/tests/dual/st30p/integrity/test_integrity.py b/tests/validation/tests/dual/st30p/integrity/test_integrity.py index 37c1bbaf2..e6609eef5 100755 --- a/tests/validation/tests/dual/st30p/integrity/test_integrity.py +++ b/tests/validation/tests/dual/st30p/integrity/test_integrity.py @@ -15,6 +15,7 @@ logger = logging.getLogger(__name__) +@pytest.mark.dual @pytest.mark.parametrize("audio_format", ["PCM8", "PCM24"]) def test_integrity_dual( hosts, diff --git a/tests/validation/tests/dual/st30p/st30p_channel/test_st30p_channel.py b/tests/validation/tests/dual/st30p/st30p_channel/test_st30p_channel.py index 5b33ddc19..5b19dcbbb 100644 --- a/tests/validation/tests/dual/st30p/st30p_channel/test_st30p_channel.py +++ b/tests/validation/tests/dual/st30p/st30p_channel/test_st30p_channel.py @@ -8,6 +8,7 @@ from tests.xfail import SDBQ1001_audio_channel_check +@pytest.mark.dual @pytest.mark.parametrize( "audio_channel", ["M", "DM", "ST", "LtRt", "51", "71", "222", "SGRP"] ) diff --git a/tests/validation/tests/dual/st30p/st30p_format/test_st30p_format.py b/tests/validation/tests/dual/st30p/st30p_format/test_st30p_format.py index 8c3fd0cde..8c47176c2 100755 --- a/tests/validation/tests/dual/st30p/st30p_format/test_st30p_format.py +++ b/tests/validation/tests/dual/st30p/st30p_format/test_st30p_format.py @@ -7,6 +7,7 @@ from mtl_engine.media_files import audio_files +@pytest.mark.dual @pytest.mark.parametrize("audio_format", ["PCM8", "PCM16", "PCM24"]) def test_st30p_format_dual( hosts, diff --git a/tests/validation/tests/dual/st30p/st30p_ptime/test_st30p_ptime.py b/tests/validation/tests/dual/st30p/st30p_ptime/test_st30p_ptime.py index ab48fca16..3f0b49b2c 100755 --- a/tests/validation/tests/dual/st30p/st30p_ptime/test_st30p_ptime.py +++ b/tests/validation/tests/dual/st30p/st30p_ptime/test_st30p_ptime.py @@ -7,6 +7,7 @@ from mtl_engine.media_files import audio_files +@pytest.mark.dual @pytest.mark.parametrize("audio_ptime", ["1", "0.12", "0.25", "0.33", "4"]) @pytest.mark.parametrize("audio_format", ["PCM8", "PCM16", "PCM24"]) def test_st30p_ptime_dual( diff --git a/tests/validation/tests/dual/st30p/st30p_sampling/test_st30p_sampling.py b/tests/validation/tests/dual/st30p/st30p_sampling/test_st30p_sampling.py index 55864a394..41066b4e1 100755 --- a/tests/validation/tests/dual/st30p/st30p_sampling/test_st30p_sampling.py +++ b/tests/validation/tests/dual/st30p/st30p_sampling/test_st30p_sampling.py @@ -7,6 +7,7 @@ from mtl_engine.media_files import audio_files +@pytest.mark.dual @pytest.mark.parametrize("audio_sampling", ["48kHz", "96kHz"]) @pytest.mark.parametrize("audio_format", ["PCM8", "PCM16", "PCM24"]) def test_st30p_sampling_dual( diff --git a/tests/validation/tests/dual/st30p/test_mode/test_multicast.py b/tests/validation/tests/dual/st30p/test_mode/test_multicast.py index fed1e9191..456ad2616 100755 --- a/tests/validation/tests/dual/st30p/test_mode/test_multicast.py +++ b/tests/validation/tests/dual/st30p/test_mode/test_multicast.py @@ -7,6 +7,7 @@ from mtl_engine.media_files import audio_files +@pytest.mark.dual @pytest.mark.parametrize("audio_format", ["PCM8", "PCM16", "PCM24"]) def test_multicast_dual( hosts, diff --git a/tests/validation/tests/dual/st40/test_format_dual/test_format_dual.py b/tests/validation/tests/dual/st40/test_format_dual/test_format_dual.py index e63f29d5d..0476e76b8 100644 --- a/tests/validation/tests/dual/st40/test_format_dual/test_format_dual.py +++ b/tests/validation/tests/dual/st40/test_format_dual/test_format_dual.py @@ -7,6 +7,7 @@ from mtl_engine.media_files import anc_files +@pytest.mark.dual @pytest.mark.parametrize("anc_format", ["closed_caption"]) @pytest.mark.parametrize("test_mode", ["unicast", "multicast"]) @pytest.mark.parametrize("type_mode", ["frame", "line"]) diff --git a/tests/validation/tests/dual/st40/test_mode/test_mode.py b/tests/validation/tests/dual/st40/test_mode/test_mode.py index ae0baa38f..a6edf0d61 100644 --- a/tests/validation/tests/dual/st40/test_mode/test_mode.py +++ b/tests/validation/tests/dual/st40/test_mode/test_mode.py @@ -8,6 +8,7 @@ from mtl_engine.media_files import anc_files +@pytest.mark.dual @pytest.mark.parametrize("test_mode", ["unicast", "multicast"]) @pytest.mark.parametrize("anc_keys", anc_files.keys()) def test_mode_dual( diff --git a/tests/validation/tests/dual/st40/type_mode/type_mode.py b/tests/validation/tests/dual/st40/type_mode/type_mode.py index ed3de822a..18841df40 100644 --- a/tests/validation/tests/dual/st40/type_mode/type_mode.py +++ b/tests/validation/tests/dual/st40/type_mode/type_mode.py @@ -8,6 +8,7 @@ from mtl_engine.media_files import anc_files +@pytest.mark.dual @pytest.mark.parametrize("type_mode", ["rtp", "frame"]) @pytest.mark.parametrize("anc_keys", anc_files.keys()) def test_type_mode_dual( From 976e56dbf2bcc3c64790450f7ff6ec91eb1312a3 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Wed, 10 Sep 2025 13:02:01 +0000 Subject: [PATCH 02/18] Revert "Ci: add repository condition for validation jobs in smoke tests to exclude forks (#1260)" This reverts commit 8104ae8ed2e1ef3d287ed4d1d859d4f517909cb2. --- .github/workflows/smoke-tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 5d4f7f8c6..c8a13dc56 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -17,7 +17,6 @@ permissions: contents: read jobs: validation-build-mtl: - if: github.repository == 'Media-Transport-Library/Media-Transport-Library' runs-on: [Linux, self-hosted, DPDK] timeout-minutes: 60 outputs: @@ -137,7 +136,6 @@ jobs: echo "VIRTUAL_ENV=$PWD/venv/bin/activate" >> "$GITHUB_ENV" validation-run-tests: needs: [validation-build-mtl] - if: github.repository == 'Media-Transport-Library/Media-Transport-Library' runs-on: [self-hosted, "${{ needs.validation-build-mtl.outputs.runner-id }}"] timeout-minutes: 720 env: From 769cf8df7021350b85374fdc615caa41de9909e9 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Wed, 10 Sep 2025 13:02:36 +0000 Subject: [PATCH 03/18] Revert "Fix failing smoke tests for CICD (#1257)" This reverts commit 1972a3c6471d27beeb75fbbd4a7cbc8a1e83c0ce. --- .github/workflows/smoke-tests.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index c8a13dc56..58445a6fe 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -21,21 +21,11 @@ jobs: timeout-minutes: 60 outputs: pipenv-activate: ${{ steps.pipenv-install.outputs.VIRTUAL_ENV }} - runner-id: ${{ steps.get-runner-id.outputs.runner_id }} steps: - name: 'preparation: Harden Runner' uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2 with: egress-policy: audit - - name: 'preparation: Get Runner ID' - id: get-runner-id - run: | - # Extract runner number from RUNNER_NAME (e.g., "cicd-1" -> "1") - RUNNER_NUMBER=$(echo "$RUNNER_NAME" | grep -o '[0-9]\+$' || echo "1") - # Format as runner-X - RUNNER_ID="runner-${RUNNER_NUMBER}" - echo "runner_id=$RUNNER_ID" >> "$GITHUB_OUTPUT" - echo "Using runner ID: $RUNNER_ID (from runner name: $RUNNER_NAME)" - name: 'preparation: Restore valid repository owner and print env' if: always() run: | @@ -136,14 +126,14 @@ jobs: echo "VIRTUAL_ENV=$PWD/venv/bin/activate" >> "$GITHUB_ENV" validation-run-tests: needs: [validation-build-mtl] - runs-on: [self-hosted, "${{ needs.validation-build-mtl.outputs.runner-id }}"] + 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+${{ github.workspace }}+" tests/validation/configs/test_config.yaml + 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 @@ -177,7 +167,6 @@ jobs: 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 smoke --template=html/index.html --report=report.html - name: "upload report" - if: always() id: upload-report uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: From 6d635c9b50aa19ccc7f23d20d3751174ec6cb053 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 10:20:16 +0000 Subject: [PATCH 04/18] Move build to composite action --- .github/actions/build.yml | 98 +++++++++++++++++++++++++++++ .github/workflows/nightly-tests.yml | 95 +--------------------------- .github/workflows/smoke-tests.yml | 95 +--------------------------- 3 files changed, 100 insertions(+), 188 deletions(-) create mode 100644 .github/actions/build.yml diff --git a/.github/actions/build.yml b/.github/actions/build.yml new file mode 100644 index 000000000..4fabc7ca2 --- /dev/null +++ b/.github/actions/build.yml @@ -0,0 +1,98 @@ +name: Build +runs: + using: composite + 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 diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index fb503c3be..491a5bdbb 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -15,100 +15,7 @@ jobs: outputs: pipenv-activate: ${{ steps.pipenv-install.outputs.VIRTUAL_ENV }} 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.yml - name: 'installation: Install pipenv environment' working-directory: tests/validation id: pipenv-install diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 58445a6fe..3e07e9dde 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -22,100 +22,7 @@ jobs: outputs: pipenv-activate: ${{ steps.pipenv-install.outputs.VIRTUAL_ENV }} 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.yml - name: 'installation: Install pipenv environment' working-directory: tests/validation id: pipenv-install From a483132343e0c0e31da326ee01cc37d7281460fa Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 10:30:06 +0000 Subject: [PATCH 05/18] Remove DPDK build --- .github/actions/build.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/actions/build.yml b/.github/actions/build.yml index 4fabc7ca2..3182bf42e 100644 --- a/.github/actions/build.yml +++ b/.github/actions/build.yml @@ -15,13 +15,6 @@ runs: 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: @@ -61,17 +54,6 @@ runs: 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 From c8f2a36ee02bbd44a05611d2a18279411b30b8fe Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 10:31:26 +0000 Subject: [PATCH 06/18] Remove unused env vars --- .github/workflows/nightly-tests.yml | 6 ------ .github/workflows/smoke-tests.yml | 6 ------ 2 files changed, 12 deletions(-) diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index 491a5bdbb..1ce355c6c 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -2,10 +2,6 @@ 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: @@ -28,8 +24,6 @@ jobs: 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: | diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 3e07e9dde..cdf11bbe1 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -9,10 +9,6 @@ on: branches: - main - 'maint-**' -env: - BUILD_TYPE: 'Release' - DPDK_VERSION: '25.03' - DPDK_REBUILD: 'false' permissions: contents: read jobs: @@ -35,8 +31,6 @@ jobs: 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: | From 3612519d8e8c490d5d965783d9ca936ea27ed2da Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 10:34:21 +0000 Subject: [PATCH 07/18] Remove unused outputs --- .github/workflows/nightly-tests.yml | 3 --- .github/workflows/smoke-tests.yml | 3 --- 2 files changed, 6 deletions(-) diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index 1ce355c6c..223360daf 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -8,8 +8,6 @@ jobs: validation-build-mtl: runs-on: [Linux, self-hosted, DPDK] timeout-minutes: 60 - outputs: - pipenv-activate: ${{ steps.pipenv-install.outputs.VIRTUAL_ENV }} steps: - uses: ./.github/actions/build.yml - name: 'installation: Install pipenv environment' @@ -19,7 +17,6 @@ jobs: 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] diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index cdf11bbe1..f9609455c 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -15,8 +15,6 @@ jobs: validation-build-mtl: runs-on: [Linux, self-hosted, DPDK] timeout-minutes: 60 - outputs: - pipenv-activate: ${{ steps.pipenv-install.outputs.VIRTUAL_ENV }} steps: - uses: ./.github/actions/build.yml - name: 'installation: Install pipenv environment' @@ -26,7 +24,6 @@ jobs: 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] From 003eb38c670f34b1182db080cbb516d3ae1fab2b Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 10:35:43 +0000 Subject: [PATCH 08/18] Merge jobs --- .github/workflows/nightly-tests.yml | 9 ++------- .github/workflows/smoke-tests.yml | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index 223360daf..bd364c200 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -5,9 +5,9 @@ on: permissions: contents: read jobs: - validation-build-mtl: + run-nightly-tests: runs-on: [Linux, self-hosted, DPDK] - timeout-minutes: 60 + timeout-minutes: 720 steps: - uses: ./.github/actions/build.yml - name: 'installation: Install pipenv environment' @@ -17,11 +17,6 @@ jobs: python3 -m venv venv source venv/bin/activate pip install -r requirements.txt - validation-run-tests: - needs: [validation-build-mtl] - runs-on: [Linux, self-hosted, DPDK] - timeout-minutes: 720 - 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 diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index f9609455c..1edc0e4b4 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -12,9 +12,9 @@ on: permissions: contents: read jobs: - validation-build-mtl: + run-smoke-tests: runs-on: [Linux, self-hosted, DPDK] - timeout-minutes: 60 + timeout-minutes: 720 steps: - uses: ./.github/actions/build.yml - name: 'installation: Install pipenv environment' @@ -24,11 +24,6 @@ jobs: python3 -m venv venv source venv/bin/activate pip install -r requirements.txt - validation-run-tests: - needs: [validation-build-mtl] - runs-on: [Linux, self-hosted, DPDK] - timeout-minutes: 720 - 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 From 8665ce6102b886d8b25fa97ddb4c97cac18a4deb Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 10:48:42 +0000 Subject: [PATCH 09/18] Rename venv --- .github/workflows/nightly-tests.yml | 6 +++--- .github/workflows/smoke-tests.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index bd364c200..7dcd598a2 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -14,8 +14,8 @@ jobs: 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 - name: Replace secrets in example config files run: | @@ -51,7 +51,7 @@ 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: "upload report" if: always() id: upload-report diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 1edc0e4b4..62a590421 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -21,8 +21,8 @@ jobs: 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 - name: Replace secrets in example config files run: | @@ -58,7 +58,7 @@ jobs: sudo MtlManager & - name: 'execution: Run validation-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 smoke --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 smoke --template=html/index.html --report=report.html - name: "upload report" id: upload-report uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 From 1ae51434549162818c56ff63d9843c1bf5e7c5a5 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 10:53:25 +0000 Subject: [PATCH 10/18] Update labels --- .github/workflows/nightly-tests.yml | 2 +- .github/workflows/smoke-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index 7dcd598a2..4ab242ed1 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -6,7 +6,7 @@ permissions: contents: read jobs: run-nightly-tests: - runs-on: [Linux, self-hosted, DPDK] + runs-on: [self-hosted, linux, x64, dpdk] timeout-minutes: 720 steps: - uses: ./.github/actions/build.yml diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 62a590421..1088dbdf9 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -13,7 +13,7 @@ permissions: contents: read jobs: run-smoke-tests: - runs-on: [Linux, self-hosted, DPDK] + runs-on: [self-hosted, linux, x64, dpdk] timeout-minutes: 720 steps: - uses: ./.github/actions/build.yml From 7bdeb9ecfb6beaa48859594c2fe6c3c6b031072b Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 15:34:24 +0000 Subject: [PATCH 11/18] Move action file --- .github/actions/{build.yml => build/action.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/actions/{build.yml => build/action.yml} (100%) diff --git a/.github/actions/build.yml b/.github/actions/build/action.yml similarity index 100% rename from .github/actions/build.yml rename to .github/actions/build/action.yml From 1cfd3f95cac17417846591088903bd29df7ee5e3 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 15:35:41 +0000 Subject: [PATCH 12/18] Fix paths --- .github/workflows/nightly-tests.yml | 2 +- .github/workflows/smoke-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index 4ab242ed1..ab79fb2f2 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -9,7 +9,7 @@ jobs: runs-on: [self-hosted, linux, x64, dpdk] timeout-minutes: 720 steps: - - uses: ./.github/actions/build.yml + - uses: ./.github/actions/build - name: 'installation: Install pipenv environment' working-directory: tests/validation id: pipenv-install diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 1088dbdf9..14d072328 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -16,7 +16,7 @@ jobs: runs-on: [self-hosted, linux, x64, dpdk] timeout-minutes: 720 steps: - - uses: ./.github/actions/build.yml + - uses: ./.github/actions/build - name: 'installation: Install pipenv environment' working-directory: tests/validation id: pipenv-install From d7896fc022c2bdc06ba3ae10375c624c4a0692f7 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 15:43:37 +0000 Subject: [PATCH 13/18] Move checkout MTL step to workflow files --- .github/actions/build/action.yml | 4 ---- .github/workflows/nightly-tests.yml | 4 ++++ .github/workflows/smoke-tests.yml | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 3182bf42e..b5ee64d15 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -11,10 +11,6 @@ runs: 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 openh264' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index ab79fb2f2..b5d6ea853 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -9,6 +9,10 @@ jobs: runs-on: [self-hosted, linux, x64, dpdk] timeout-minutes: 720 steps: + - name: 'preparation: Checkout MTL' + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + ref: '${{ github.ref }}' - uses: ./.github/actions/build - name: 'installation: Install pipenv environment' working-directory: tests/validation diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 14d072328..bc8d21ecc 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -16,6 +16,10 @@ jobs: runs-on: [self-hosted, linux, x64, dpdk] timeout-minutes: 720 steps: + - name: 'preparation: Checkout MTL' + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + ref: '${{ github.ref }}' - uses: ./.github/actions/build - name: 'installation: Install pipenv environment' working-directory: tests/validation From df9cad9b272a4f944f24b17aeb5f7c164b325de0 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 15:52:48 +0000 Subject: [PATCH 14/18] Set shell for run steps --- .github/actions/build/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index b5ee64d15..561ab453e 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -11,6 +11,7 @@ runs: run: | sudo chown -R "${USER}" "$(pwd)" || true env | grep TEST_ || true + shell: bash - name: 'preparation: Checkout openh264' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -50,16 +51,19 @@ runs: 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: | @@ -70,7 +74,9 @@ runs: make -j "$(nproc)" sudo make install sudo ldconfig + shell: bash - name: 'installation: Build GStreamer' working-directory: ecosystem/gstreamer_plugin run: | ./build.sh + shell: bash From 1a5b460ae6745c623febf75b00f3c48f4380a7a0 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 20:48:00 +0000 Subject: [PATCH 15/18] Remove Harden-Runner from build action file --- .github/actions/build/action.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 561ab453e..a193d4cbc 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -2,10 +2,6 @@ name: Build runs: using: composite 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: | From 7b8f6091029ebe59f14181deeb64f24edeeafb01 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 20:56:30 +0000 Subject: [PATCH 16/18] Move Harden-Runner step --- .github/workflows/nightly-tests.yml | 8 ++++---- .github/workflows/smoke-tests.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index b5d6ea853..354c372ad 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -9,6 +9,10 @@ jobs: 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: Checkout MTL' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -28,10 +32,6 @@ jobs: 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" diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index bc8d21ecc..1facc2124 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -16,6 +16,10 @@ jobs: 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: Checkout MTL' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -35,10 +39,6 @@ jobs: 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 choosen validation-test-port-p and validation-test-port-r' run: | eval "export TEST_PORT_P=TEST_VF_PORT_P_0" From 73709e08938aba515586fddc6cf611331ccbf144 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Thu, 11 Sep 2025 21:33:03 +0000 Subject: [PATCH 17/18] Move and update owner restoration step --- .github/actions/build/action.yml | 6 ------ .github/workflows/nightly-tests.yml | 3 +++ .github/workflows/smoke-tests.yml | 3 +++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index a193d4cbc..8a96c6a3a 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -2,12 +2,6 @@ name: Build runs: using: composite steps: - - name: 'preparation: Restore valid repository owner and print env' - if: always() - run: | - sudo chown -R "${USER}" "$(pwd)" || true - env | grep TEST_ || true - shell: bash - name: 'preparation: Checkout openh264' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index 354c372ad..83102b79d 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -56,6 +56,9 @@ jobs: - 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 + - name: Restore repository owner + run: | + sudo chown -R "${USER}" . - name: "upload report" if: always() id: upload-report diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 1facc2124..915b4493f 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -63,6 +63,9 @@ jobs: - name: 'execution: Run validation-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 smoke --template=html/index.html --report=report.html + - name: Restore repository owner + run: | + sudo chown -R "${USER}" . - name: "upload report" id: upload-report uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 From de26f91f08f6b4ee3e922593630650c93c5310fa Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Fri, 12 Sep 2025 09:12:09 +0000 Subject: [PATCH 18/18] Correct labels --- .github/linters/actionlint.yaml | 3 +-- .github/workflows/gtest-bare-metal.yml | 4 ++-- .github/workflows/validation-tests.yml | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/linters/actionlint.yaml b/.github/linters/actionlint.yaml index cb1ef8593..adf808e97 100644 --- a/.github/linters/actionlint.yaml +++ b/.github/linters/actionlint.yaml @@ -1,4 +1,3 @@ self-hosted-runner: labels: - - DPDK - - XDP \ No newline at end of file + - dpdk diff --git a/.github/workflows/gtest-bare-metal.yml b/.github/workflows/gtest-bare-metal.yml index 8f1d8892a..63207e936 100644 --- a/.github/workflows/gtest-bare-metal.yml +++ b/.github/workflows/gtest-bare-metal.yml @@ -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: @@ -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 diff --git a/.github/workflows/validation-tests.yml b/.github/workflows/validation-tests.yml index 94e106785..8715df9d7 100644 --- a/.github/workflows/validation-tests.yml +++ b/.github/workflows/validation-tests.yml @@ -114,7 +114,7 @@ permissions: jobs: validation-build-mtl: - runs-on: [Linux, self-hosted, DPDK] + runs-on: [self-hosted, linux, x64, dpdk] timeout-minutes: 60 outputs: pipenv-activate: ${{ steps.pipenv-install.outputs.VIRTUAL_ENV }} @@ -194,7 +194,7 @@ jobs: # Timeout of this job is set to 12h [60m/h*12h=720m] validation-run-tests: needs: [validation-build-mtl] - runs-on: [Linux, self-hosted, DPDK] + runs-on: [self-hosted, linux, x64, dpdk] timeout-minutes: 720 env: PYTEST_ALIAS: 'sudo --preserve-env python3 -m pipenv run pytest'