6
6
- USE_CCACHE=1
7
7
- PLAT=x86_64
8
8
- UNICODE_WIDTH=32
9
+
9
10
language : generic
11
+
10
12
sudo : required
13
+
11
14
services : docker
15
+
12
16
dist : trusty
17
+
13
18
git :
14
19
submodules : false
20
+
15
21
cache :
16
22
directories :
17
23
- " $HOME/Library/Caches/Homebrew"
18
24
- " /usr/local/Homebrew/"
19
25
- " $HOME/local_bottle_metadata"
20
26
- " $HOME/.ccache"
27
+
21
28
matrix :
22
29
fast_finish : true
23
30
include :
@@ -54,24 +61,47 @@ matrix:
54
61
cache :
55
62
directories : " $HOME/.ccache"
56
63
57
- before_install : " # Check out and prepare the source\n set -e\n # Multibuild doesn't
58
- have releases, so --depth would break eventually (see\n # https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)\n git
59
- submodule update --init multibuild\n source multibuild/common_utils.sh\n # https://github.com/matthew-brett/multibuild/issues/116\n if
60
- [[ \" $TRAVIS_OS_NAME\" == \" osx\" ]]; then export ARCH_FLAGS=\" \" ; fi\n source multibuild/travis_steps.sh\n #
61
- This sets -x\n source multibuild_customize.sh\n echo $ENABLE_CONTRIB > contrib.enabled\n echo
62
- $ENABLE_HEADLESS > headless.enabled\n\n if [ -n \" $IS_OSX\" ]; then\n TAPS=\" $(brew
63
- --repository)/Library/Taps\"\n if [ -e \" $TAPS/caskroom/homebrew-cask\" -a -e
64
- \" $TAPS/homebrew/homebrew-cask\" ]; then\n rm -rf \" $TAPS/caskroom/homebrew-cask\"\n
65
- \ fi\n find \" $TAPS\" -type d -name .git -exec \\\n bash -xec '\n
66
- \ cd $(dirname '\\ ''{}'\\ '')\n git clean -fxd\n git
67
- status' \\ ;\n \n brew_cache_cleanup\n fi\n\n before_install\n # Not
68
- interested in travis internal scripts' output\n set +x\n "
64
+ # The first line is printed in the folding header in Travis output
65
+ before_install : |
66
+ # Check out and prepare the source
67
+ set -e
68
+ # Multibuild doesn't have releases, so --depth would break eventually (see
69
+ # https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)
70
+ git submodule update --init multibuild
71
+ source multibuild/common_utils.sh
72
+ # https://github.com/matthew-brett/multibuild/issues/116
73
+ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi
74
+ source multibuild/travis_steps.sh
75
+ # This sets -x
76
+ source multibuild_customize.sh
77
+ echo $ENABLE_CONTRIB > contrib.enabled
78
+ echo $ENABLE_HEADLESS > headless.enabled
79
+
80
+ if [ -n "$IS_OSX" ]; then
81
+ TAPS="$(brew --repository)/Library/Taps"
82
+ if [ -e "$TAPS/caskroom/homebrew-cask" -a -e "$TAPS/homebrew/homebrew-cask" ]; then
83
+ rm -rf "$TAPS/caskroom/homebrew-cask"
84
+ fi
85
+ find "$TAPS" -type d -name .git -exec \
86
+ bash -xec '
87
+ cd $(dirname '\''{}'\'')
88
+ git clean -fxd
89
+ git status' \;
90
+
91
+ brew_cache_cleanup
92
+ fi
93
+
94
+ before_install
95
+ # Not interested in travis internal scripts' output
96
+ set +x
97
+
69
98
install : |
70
99
# Build and package
71
100
set -x
72
101
build_wheel $REPO_DIR $PLAT
73
102
if [ -n "$USE_CCACHE" ]; then ccache --show-stats; fi
74
103
set +x
104
+
75
105
script : |
76
106
# Install and run tests
77
107
set -x
@@ -83,46 +113,26 @@ script: |
83
113
trap ERR
84
114
85
115
test "$rc" -eq 0
86
- before_cache : " # Cleanup dirs to be cached\n set -x\n if [ -n \" $IS_OSX\" ]; then\n\n
87
- \ # When Taps is cached, this dir causes \" Error: file exists\" on `brew update`\n
88
- \ if [ -e \" $(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask\"
89
- ]; then\n rm -rf \" $(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask\"\n
90
- \ fi\n\n brew_cache_cleanup\n \n fi\n set +x\n "
91
- after_success : |
92
- # Upload wheels to pypi if requested
93
- if [ -n "$TRAVIS_TAG" ]; then
94
- set -x
95
- pip install twine
96
-
97
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
98
- pip install --upgrade pyOpenSSL
99
- fi
100
116
101
- if [[ $ENABLE_CONTRIB == 0 ]]; then
102
- if [[ $ENABLE_HEADLESS == 0 ]]; then
103
- echo "This is default build. Deployment will be done to to PyPI entry opencv-python."
104
- else
105
- echo "This is headless contrib build. Deployment will be done to to PyPI entry opencv-python-headless."
106
- fi
107
- else
108
- if [[ $ENABLE_HEADLESS == 0 ]]; then
109
- echo "This is contrib build. Deployment will be done to to PyPI entry opencv-contrib-python."
110
- else
111
- echo "This is headless contrib build. Deployment will be done to to PyPI entry opencv-contrib-python-headless."
112
- fi
113
- fi
117
+ before_cache : |
118
+ # Cleanup dirs to be cached
119
+ set -x
120
+ if [ -n "$IS_OSX" ]; then
121
+ # When Taps is cached, this dir causes "Error: file exists" on `brew update`
122
+ if [ -e "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask" ]; then
123
+ rm -rf "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask"
124
+ fi
125
+ brew_cache_cleanup
126
+
127
+ fi
128
+ set +x
114
129
115
- #twine upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/opencv*
116
- set +x
117
- else
118
- echo "Tag not set, deployment skipped."
119
- fi
120
130
deploy :
121
131
provider : releases
122
132
api_key :
123
133
secure : AtM2g/4gJz2ZR4z6+p9GOkUiBIQGKgpJvkq48CgAeTTjEX0CXxn5XSwat4U8Sxr2QEiWj7giRsZlwW8P5TyPXAZ/R7oy1/hsfHQPpz9PKfrKFRpchgWdqiKfyTJwcTcEgo5VIhWmsnvXhbaQZPRnvAhvZ0b3wHfx/ymbsoyD1oyLJMDWq+K8bPvXni+A+vzv+PsSM4kF+AscjSO3ntVs6lBu7PiXFuz9vmmUY7jDkty3GmPzKA1wav1WNvWklSfiiIZvtGU2wj9iUClhYMibzY9lH4fowG9R2m6L3NjtefFCS17XhANKh6iEm3jVVifMjRvThCuYorEC67HDK3RLVJgwGhGWC5Jbr4Xc7aFTgd7lIftHL/alNcmLmiOpGcle45Uc1sdih1e0r5kkoszUAH+QNBXlN10ayNIP/z8iLv6LgT0qj0RIxvqleAJKawohhPqIPNVeSd+v+Vn7l7zbiYtiiZy03a94nvh1IbXPi6p2QB2uGy1/+3B9eipPiA9yamQh5dx2qP4j30iFUh4kMU2KIPfu2w6es+P5/TCVEebZwD1KqERBlKOCAW4g5EGg4qO2AXKN7as7VBge6KITSUSJogc5GhMgyd0tclON60vLeLpEyVv/C2Sq24WDuS8uy9IFm0vs1pzkCmBxEpFxvOyh20eWkVIpOfVPs27U/l0=
124
134
file_glob : true
125
- file : " ${TRAVIS_BUILD_DIR}/wheelhouse/opencv/* "
135
+ file : " ${TRAVIS_BUILD_DIR}/dist "
126
136
on :
127
137
repo : Swind/opencv-python
128
138
tags : true
0 commit comments