diff --git a/.github/scripts/assert_ffmpeg_not_installed.sh b/.github/scripts/assert_ffmpeg_not_installed.sh deleted file mode 100755 index 67f3a9cc1..000000000 --- a/.github/scripts/assert_ffmpeg_not_installed.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -if command -v "ffmpeg" &> /dev/null -then - echo "ffmpeg is installed, but it shouldn't! Exiting!!" - exit 1 -fi diff --git a/.github/workflows/build_ffmpeg.yaml b/.github/workflows/build_ffmpeg.yaml index 1078de9f1..4adf3ab7a 100644 --- a/.github/workflows/build_ffmpeg.yaml +++ b/.github/workflows/build_ffmpeg.yaml @@ -33,7 +33,7 @@ jobs: export FFMPEG_VERSION="${{ matrix.ffmpeg-version }}" export FFMPEG_ROOT="${PWD}/ffmpeg" - .github/scripts/build_ffmpeg.sh + packaging/build_ffmpeg.sh tar -czf ffmpeg.tar.gz ffmpeg/include ffmpeg/lib diff --git a/.github/workflows/wheel.yaml b/.github/workflows/wheel.yaml index 69dc66a83..00dc3da63 100644 --- a/.github/workflows/wheel.yaml +++ b/.github/workflows/wheel.yaml @@ -94,7 +94,8 @@ jobs: # but we need to checkout the repo to access this file, and we don't # want to checkout the repo before installing the wheel to avoid any # side-effect. It's OK. - .github/scripts/assert_ffmpeg_not_installed.sh + source packaging/helpers.sh + assert_ffmpeg_not_installed conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge ffmpeg -version diff --git a/.github/scripts/build_ffmpeg.sh b/packaging/build_ffmpeg.sh similarity index 100% rename from .github/scripts/build_ffmpeg.sh rename to packaging/build_ffmpeg.sh diff --git a/.github/scripts/check_glibcxx.py b/packaging/check_glibcxx.py similarity index 100% rename from .github/scripts/check_glibcxx.py rename to packaging/check_glibcxx.py diff --git a/.github/scripts/helpers.sh b/packaging/helpers.sh similarity index 79% rename from .github/scripts/helpers.sh rename to packaging/helpers.sh index e73d38549..16562f674 100644 --- a/.github/scripts/helpers.sh +++ b/packaging/helpers.sh @@ -25,3 +25,11 @@ assert_in_wheel() { exit 1 fi } + +assert_ffmpeg_not_installed() { + if command -v "ffmpeg" &> /dev/null + then + echo "ffmpeg is installed, but it shouldn't! Exiting!!" + exit 1 + fi +} diff --git a/packaging/post_build_script.sh b/packaging/post_build_script.sh index 688d88771..84686d84f 100755 --- a/packaging/post_build_script.sh +++ b/packaging/post_build_script.sh @@ -1,6 +1,6 @@ #!/bin/bash -source .github/scripts/helpers.sh +source packaging/helpers.sh wheel_path=$(pwd)/$(find dist -type f -name "*.whl") echo "Wheel content:" @@ -24,7 +24,7 @@ assert_not_in_wheel $wheel_path "^packaging" extracted_wheel_dir=$(mktemp -d) unzip -q $wheel_path -d $extracted_wheel_dir symbols_matches=$(find $extracted_wheel_dir | grep ".so$" | xargs objdump --syms | grep GLIBCXX_3.4.) -python .github/scripts/check_glibcxx.py "$symbols_matches" +python packaging/check_glibcxx.py "$symbols_matches" echo "ls dist" ls dist