convert: convert crlf_to_git to take an index
[git/debian.git] / ci / run-linux32-build.sh
blobe30fb2cddcb59821a90a5c77496664b9a3609113
1 #!/bin/sh
3 # Build and test Git in a 32-bit environment
5 # Usage:
6 # run-linux32-build.sh [host-user-id]
9 # Update packages to the latest available versions
10 linux32 --32bit i386 sh -c '
11 apt update >/dev/null &&
12 apt install -y build-essential libcurl4-openssl-dev libssl-dev \
13 libexpat-dev gettext python >/dev/null
14 ' &&
16 # If this script runs inside a docker container, then all commands are
17 # usually executed as root. Consequently, the host user might not be
18 # able to access the test output files.
19 # If a host user id is given, then create a user "ci" with the host user
20 # id to make everything accessible to the host user.
21 HOST_UID=$1 &&
22 CI_USER=$USER &&
23 test -z $HOST_UID || (CI_USER="ci" && useradd -u $HOST_UID $CI_USER) &&
25 # Build and test
26 linux32 --32bit i386 su -m -l $CI_USER -c '
27 cd /usr/src/git &&
28 make --jobs=2 &&
29 make --quiet test