]> git.ipfire.org Git - thirdparty/git.git/blame - ci/run-linux32-build.sh
travis-ci: don't repeat the path of the cache directory
[thirdparty/git.git] / ci / run-linux32-build.sh
CommitLineData
88dedd5e
JS
1#!/bin/sh
2#
3# Build and test Git in a 32-bit environment
4#
5# Usage:
6# run-linux32-build.sh [host-user-id]
7#
8
04d47e96 9set -ex
a8b8b6b8 10
88dedd5e
JS
11# Update packages to the latest available versions
12linux32 --32bit i386 sh -c '
13 apt update >/dev/null &&
14 apt install -y build-essential libcurl4-openssl-dev libssl-dev \
15 libexpat-dev gettext python >/dev/null
04d47e96 16'
88dedd5e
JS
17
18# If this script runs inside a docker container, then all commands are
19# usually executed as root. Consequently, the host user might not be
20# able to access the test output files.
21# If a host user id is given, then create a user "ci" with the host user
22# id to make everything accessible to the host user.
04d47e96
SG
23HOST_UID=$1
24CI_USER=$USER
25test -z $HOST_UID || (CI_USER="ci" && useradd -u $HOST_UID $CI_USER)
88dedd5e
JS
26
27# Build and test
28linux32 --32bit i386 su -m -l $CI_USER -c '
04d47e96
SG
29 set -ex
30 cd /usr/src/git
b2cbaa09 31 test -n "$cache_dir" && ln -s "$cache_dir/.prove" t/.prove
04d47e96
SG
32 make --jobs=2
33 make --quiet test
88dedd5e 34'