@@ -288,12 +288,49 @@ function do_build_lib {
288288 $BUILD_PREFIX /lib/cmake/openblas
289289}
290290
291+
292+ function build_lib_on_travis {
293+ # OSX or manylinux build
294+ #
295+ # Input arg
296+ # plat - one of i686, x86_64, arm64
297+ # interface64 - 1 if build with INTERFACE64 and SYMBOLSUFFIX
298+ # nightly - 1 if building for nightlies
299+ #
300+ # Depends on globals
301+ # BUILD_PREFIX - install suffix e.g. "/usr/local"
302+ # MB_ML_VER
303+ set -x
304+ local plat=${1:- $PLAT }
305+ local interface64=${2:- $INTERFACE64 }
306+ local nightly=${3: 0}
307+ local manylinux=${MB_ML_VER:- 1}
308+
309+ # Manylinux wrapper
310+ local libc=${MB_ML_LIBC:- manylinux}
311+ local docker_image=quay.io/pypa/${libc}${manylinux} _${plat}
312+ docker pull $docker_image
313+ # Docker sources this script, and runs `do_build_lib`
314+ docker run --rm \
315+ -e BUILD_PREFIX=" $BUILD_PREFIX " \
316+ -e PLAT=" ${plat} " \
317+ -e INTERFACE64=" ${interface64} " \
318+ -e NIGHTLY=" ${nightly} " \
319+ -e PYTHON_VERSION=" $MB_PYTHON_VERSION " \
320+ -e MB_ML_VER=${manylinux} \
321+ -e MB_ML_LIBC=${libc} \
322+ -v $PWD :/io \
323+ $docker_image /io/tools/docker_build_wrap.sh
324+ }
325+
326+
327+
291328function build_on_travis {
292329 if [ ${TRAVIS_EVENT_TYPE} == " cron" ]; then
293- build_lib " $PLAT " " $INTERFACE64 " 1
330+ build_lib_on_travis " $PLAT " " $INTERFACE64 " 1
294331 version=$( cd OpenBLAS && git describe --tags --abbrev=8 | sed -e " s/^v\(.*\)-g.*/\1/" | sed -e " s/-/./g" )
295332 sed -e " s/^version = .*/version = \" ${version} \" /" -i.bak pyproject.toml
296333 else
297- build_lib " $PLAT " " $INTERFACE64 " 0
334+ build_lib_on_travis " $PLAT " " $INTERFACE64 " 0
298335 fi
299336}
0 commit comments