Skip to content

Commit 84748da

Browse files
committed
Add temporary install directory for FFmpeg
1 parent 78f895d commit 84748da

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.github/scripts/setup_environment.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ set -xe
4040
# CICD ONLY ARGUMENTS
4141
: "${CICD_BUILD:=0}"
4242
: "${CICD_BUILD_BUILD_ICE_DRIVER:=0}"
43+
: "${INSTALL_DIR:=''}"
4344

4445
script_name=$(basename "${BASH_SOURCE[0]}")
4546
script_path=$(readlink -qe "${BASH_SOURCE[0]}")

.github/workflows/base_build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ env:
3030
TOOLS_BUILD_AND_INSTALL_MTL_MONITORS: 0
3131
TOOLS_BUILD_AND_INSTALL_MTL_READCAP: 1
3232
TOOLS_BUILD_AND_INSTALL_MTL_CPU_EMULATOR: 1
33+
INSTALL_DIR: ''
3334

3435
permissions:
3536
contents: read
@@ -62,6 +63,9 @@ jobs:
6263
with:
6364
egress-policy: audit
6465

66+
- name: 'Create temporary install directory'
67+
run: 'echo "INSTALL_DIR=$(mktemp -d --tmpdir mtl-XXXXXXXXXX)" >> "$GITHUB_ENV"'
68+
6569
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6670

6771
- name: Build Release
@@ -74,8 +78,8 @@ jobs:
7478
path: |
7579
build/
7680
ecosystem/gstreamer_plugin/builddir/
77-
FFmpeg/
7881
tests/tools/RxTxApp/build/
82+
${{ env.INSTALL_DIR }}/ffmpeg/
7983
8084
ubuntu-ebpf-xdp-build:
8185
needs: changes

ecosystem/ffmpeg_plugin/build.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55

66
set -e
77

8+
: "${INSTALL_DIR:=''}"
9+
810
# Default values
911
ffmpeg_ver="7.0"
1012
enable_gpu=false
1113
script_path="$(dirname "$(readlink -f "$0")")"
14+
extra_config_flags=""
1215

1316
# Help message function
1417
usage() {
@@ -65,9 +68,12 @@ build_ffmpeg() {
6568

6669
if [ "$enable_gpu" = true ]; then
6770
echo "Building with MTL_GPU_DIRECT_ENABLED"
68-
extra_config_flags="--extra-cflags=-DMTL_GPU_DIRECT_ENABLED"
69-
else
70-
extra_config_flags=""
71+
extra_config_flags+="--extra-cflags=-DMTL_GPU_DIRECT_ENABLED "
72+
fi
73+
74+
if [ -n "$INSTALL_DIR" ]; then
75+
echo "Installing in $INSTALL_DIR"
76+
extra_config_flags+="--prefix=${INSTALL_DIR}/ffmpeg/"
7177
fi
7278

7379
./configure --enable-shared --disable-static --enable-nonfree --enable-pic --enable-gpl --enable-libopenh264 --enable-encoder=libopenh264 --enable-mtl $extra_config_flags

0 commit comments

Comments
 (0)