Skip to content

Commit 8880543

Browse files
authored
Merge pull request #632 from asenyaev/asen/fix_current_builds
Defined ffmpeg version for MacOS and Windows Server version in Github Actions
2 parents 209d32e + 602a8be commit 8880543

File tree

3 files changed

+13
-31
lines changed

3 files changed

+13
-31
lines changed

.github/workflows/build_wheels_macos.yml

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
USE_CCACHE: 1
5656
UNICODE_WIDTH: 32
5757
PLAT: x86_64
58+
FFMPEG_FORMULA_VERSION: '@4'
5859
SDIST: ${{ matrix.build_sdist || 0 }}
5960
ENABLE_HEADLESS: ${{ matrix.without_gui }}
6061
ENABLE_CONTRIB: ${{ matrix.with_contrib }}

.github/workflows/build_wheels_windows.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
os: [windows-latest]
24+
os: [windows-2019]
2525
python-version: ['3.6']
2626
platform: [x86, x64]
2727
with_contrib: [0, 1]
@@ -53,7 +53,7 @@ jobs:
5353
architecture: ${{ matrix.platform }}
5454

5555
- name: Setup MSBuild.exe
56-
uses: warrenbuckley/Setup-MSBuild@v1
56+
uses: microsoft/setup-msbuild@v1.1
5757

5858
- name: Build a package
5959
run: |
@@ -86,7 +86,7 @@ jobs:
8686
strategy:
8787
fail-fast: false
8888
matrix:
89-
os: [windows-latest]
89+
os: [windows-2019]
9090
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
9191
platform: [x86, x64]
9292
with_contrib: [0, 1]

travis_config.sh

+9-28
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if [ -n "$IS_OSX" ]; then
5050
function generate_ffmpeg_formula {
5151
local FF="ffmpeg"
5252
local LFF="ffmpeg_opencv"
53-
local FF_FORMULA; FF_FORMULA=$(brew formula "$FF")
53+
local FF_FORMULA; FF_FORMULA=$(brew formula "${FF}${FFMPEG_FORMULA_VERSION}")
5454
local LFF_FORMULA; LFF_FORMULA="$(dirname "$FF_FORMULA")/${LFF}.rb"
5555

5656
local REGENERATE
@@ -70,8 +70,9 @@ if [ -n "$IS_OSX" ]; then
7070
if [ -n "$REGENERATE" ]; then
7171
echo "Regenerating custom ffmpeg formula"
7272
# Bottle block syntax: https://docs.brew.sh/Bottles#bottle-dsl-domain-specific-language
73+
# FfmpegAT4 is a class in ffmpeg@4 formula
7374
perl -wpe 'BEGIN {our ($found_blank, $bottle_block);}
74-
if (/(^class )(Ffmpeg)(\s.*)/) {$_=$1.$2."Opencv".$3."\n"; next;}
75+
if (/(^class )(FfmpegAT4)(\s.*)/) {$_=$1."FfmpegOpencv".$3."\n"; next;}
7576
if (!$found_blank && /^$/) {$_.="conflicts_with \"ffmpeg\"\n\n"; $found_blank=1; next;}
7677
if (!$bottle_block && /^\s*bottle do$/) { $bottle_block=1; next; }
7778
if ($bottle_block) { if (/^\s*end\s*$/) { $bottle_block=0} elsif (/^\s*sha256\s/) {$_=""} next; }
@@ -111,34 +112,14 @@ function pre_build {
111112
CACHE_STAGE=
112113
export HOMEBREW_NO_AUTO_UPDATE=1
113114

114-
#after the cache stage, all bottles and Homebrew metadata should be already cached locally
115-
# if [ -n "$CACHE_STAGE" ]; then
116-
# brew update
117-
# generate_ffmpeg_formula
118-
# brew_add_local_bottles
119-
# fi
120-
121115
echo 'Installing FFmpeg'
122116

123-
# if [ -n "$CACHE_STAGE" ]; then
124-
# brew_install_and_cache_within_time_limit ffmpeg_opencv || { [ $? -gt 1 ] && return 2 || return 0; }
125-
# else
126-
brew update
127-
generate_ffmpeg_formula
128-
brew_add_local_bottles
129-
# brew unlink python@2
130-
brew install --build-bottle ffmpeg_opencv
131-
# fi
132-
133-
# echo 'Installing qt5'
134-
135-
# if [ -n "$CACHE_STAGE" ]; then
136-
# echo "Qt5 has bottle, no caching needed"
137-
# else
138-
# brew switch qt 5.13.2
139-
# brew pin qt
140-
# export PATH="/usr/local/opt/qt/bin:$PATH"
141-
# fi
117+
brew update
118+
generate_ffmpeg_formula
119+
brew_add_local_bottles
120+
brew install --build-bottle ffmpeg_opencv
121+
# It needs when we use not the latest ffmpeg formula
122+
brew link ffmpeg_opencv
142123

143124
if [ -n "$CACHE_STAGE" ]; then
144125
brew_go_bootstrap_mode 0

0 commit comments

Comments
 (0)