@@ -44,7 +44,7 @@ function pre_build_osx {
44
44
local num_cpus=$( sysctl -n hw.ncpu)
45
45
num_cpus=${num_cpus:- 4}
46
46
local travis_start_time=$(( $TRAVIS_TIMER_START_TIME / 10 ** 9 ))
47
- local time_limit=$(( 45 * 60 ))
47
+ local time_limit=$(( 46 * 60 ))
48
48
49
49
cd " $repo_dir "
50
50
git submodule sync
@@ -88,9 +88,6 @@ function pre_build_osx {
88
88
)
89
89
fi
90
90
91
- # Clear ccache stats
92
- ccache -z
93
-
94
91
# Configure build
95
92
cd " $build_dir "
96
93
cmake " ${CMAKE_OPTS[@]} " ..
@@ -151,13 +148,13 @@ function pre_build_osx {
151
148
opencv_alphamat
152
149
opencv_stitching
153
150
opencv_gapi
151
+ all
154
152
)
155
153
for m in " ${CV_MODULES[@]} " ; do
156
154
if make help | grep -w " $m " ; then
157
- # Check time limit (3min should be enough for a module to built )
155
+ # Check time limit (3 min should be enough for a module build )
158
156
local projected_time=$(( $(date +% s) - travis_start_time + 3 * 60 ))
159
157
if [ $projected_time -ge $time_limit ]; then
160
- if [ -n " $USE_CCACHE " ]; then ccache -s; fi
161
158
goto_exit
162
159
return 1
163
160
fi
@@ -166,10 +163,6 @@ function pre_build_osx {
166
163
echo " Elapsed time: " $(( elapsed_time/ 60 )) " m (${elapsed_time} s)"
167
164
fi
168
165
done
169
- make -j${num_cpus}
170
-
171
- # Print ccache stats
172
- if [ -n " $USE_CCACHE " ]; then ccache -s; fi
173
166
}
174
167
175
168
function build_osx {
@@ -207,12 +200,22 @@ function build_bdist_osx_wheel {
207
200
local repo_dir=$( abspath ${1:- $REPO_DIR } )
208
201
[ -z " $repo_dir " ] && echo " repo_dir not defined" && exit 1
209
202
local wheelhouse=$( abspath ${WHEEL_SDIR:- wheelhouse} )
203
+
210
204
start_spinner
211
205
if [ -n " $( is_function " pre_build" ) " ]; then pre_build; fi
212
206
stop_spinner
207
+
213
208
pip install scikit-build
214
209
pip install numpy
210
+
211
+ if [ -n " $USE_CCACHE " ]; then ccache -z; fi
212
+
215
213
pre_build_osx " $repo_dir " || return $?
214
+
215
+ if [ -n " $USE_CCACHE " ]; then ccache -s; fi
216
+
216
217
build_osx " $repo_dir "
218
+
219
+ cp " $repo_dir " /dist/* .whl " $wheelhouse "
217
220
repair_wheelhouse " $wheelhouse "
218
221
}
0 commit comments