mirror of
https://github.com/git/git.git
synced 2024-11-01 14:57:52 +01:00
7e72cfceed
This change follows suit of 6272ed319
(travis-ci: run previously
failed tests first, then slowest to fastest, 2016-01-26), which did
this for the Linux and OSX build jobs. Travis CI build jobs run the
tests parallel, which is sligtly faster when tests are run in slowest
to fastest order, shortening the overall runtime of this build job by
about a minute / 10%.
Note, that the 32 bit Linux build job runs the tests suite in a Docker
container and we have to share the Travis CI cache directory with the
container as a second volume. Otherwise we couldn't use a symlink
pointing to the prove state file in the cache directory, because
that's outside of the directory hierarchy accessible from within the
container.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Reviewed-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
33 lines
930 B
Bash
Executable file
33 lines
930 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Build and test Git in a 32-bit environment
|
|
#
|
|
# Usage:
|
|
# run-linux32-build.sh [host-user-id]
|
|
#
|
|
|
|
set -x
|
|
|
|
# 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 &&
|
|
ln -s /tmp/travis-cache/.prove t/.prove &&
|
|
make --jobs=2 &&
|
|
make --quiet test
|
|
'
|