Print debug output. Use podman when available.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/.travis/build.sh b/.travis/build.sh
index ed0e495..4d16593 100755
--- a/.travis/build.sh
+++ b/.travis/build.sh
@@ -1,11 +1,24 @@
#!/bin/bash
+set -x
+
if [ -z ${QEMU_CPU+x} ]; then
export SET_QEMU_CPU=
else
export SET_QEMU_CPU=-e QEMU_CPU=${QEMU_CPU}
fi
+# Default to podman where available, docker otherwise.
+# Override by setting the DOCKER environment variable.
+if test -z "$DOCKER"; then
+ which podman > /dev/null 2>&1
+ if [ $? != 0 ]; then
+ export DOCKER=docker
+ else
+ export DOCKER=podman
+ fi
+fi
+
function build_cfarm()
{
curl -u ${CFARM_AUTH} https://cfarm-test-libffi-libffi.apps.home.labdroid.net/test?host=${HOST}\&commit=${TRAVIS_COMMIT}
@@ -36,13 +49,13 @@ function build_linux()
function build_foreign_linux()
{
- docker run --rm -t -i -v `pwd`:/opt ${SET_QEMU_CPU} -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" $2 bash -c /opt/.travis/build-in-container.sh
+ ${DOCKER} run --rm -t -i -v `pwd`:/opt ${SET_QEMU_CPU} -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" $2 bash -c /opt/.travis/build-in-container.sh
exit $?
}
function build_cross_linux()
{
- docker run --rm -t -i -v `pwd`:/opt ${SET_QEMU_CPU} -e HOST="${HOST}" -e CC="${HOST}-gcc-8" -e CXX="${HOST}-g++-8" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" moxielogic/cross-ci-build-container:latest bash -c /opt/.travis/build-in-container.sh
+ ${DOCKER} run --rm -t -i -v `pwd`:/opt ${SET_QEMU_CPU} -e HOST="${HOST}" -e CC="${HOST}-gcc-8" -e CXX="${HOST}-g++-8" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" moxielogic/cross-ci-build-container:latest bash -c /opt/.travis/build-in-container.sh
exit $?
}