Skip to content

Commit 9c8ebec

Browse files
committed
check if there is enough time to build FFmpeg without cache
1 parent 3137b3e commit 9c8ebec

File tree

3 files changed

+17
-95
lines changed

3 files changed

+17
-95
lines changed

.travis.yml

Lines changed: 16 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -32,32 +32,6 @@ jobs:
3232
exclude:
3333
- language: ruby
3434
include:
35-
- os: osx
36-
env:
37-
- MB_PYTHON_VERSION=3.8
38-
language: generic
39-
osx_image: xcode9.4
40-
stage: s1
41-
workspaces:
42-
create:
43-
name: brew_cache
44-
paths:
45-
# https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
46-
- $HOME/Library/Caches/Homebrew
47-
- /usr/local/Homebrew/
48-
# used in OSX custom build script dealing with local bottle caching
49-
- $HOME/local_bottle_metadata
50-
#workspaces share within the same build, cache shares between builds
51-
cache:
52-
directories:
53-
# `cache: ccache: true` has no effect if `language:` is not `c` or `cpp`
54-
- $HOME/.ccache
55-
# https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
56-
- $HOME/Library/Caches/Homebrew
57-
- /usr/local/Homebrew/
58-
# used in OSX custom build script dealing with local bottle caching
59-
- $HOME/local_bottle_metadata
60-
6135
# source distributions
6236
- os: linux
6337
stage: s1
@@ -111,8 +85,7 @@ jobs:
11185
- ENABLE_CONTRIB=0
11286
- ENABLE_HEADLESS=0
11387
- TEST_DEPENDS=numpy==1.13.3
114-
workspaces:
115-
use: brew_cache
88+
11689
- os: osx
11790
language: generic
11891
osx_image: xcode9.4
@@ -121,8 +94,7 @@ jobs:
12194
- ENABLE_CONTRIB=0
12295
- ENABLE_HEADLESS=0
12396
- TEST_DEPENDS=numpy==1.14.5
124-
workspaces:
125-
use: brew_cache
97+
12698
- os: osx
12799
language: generic
128100
osx_image: xcode9.4
@@ -131,8 +103,7 @@ jobs:
131103
- ENABLE_CONTRIB=0
132104
- ENABLE_HEADLESS=0
133105
- TEST_DEPENDS=numpy==1.17.3
134-
workspaces:
135-
use: brew_cache
106+
136107
- os: osx
137108
language: generic
138109
osx_image: xcode9.4
@@ -141,8 +112,7 @@ jobs:
141112
- ENABLE_CONTRIB=0
142113
- ENABLE_HEADLESS=0
143114
- TEST_DEPENDS=numpy==1.19.3
144-
workspaces:
145-
use: brew_cache
115+
146116

147117
# headless builds for MacOS
148118
- os: osx
@@ -153,8 +123,7 @@ jobs:
153123
- ENABLE_CONTRIB=0
154124
- ENABLE_HEADLESS=1
155125
- TEST_DEPENDS=numpy==1.13.3
156-
workspaces:
157-
use: brew_cache
126+
158127
- os: osx
159128
language: generic
160129
osx_image: xcode9.4
@@ -163,8 +132,7 @@ jobs:
163132
- ENABLE_CONTRIB=0
164133
- ENABLE_HEADLESS=1
165134
- TEST_DEPENDS=numpy==1.14.5
166-
workspaces:
167-
use: brew_cache
135+
168136
- os: osx
169137
language: generic
170138
osx_image: xcode9.4
@@ -173,8 +141,7 @@ jobs:
173141
- ENABLE_CONTRIB=0
174142
- ENABLE_HEADLESS=1
175143
- TEST_DEPENDS=numpy==1.17.3
176-
workspaces:
177-
use: brew_cache
144+
178145
- os: osx
179146
language: generic
180147
osx_image: xcode9.4
@@ -183,8 +150,7 @@ jobs:
183150
- ENABLE_CONTRIB=0
184151
- ENABLE_HEADLESS=1
185152
- TEST_DEPENDS=numpy==1.19.3
186-
workspaces:
187-
use: brew_cache
153+
188154

189155
# Contrib builds for MacOS
190156
- os: osx
@@ -195,8 +161,7 @@ jobs:
195161
- ENABLE_CONTRIB=1
196162
- ENABLE_HEADLESS=0
197163
- TEST_DEPENDS=numpy==1.13.3
198-
workspaces:
199-
use: brew_cache
164+
200165
- os: osx
201166
language: generic
202167
osx_image: xcode9.4
@@ -205,8 +170,7 @@ jobs:
205170
- ENABLE_CONTRIB=1
206171
- ENABLE_HEADLESS=0
207172
- TEST_DEPENDS=numpy==1.14.5
208-
workspaces:
209-
use: brew_cache
173+
210174
- os: osx
211175
language: generic
212176
osx_image: xcode9.4
@@ -215,8 +179,7 @@ jobs:
215179
- ENABLE_CONTRIB=1
216180
- ENABLE_HEADLESS=0
217181
- TEST_DEPENDS=numpy==1.17.3
218-
workspaces:
219-
use: brew_cache
182+
220183
- os: osx
221184
language: generic
222185
osx_image: xcode9.4
@@ -225,8 +188,7 @@ jobs:
225188
- ENABLE_CONTRIB=1
226189
- ENABLE_HEADLESS=0
227190
- TEST_DEPENDS=numpy==1.19.3
228-
workspaces:
229-
use: brew_cache
191+
230192

