未验证 提交 8880543c 编写于 作者: A Andrey Senyaev 提交者: GitHub

Merge pull request #632 from asenyaev/asen/fix_current_builds

Defined ffmpeg version for MacOS and Windows Server version in Github Actions
...@@ -55,6 +55,7 @@ jobs: ...@@ -55,6 +55,7 @@ jobs:
USE_CCACHE: 1 USE_CCACHE: 1
UNICODE_WIDTH: 32 UNICODE_WIDTH: 32
PLAT: x86_64 PLAT: x86_64
FFMPEG_FORMULA_VERSION: '@4'
SDIST: ${{ matrix.build_sdist || 0 }} SDIST: ${{ matrix.build_sdist || 0 }}
ENABLE_HEADLESS: ${{ matrix.without_gui }} ENABLE_HEADLESS: ${{ matrix.without_gui }}
ENABLE_CONTRIB: ${{ matrix.with_contrib }} ENABLE_CONTRIB: ${{ matrix.with_contrib }}
......
...@@ -21,7 +21,7 @@ jobs: ...@@ -21,7 +21,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [windows-latest] os: [windows-2019]
python-version: ['3.6'] python-version: ['3.6']
platform: [x86, x64] platform: [x86, x64]
with_contrib: [0, 1] with_contrib: [0, 1]
...@@ -53,7 +53,7 @@ jobs: ...@@ -53,7 +53,7 @@ jobs:
architecture: ${{ matrix.platform }} architecture: ${{ matrix.platform }}
- name: Setup MSBuild.exe - name: Setup MSBuild.exe
uses: warrenbuckley/Setup-MSBuild@v1 uses: microsoft/setup-msbuild@v1.1
- name: Build a package - name: Build a package
run: | run: |
...@@ -86,7 +86,7 @@ jobs: ...@@ -86,7 +86,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [windows-latest] os: [windows-2019]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
platform: [x86, x64] platform: [x86, x64]
with_contrib: [0, 1] with_contrib: [0, 1]
......
...@@ -50,7 +50,7 @@ if [ -n "$IS_OSX" ]; then ...@@ -50,7 +50,7 @@ if [ -n "$IS_OSX" ]; then
function generate_ffmpeg_formula { function generate_ffmpeg_formula {
local FF="ffmpeg" local FF="ffmpeg"
local LFF="ffmpeg_opencv" local LFF="ffmpeg_opencv"
local FF_FORMULA; FF_FORMULA=$(brew formula "$FF") local FF_FORMULA; FF_FORMULA=$(brew formula "${FF}${FFMPEG_FORMULA_VERSION}")
local LFF_FORMULA; LFF_FORMULA="$(dirname "$FF_FORMULA")/${LFF}.rb" local LFF_FORMULA; LFF_FORMULA="$(dirname "$FF_FORMULA")/${LFF}.rb"
local REGENERATE local REGENERATE
...@@ -70,8 +70,9 @@ if [ -n "$IS_OSX" ]; then ...@@ -70,8 +70,9 @@ if [ -n "$IS_OSX" ]; then
if [ -n "$REGENERATE" ]; then if [ -n "$REGENERATE" ]; then
echo "Regenerating custom ffmpeg formula" echo "Regenerating custom ffmpeg formula"
# Bottle block syntax: https://docs.brew.sh/Bottles#bottle-dsl-domain-specific-language # Bottle block syntax: https://docs.brew.sh/Bottles#bottle-dsl-domain-specific-language
# FfmpegAT4 is a class in ffmpeg@4 formula
perl -wpe 'BEGIN {our ($found_blank, $bottle_block);} perl -wpe 'BEGIN {our ($found_blank, $bottle_block);}
if (/(^class )(Ffmpeg)(\s.*)/) {$_=$1.$2."Opencv".$3."\n"; next;} if (/(^class )(FfmpegAT4)(\s.*)/) {$_=$1."FfmpegOpencv".$3."\n"; next;}
if (!$found_blank && /^$/) {$_.="conflicts_with \"ffmpeg\"\n\n"; $found_blank=1; next;} if (!$found_blank && /^$/) {$_.="conflicts_with \"ffmpeg\"\n\n"; $found_blank=1; next;}
if (!$bottle_block && /^\s*bottle do$/) { $bottle_block=1; next; } if (!$bottle_block && /^\s*bottle do$/) { $bottle_block=1; next; }
if ($bottle_block) { if (/^\s*end\s*$/) { $bottle_block=0} elsif (/^\s*sha256\s/) {$_=""} next; } if ($bottle_block) { if (/^\s*end\s*$/) { $bottle_block=0} elsif (/^\s*sha256\s/) {$_=""} next; }
...@@ -111,34 +112,14 @@ function pre_build { ...@@ -111,34 +112,14 @@ function pre_build {
CACHE_STAGE= CACHE_STAGE=
export HOMEBREW_NO_AUTO_UPDATE=1 export HOMEBREW_NO_AUTO_UPDATE=1
#after the cache stage, all bottles and Homebrew metadata should be already cached locally
# if [ -n "$CACHE_STAGE" ]; then
# brew update
# generate_ffmpeg_formula
# brew_add_local_bottles
# fi
echo 'Installing FFmpeg' echo 'Installing FFmpeg'
# if [ -n "$CACHE_STAGE" ]; then brew update
# brew_install_and_cache_within_time_limit ffmpeg_opencv || { [ $? -gt 1 ] && return 2 || return 0; } generate_ffmpeg_formula
# else brew_add_local_bottles
brew update brew install --build-bottle ffmpeg_opencv
generate_ffmpeg_formula # It needs when we use not the latest ffmpeg formula
brew_add_local_bottles brew link ffmpeg_opencv
# brew unlink python@2
brew install --build-bottle ffmpeg_opencv
# fi
# echo 'Installing qt5'
# if [ -n "$CACHE_STAGE" ]; then
# echo "Qt5 has bottle, no caching needed"
# else
# brew switch qt 5.13.2
# brew pin qt
# export PATH="/usr/local/opt/qt/bin:$PATH"
# fi
if [ -n "$CACHE_STAGE" ]; then if [ -n "$CACHE_STAGE" ]; then
brew_go_bootstrap_mode 0 brew_go_bootstrap_mode 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册