Skip to content
Draft
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
1 change: 1 addition & 0 deletions .github/scripts/setup_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]}")
Expand Down
25 changes: 20 additions & 5 deletions .github/workflows/base_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -54,14 +55,20 @@ 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
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
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
Expand All @@ -71,23 +78,31 @@ 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
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
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
14 changes: 10 additions & 4 deletions ecosystem/ffmpeg_plugin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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
Expand Down
Loading