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 d9027ca5e..12a192307 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 @@ -30,12 +30,13 @@ 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 jobs: changes: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 permissions: pull-requests: read outputs: @@ -54,7 +55,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 @@ -62,6 +63,12 @@ jobs: with: egress-policy: audit + - 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 @@ -71,12 +78,16 @@ jobs: uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: mtl-release-bin - path: '${{ github.workspace }}/build/' + path: | + build/ + ecosystem/gstreamer_plugin/builddir/ + tests/tools/RxTxApp/build/ + ${{ env.INSTALL_DIR }}/ffmpeg/ 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 @@ -84,10 +95,14 @@ 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 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 diff --git a/ecosystem/ffmpeg_plugin/build.sh b/ecosystem/ffmpeg_plugin/build.sh index a525cf332..7103c5752 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,12 +68,15 @@ 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 + ./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