ci/linux32: parameterise command to switch arch
In a later patch, the remaining of this command will be re-used for the CI job for linux with musl libc. Allow customisation of the emulator, now. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
ffce2ebdd9
commit
2bd1e2d273
|
@ -14,8 +14,17 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case "$jobname" in
|
||||||
|
Linux32)
|
||||||
|
switch_cmd="linux32 --32bit i386"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Update packages to the latest available versions
|
# Update packages to the latest available versions
|
||||||
linux32 --32bit i386 sh -c '
|
command $switch_cmd sh -c '
|
||||||
apt update >/dev/null &&
|
apt update >/dev/null &&
|
||||||
apt install -y build-essential libcurl4-openssl-dev libssl-dev \
|
apt install -y build-essential libcurl4-openssl-dev libssl-dev \
|
||||||
libexpat-dev gettext python >/dev/null
|
libexpat-dev gettext python >/dev/null
|
||||||
|
@ -51,7 +60,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build and test
|
# Build and test
|
||||||
linux32 --32bit i386 su -m -l $CI_USER -c "
|
command $switch_cmd su -m -l $CI_USER -c "
|
||||||
set -ex
|
set -ex
|
||||||
export DEVELOPER='$DEVELOPER'
|
export DEVELOPER='$DEVELOPER'
|
||||||
export DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET'
|
export DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET'
|
||||||
|
|
|
@ -9,6 +9,7 @@ docker pull daald/ubuntu32:xenial
|
||||||
|
|
||||||
# Use the following command to debug the docker build locally:
|
# Use the following command to debug the docker build locally:
|
||||||
# $ docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/bash daald/ubuntu32:xenial
|
# $ docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/bash daald/ubuntu32:xenial
|
||||||
|
# root@container:/# export jobname=<jobname>
|
||||||
# root@container:/# /usr/src/git/ci/run-linux32-build.sh <host-user-id>
|
# root@container:/# /usr/src/git/ci/run-linux32-build.sh <host-user-id>
|
||||||
|
|
||||||
container_cache_dir=/tmp/travis-cache
|
container_cache_dir=/tmp/travis-cache
|
||||||
|
@ -21,6 +22,7 @@ docker run \
|
||||||
--env GIT_TEST_OPTS \
|
--env GIT_TEST_OPTS \
|
||||||
--env GIT_TEST_CLONE_2GB \
|
--env GIT_TEST_CLONE_2GB \
|
||||||
--env MAKEFLAGS \
|
--env MAKEFLAGS \
|
||||||
|
--env jobname \
|
||||||
--env cache_dir="$container_cache_dir" \
|
--env cache_dir="$container_cache_dir" \
|
||||||
--volume "${PWD}:/usr/src/git" \
|
--volume "${PWD}:/usr/src/git" \
|
||||||
--volume "$cache_dir:$container_cache_dir" \
|
--volume "$cache_dir:$container_cache_dir" \
|
||||||
|
|
Loading…
Reference in New Issue