231193
# headless contrib builds for MacOS
232194
- os: osx
@@ -237,8 +199,7 @@ jobs:
237199
- ENABLE_CONTRIB=1
238200
- ENABLE_HEADLESS=1
239201
- TEST_DEPENDS=numpy==1.13.3
240-
workspaces:
241-
use: brew_cache
202+
242203
- os: osx
243204
language: generic
244205
osx_image: xcode9.4
@@ -247,8 +208,7 @@ jobs:
247208
- ENABLE_CONTRIB=1
248209
- ENABLE_HEADLESS=1
249210
- TEST_DEPENDS=numpy==1.14.5
250-
workspaces:
251-
use: brew_cache
211+
252212
- os: osx
253213
language: generic
254214
osx_image: xcode9.4
@@ -257,8 +217,7 @@ jobs:
257217
- ENABLE_CONTRIB=1
258218
- ENABLE_HEADLESS=1
259219
- TEST_DEPENDS=numpy==1.17.3
260-
workspaces:
261-
use: brew_cache
220+
262221
- os: osx
263222
language: generic
264223
osx_image: xcode9.4
@@ -267,8 +226,7 @@ jobs:
267226
- ENABLE_CONTRIB=1
268227
- ENABLE_HEADLESS=1
269228
- TEST_DEPENDS=numpy==1.19.3
270-
workspaces:
271-
use: brew_cache
229+
272230

273231
# default builds for Linux
274232
- os: linux
@@ -925,24 +883,6 @@ before_install: |
925883
echo $ENABLE_CONTRIB > contrib.enabled
926884
echo $ENABLE_HEADLESS > headless.enabled
927885
928-
if [ -n "$IS_OSX" ]; then
929-
export PATH="/usr/local/sbin:$PATH"
930-
TAPS="$(brew --repository)/Library/Taps"
931-
if [ -e "$TAPS/caskroom/homebrew-cask" -a -e "$TAPS/homebrew/homebrew-cask" ]; then
932-
rm -rf "$TAPS/caskroom/homebrew-cask"
933-
fi
934-
find "$TAPS" -type d -name .git -exec \
935-
bash -xec '
936-
cd $(dirname '\''{}'\'') || echo "status: $?"
937-
git clean -fxd || echo "status: $?"
938-
sleep 1 || echo "status: $?"
939-
git status || echo "status: $?"' \; || echo "status: $?"
940-
brew_cache_cleanup
941-
fi
942-
echo "end"
943-
# Not interested in travis internal scripts' output
944-
fi
945-
946886
set +x
947887
948888
install: |
@@ -975,21 +915,6 @@ script: |
975915
trap ERR
976916
test "$rc" -eq 0
977917
978-
before_cache: |
979-
# Cleanup dirs to be cached
980-
set -e; set -x
981-
if [ -n "$IS_OSX" ]; then
982-
983-
# When Taps is cached, this dir causes "Error: file exists" on `brew update`
984-
if [ -e "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask" ]; then
985-
rm -rf "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask"
986-
fi
987-
988-
brew_cache_cleanup
989-
990-
fi
991-
set +x; set +e
992-
993918
after_success: |
994919
# Upload wheels to pypi if tag is set
995920

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ A: No, the packages are special wheel binary packages and they already contain s
4949

5050
Since ``opencv-python`` version 4.3.0.\*, ``manylinux1`` wheels were replaced by ``manylinux2014`` wheels. If your pip is too old, it will try to use the new source distribution introduced in 4.3.0.38 to manually build OpenCV because it does not know how to install ``manylinux2014`` wheels. However, source build will also fail because of too old ``pip`` because it does not understand build dependencies in ``pyproject.toml``. To use the new ``manylinux2014`` pre-built wheels (or to build from source), your ``pip`` version must be >= 19.3. Please upgrade ``pip`` with ``pip install --upgrade pip``.
5151

52-
**Q: Pip install fails with ``Could not find a version that satisfies the requirement ...``?**
53-
54-
A: Most likely the issue is related to too old pip and can be fixed by running ``pip install --upgrade pip``. Note that the wheel (especially manylinux) format does not currently support properly ARM architecture so there are no packages for ARM based platforms in PyPI. However, ``opencv-python`` packages for Raspberry Pi can be found from https://www.piwheels.org/.
55-
5652
**Q: Import fails on Windows: ``ImportError: DLL load failed: The specified module could not be found.``?**
5753

5854
A: If the import fails on Windows, make sure you have [Visual C++ redistributable 2015](https://www.microsoft.com/en-us/download/details.aspx?id=48145) installed. If you are using older Windows version than Windows 10 and latest system updates are not installed, [Universal C Runtime](https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows) might be also required.

travis_config.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ function pre_build {
111111
brew_install_and_cache_within_time_limit ffmpeg_opencv || { [ $? -gt 1 ] && return 2 || return 0; }
112112
else
113113
brew unlink python@2
114+
generate_ffmpeg_formula
114115
brew install ffmpeg_opencv
115116
fi
116117

0 commit comments

Comments
 (0)