Commit f16e61f0 authored by mattip's avatar mattip
Browse files

rework DOCKER_TEST_IMAGE parsing from review

parent 66586461
......@@ -26,7 +26,7 @@ matrix:
env:
- TEST_BUILDS=1
- MB_ML_VER=2010
- DOCKER_TEST_IMAGE=multibuild/xenial64
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
# 32-bit builds
- os: linux
dist: xenial
......@@ -39,7 +39,7 @@ matrix:
- TEST_BUILDS=1
- PLAT=i686
- MB_ML_VER=2010
- DOCKER_TEST_IMAGE=multibuild/bionic32
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
# Builds with caching
- os: linux
dist: xenial
......
......@@ -125,12 +125,18 @@ real ``build_wheel`` function, which now comes (by default) from
Test phase
----------
Specify the version to test with the ``DOCKER_TEST_IMAGE`` environment variable. The
default version is ``matthewbrett/trusty:64``, or for ``i686`` platforms
``matthewbrett/trusty:32``. Other versions that are currently valid are:
* ``multibuild/bionic32`` (32 only)
* ``multibuild/xenial64`` (64 only)
Specify the version to test with the ``DOCKER_TEST_IMAGE`` environment
variable. The default version is dependent on ``PLAT``:
* ``matthewbrett/trusty:64``, for ``x86_64``
* ``matthewbrett/trusty:32`` for ``i686``
* ``multibuild/xenial_arm64v8`` for ``aarch64``
* ``multibuild/xenial_ppc64le`` for ``ppc64le``
* ``mutlibuild/xenial_s390x`` for ``s390x``
Other valid values are any in https://hub.docker.com/orgs/multibuild/repositories,
using the correct platform code. Alternatively, you can use the substitution
pattern ``multibuild/xenial_{PLAT}`` in the ``.travis.yml`` file.
See ``multibuild/docker_test_wrap.sh``.
......
......@@ -121,12 +121,13 @@ function install_run {
# TEST_DEPENDS (optional)
# MB_TEST_VER (optional)
local plat=${1:-${PLAT:-x86_64}}
local mb_test_ver=${DOCKER_TEST_IMAGE:-"matthewbrett/trusty:"}
if [ -z "$DOCKER_TEST_IMAGE" ]; then
local bitness=$([ "$plat" == i686 ] && echo 32 || echo 64)
local docker_image="matthewbrett/trusty:$bitness"
else
local docker_image=$DOCKER_TEST_IMAGE
# aarch64 is called arm64v8 in Ubuntu
local plat_subst=$([ "$plat" == aarch64 ] && echo arm64v8 || echo $plat)
local docker_image="${DOCKER_TEST_IMAGE/\{plat_subst\}/$plat_subst}"
fi
docker pull $docker_image
docker run --rm \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment