Skip to content

Commit 430d258

Browse files
authored
Move utilities from .github/scripts/ into packaging/ (#162)
1 parent f023db8 commit 430d258

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

.github/scripts/assert_ffmpeg_not_installed.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/build_ffmpeg.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
export FFMPEG_VERSION="${{ matrix.ffmpeg-version }}"
3434
export FFMPEG_ROOT="${PWD}/ffmpeg"
3535
36-
.github/scripts/build_ffmpeg.sh
36+
packaging/build_ffmpeg.sh
3737
3838
tar -czf ffmpeg.tar.gz ffmpeg/include ffmpeg/lib
3939

.github/workflows/wheel.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ jobs:
9494
# but we need to checkout the repo to access this file, and we don't
9595
# want to checkout the repo before installing the wheel to avoid any
9696
# side-effect. It's OK.
97-
.github/scripts/assert_ffmpeg_not_installed.sh
97+
source packaging/helpers.sh
98+
assert_ffmpeg_not_installed
9899
99100
conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge
100101
ffmpeg -version
File renamed without changes.
File renamed without changes.

.github/scripts/helpers.sh renamed to packaging/helpers.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ assert_in_wheel() {
2525
exit 1
2626
fi
2727
}
28+
29+
assert_ffmpeg_not_installed() {
30+
if command -v "ffmpeg" &> /dev/null
31+
then
32+
echo "ffmpeg is installed, but it shouldn't! Exiting!!"
33+
exit 1
34+
fi
35+
}

packaging/post_build_script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
source .github/scripts/helpers.sh
3+
source packaging/helpers.sh
44

55
wheel_path=$(pwd)/$(find dist -type f -name "*.whl")
66
echo "Wheel content:"
@@ -24,7 +24,7 @@ assert_not_in_wheel $wheel_path "^packaging"
2424
extracted_wheel_dir=$(mktemp -d)
2525
unzip -q $wheel_path -d $extracted_wheel_dir
2626
symbols_matches=$(find $extracted_wheel_dir | grep ".so$" | xargs objdump --syms | grep GLIBCXX_3.4.)
27-
python .github/scripts/check_glibcxx.py "$symbols_matches"
27+
python packaging/check_glibcxx.py "$symbols_matches"
2828

2929
echo "ls dist"
3030
ls dist

0 commit comments

Comments
 (0)