Skip to content

Commit 2bd1e2d

Browse files
sgngitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ffce2eb commit 2bd1e2d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

ci/run-linux32-build.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,17 @@ then
1414
exit 1
1515
fi
1616

17+
case "$jobname" in
18+
Linux32)
19+
switch_cmd="linux32 --32bit i386"
20+
;;
21+
*)
22+
exit 1
23+
;;
24+
esac
25+
1726
# Update packages to the latest available versions
18-
linux32 --32bit i386 sh -c '
27+
command $switch_cmd sh -c '
1928
apt update >/dev/null &&
2029
apt install -y build-essential libcurl4-openssl-dev libssl-dev \
2130
libexpat-dev gettext python >/dev/null
@@ -51,7 +60,7 @@ else
5160
fi
5261

5362
# Build and test
54-
linux32 --32bit i386 su -m -l $CI_USER -c "
63+
command $switch_cmd su -m -l $CI_USER -c "
5564
set -ex
5665
export DEVELOPER='$DEVELOPER'
5766
export DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET'

ci/run-linux32-docker.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ docker pull daald/ubuntu32:xenial
99

1010
# Use the following command to debug the docker build locally:
1111
# $ docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/bash daald/ubuntu32:xenial
12+
# root@container:/# export jobname=<jobname>
1213
# root@container:/# /usr/src/git/ci/run-linux32-build.sh <host-user-id>
1314

1415
container_cache_dir=/tmp/travis-cache
@@ -21,6 +22,7 @@ docker run \
2122
--env GIT_TEST_OPTS \
2223
--env GIT_TEST_CLONE_2GB \
2324
--env MAKEFLAGS \
25+
--env jobname \
2426
--env cache_dir="$container_cache_dir" \
2527
--volume "${PWD}:/usr/src/git" \
2628
--volume "$cache_dir:$container_cache_dir" \

0 commit comments

Comments
 (0)