@matheusbsbs / matheus-bagliano / commits / 2bd1e2d273
Fork 0

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>

Đoàn Trần Công Danh committed Apr 4, 2020 at 08:08 UTC 2bd1e2d273b69516a3c161671a39263589ccc9fc
2 files changed +13 -2
ci/run-linux32-build.sh
+11 -2
@@ -14,8 +14,17 @@ then
14 exit 1
15 fi
16
17 +case "$jobname" in
18 +Linux32)
19 + switch_cmd="linux32 --32bit i386"
20 + ;;
21 +*)
22 + exit 1
23 + ;;
24 +esac
25 +
26 # Update packages to the latest available versions
18 -linux32 --32bit i386 sh -c '
27 +command $switch_cmd sh -c '
28 apt update >/dev/null &&
29 apt install -y build-essential libcurl4-openssl-dev libssl-dev \
30 libexpat-dev gettext python >/dev/null
@@ -51,7 +60,7 @@ else
60 fi
61
62 # Build and test
54 -linux32 --32bit i386 su -m -l $CI_USER -c "
63 +command $switch_cmd su -m -l $CI_USER -c "
64 set -ex
65 export DEVELOPER='$DEVELOPER'
66 export DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET'
ci/run-linux32-docker.sh
+2
@@ -9,6 +9,7 @@ docker pull daald/ubuntu32:xenial
9
10 # Use the following command to debug the docker build locally:
11 # $ docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/bash daald/ubuntu32:xenial
12 +# root@container:/# export jobname=<jobname>
13 # root@container:/# /usr/src/git/ci/run-linux32-build.sh <host-user-id>
14
15 container_cache_dir=/tmp/travis-cache
@@ -21,6 +22,7 @@ docker run \
22 --env GIT_TEST_OPTS \
23 --env GIT_TEST_CLONE_2GB \
24 --env MAKEFLAGS \
25 + --env jobname \
26 --env cache_dir="$container_cache_dir" \
27 --volume "${PWD}:/usr/src/git" \
28 --volume "$cache_dir:$container_cache_dir" \