From 24814f6c97d73e995668994e2106da1de989cf8c Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Tue, 16 Sep 2025 08:35:25 +0000 Subject: [PATCH 1/8] Remove unnecessary workspace reference --- .github/workflows/base_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/base_build.yml b/.github/workflows/base_build.yml index d9027ca5e..d0c26c5c8 100644 --- a/.github/workflows/base_build.yml +++ b/.github/workflows/base_build.yml @@ -71,7 +71,7 @@ jobs: uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: mtl-release-bin - path: '${{ github.workspace }}/build/' + path: 'build/' ubuntu-ebpf-xdp-build: needs: changes From 3cb180ef5251a50685154ad6483f7a81868a3d0e Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Tue, 16 Sep 2025 08:36:07 +0000 Subject: [PATCH 2/8] Add GStreamer plugin, FFmpeg and RxTxApp artifacts --- .github/workflows/base_build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/base_build.yml b/.github/workflows/base_build.yml index d0c26c5c8..5a2e0d452 100644 --- a/.github/workflows/base_build.yml +++ b/.github/workflows/base_build.yml @@ -71,7 +71,11 @@ jobs: uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: mtl-release-bin - path: 'build/' + path: | + 'build/' + 'ecosystem/gstreamer_plugin/builddir/' + 'FFmpeg/' + 'tests/tools/RxTxApp/build/' ubuntu-ebpf-xdp-build: needs: changes From 4e282ae06c1237089aa314a1bc2fb4295ed304f1 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Wed, 17 Sep 2025 09:13:23 +0000 Subject: [PATCH 3/8] Remove single quotes --- .github/workflows/base_build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/base_build.yml b/.github/workflows/base_build.yml index 5a2e0d452..38c2abd4d 100644 --- a/.github/workflows/base_build.yml +++ b/.github/workflows/base_build.yml @@ -72,10 +72,10 @@ jobs: with: name: mtl-release-bin path: | - 'build/' - 'ecosystem/gstreamer_plugin/builddir/' - 'FFmpeg/' - 'tests/tools/RxTxApp/build/' + build/ + ecosystem/gstreamer_plugin/builddir/ + FFmpeg/ + tests/tools/RxTxApp/build/ ubuntu-ebpf-xdp-build: needs: changes From e43a2dd3f75d70af2a5faace21084f32d82401da Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Mon, 22 Sep 2025 08:37:31 +0000 Subject: [PATCH 4/8] Remove GPU Direct Library from artifacts build --- .github/workflows/base_build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/base_build.yml b/.github/workflows/base_build.yml index 38c2abd4d..dda1c71c2 100644 --- a/.github/workflows/base_build.yml +++ b/.github/workflows/base_build.yml @@ -19,7 +19,7 @@ env: CICD_BUILD_BUILD_ICE_DRIVER: 0 SETUP_BUILD_AND_INSTALL_DPDK: 1 SETUP_BUILD_AND_INSTALL_EBPF_XDP: 0 - SETUP_BUILD_AND_INSTALL_GPU_DIRECT: 1 + SETUP_BUILD_AND_INSTALL_GPU_DIRECT: 0 HOOK_RUST: 1 HOOK_PYTHON: 1 ECOSYSTEM_BUILD_AND_INSTALL_FFMPEG_PLUGIN: 1 @@ -94,4 +94,5 @@ jobs: run: sudo -E .github/scripts/setup_environment.sh env: SETUP_BUILD_AND_INSTALL_EBPF_XDP: 1 + SETUP_BUILD_AND_INSTALL_GPU_DIRECT: 1 TOOLS_BUILD_AND_INSTALL_MTL_MONITORS: 1 From cce569c37f95cdf50aa61b9feb649469c2ad2be3 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Mon, 22 Sep 2025 11:04:26 +0000 Subject: [PATCH 5/8] Change Ubuntu version --- .github/workflows/base_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/base_build.yml b/.github/workflows/base_build.yml index dda1c71c2..950ff0402 100644 --- a/.github/workflows/base_build.yml +++ b/.github/workflows/base_build.yml @@ -35,7 +35,7 @@ permissions: contents: read jobs: changes: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 permissions: pull-requests: read outputs: @@ -54,7 +54,7 @@ jobs: ubuntu-build: needs: changes if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.changes.outputs.ubuntu_build == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 60 steps: - name: Harden Runner @@ -80,7 +80,7 @@ jobs: ubuntu-ebpf-xdp-build: needs: changes if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.changes.outputs.ubuntu_build == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 timeout-minutes: 60 steps: - name: Harden Runner From 5b00460a56ae38c34b0eacac14fdcd90d71bf849 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Mon, 22 Sep 2025 13:25:30 +0000 Subject: [PATCH 6/8] Add temporary install directory for FFmpeg --- .github/scripts/setup_environment.sh | 1 + .github/workflows/base_build.yml | 6 +++++- ecosystem/ffmpeg_plugin/build.sh | 12 +++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/scripts/setup_environment.sh b/.github/scripts/setup_environment.sh index a6672b261..2608b4293 100755 --- a/.github/scripts/setup_environment.sh +++ b/.github/scripts/setup_environment.sh @@ -40,6 +40,7 @@ set -xe # CICD ONLY ARGUMENTS : "${CICD_BUILD:=0}" : "${CICD_BUILD_BUILD_ICE_DRIVER:=0}" +: "${INSTALL_DIR:=''}" script_name=$(basename "${BASH_SOURCE[0]}") script_path=$(readlink -qe "${BASH_SOURCE[0]}") diff --git a/.github/workflows/base_build.yml b/.github/workflows/base_build.yml index 950ff0402..20597ec6b 100644 --- a/.github/workflows/base_build.yml +++ b/.github/workflows/base_build.yml @@ -30,6 +30,7 @@ env: TOOLS_BUILD_AND_INSTALL_MTL_MONITORS: 0 TOOLS_BUILD_AND_INSTALL_MTL_READCAP: 1 TOOLS_BUILD_AND_INSTALL_MTL_CPU_EMULATOR: 1 + INSTALL_DIR: '' permissions: contents: read @@ -62,6 +63,9 @@ jobs: with: egress-policy: audit + - name: 'Create temporary install directory' + run: 'echo "INSTALL_DIR=$(mktemp -d --tmpdir mtl-XXXXXXXXXX)" >> "$GITHUB_ENV"' + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Build Release @@ -74,8 +78,8 @@ jobs: path: | build/ ecosystem/gstreamer_plugin/builddir/ - FFmpeg/ tests/tools/RxTxApp/build/ + ${{ env.INSTALL_DIR }}/ffmpeg/ ubuntu-ebpf-xdp-build: needs: changes diff --git a/ecosystem/ffmpeg_plugin/build.sh b/ecosystem/ffmpeg_plugin/build.sh index a525cf332..d3eba20d5 100755 --- a/ecosystem/ffmpeg_plugin/build.sh +++ b/ecosystem/ffmpeg_plugin/build.sh @@ -5,10 +5,13 @@ set -e +: "${INSTALL_DIR:=''}" + # Default values ffmpeg_ver="7.0" enable_gpu=false script_path="$(dirname "$(readlink -f "$0")")" +extra_config_flags="" # Help message function usage() { @@ -65,9 +68,12 @@ build_ffmpeg() { if [ "$enable_gpu" = true ]; then echo "Building with MTL_GPU_DIRECT_ENABLED" - extra_config_flags="--extra-cflags=-DMTL_GPU_DIRECT_ENABLED" - else - extra_config_flags="" + extra_config_flags+="--extra-cflags=-DMTL_GPU_DIRECT_ENABLED " + fi + + if [ -n "$INSTALL_DIR" ]; then + echo "Installing in $INSTALL_DIR" + extra_config_flags+="--prefix=${INSTALL_DIR}/ffmpeg/" fi ./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl $extra_config_flags From 393abf4a30bc366cab851debbb7c065073892cf2 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Tue, 23 Sep 2025 11:32:20 +0000 Subject: [PATCH 7/8] Remove incompatible pre-installed packages --- .github/workflows/base_build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/base_build.yml b/.github/workflows/base_build.yml index 20597ec6b..12a192307 100644 --- a/.github/workflows/base_build.yml +++ b/.github/workflows/base_build.yml @@ -66,6 +66,9 @@ jobs: - name: 'Create temporary install directory' run: 'echo "INSTALL_DIR=$(mktemp -d --tmpdir mtl-XXXXXXXXXX)" >> "$GITHUB_ENV"' + - name: 'Remove incompatible pre-installed packages' + run: 'sudo apt remove libunwind-*' + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Build Release @@ -92,6 +95,9 @@ jobs: with: egress-policy: audit + - name: 'Remove incompatible pre-installed packages' + run: 'sudo apt remove libunwind-*' + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: ebpf-xdp build From cc379fa0678dabe3f520d7f1d1d7af5a44421bf3 Mon Sep 17 00:00:00 2001 From: Pawel Staszczuk <41273017+staszczuk@users.noreply.github.com> Date: Wed, 24 Sep 2025 08:02:14 +0000 Subject: [PATCH 8/8] Add double quotes and curly brackets around variable --- ecosystem/ffmpeg_plugin/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/ffmpeg_plugin/build.sh b/ecosystem/ffmpeg_plugin/build.sh index d3eba20d5..7103c5752 100755 --- a/ecosystem/ffmpeg_plugin/build.sh +++ b/ecosystem/ffmpeg_plugin/build.sh @@ -76,7 +76,7 @@ build_ffmpeg() { extra_config_flags+="--prefix=${INSTALL_DIR}/ffmpeg/" fi - ./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl $extra_config_flags + ./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl "${extra_config_flags}" make -j "$(nproc)" sudo make install sudo ldconfig