diff options
author | 2017-03-14 15:23:20 -0700 | |
---|---|---|
committer | 2017-03-14 15:23:20 -0700 | |
commit | 130b664e442767587638b3e807a6f543168239d7 (patch) | |
tree | d340f3e8e02404079f3a1b8d1610166475f08aaa /ci | |
parent | Merge branch 'ew/http-alternates-as-redirects-warning' (diff) | |
parent | Travis: also test on 32-bit Linux (diff) | |
download | tgif-130b664e442767587638b3e807a6f543168239d7.tar.xz |
Merge branch 'js/travis-32bit-linux'
Add 32-bit Linux variant to the set of platforms to be tested with
Travis CI.
* js/travis-32bit-linux:
Travis: also test on 32-bit Linux
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/run-linux32-build.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh new file mode 100755 index 0000000000..e30fb2cddc --- /dev/null +++ b/ci/run-linux32-build.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# +# Build and test Git in a 32-bit environment +# +# Usage: +# run-linux32-build.sh [host-user-id] +# + +# Update packages to the latest available versions +linux32 --32bit i386 sh -c ' + apt update >/dev/null && + apt install -y build-essential libcurl4-openssl-dev libssl-dev \ + libexpat-dev gettext python >/dev/null +' && + +# If this script runs inside a docker container, then all commands are +# usually executed as root. Consequently, the host user might not be +# able to access the test output files. +# If a host user id is given, then create a user "ci" with the host user +# id to make everything accessible to the host user. +HOST_UID=$1 && +CI_USER=$USER && +test -z $HOST_UID || (CI_USER="ci" && useradd -u $HOST_UID $CI_USER) && + +# Build and test +linux32 --32bit i386 su -m -l $CI_USER -c ' + cd /usr/src/git && + make --jobs=2 && + make --quiet test +' |