git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
blob e37e1d2d5f1bb407deb2578309ad6c279da506ae 1569 bytes (raw)
name: ci/run-linux32-build.sh 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 
#!/bin/sh
#
# Build and test Git in a 32-bit environment
#
# Usage:
#   run-linux32-build.sh <host-user-id>
#

set -ex

if test $# -ne 1 || test -z "$1"
then
	echo >&2 "usage: run-linux32-build.sh <host-user-id>"
	exit 1
fi

# 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 non 0 host user id is given, then create a user "ci" with that
# user id to make everything accessible to the host user.
HOST_UID=$1
if test $HOST_UID -eq 0
then
	# Just in case someone does want to run the test suite as root.
	CI_USER=root
else
	CI_USER=ci
	useradd -u $HOST_UID $CI_USER
	# Due to a bug the test suite was run as root in the past, so
	# a prove state file created back then is only accessible by
	# root.  Now that bug is fixed, the test suite is run as a
	# regular user, but the prove state file coming from Travis
	# CI's cache might still be owned by root.
	# Make sure that this user has rights to any cached files,
	# including an existing prove state file.
	test -n "$cache_dir" && chown -R $HOST_UID:$HOST_UID "$cache_dir"
fi

# Build and test
linux32 --32bit i386 su -m -l $CI_USER -c "
	set -ex
	cd /usr/src/git
	test -n '$cache_dir' && ln -s '$cache_dir/.prove' t/.prove
	make --jobs=2
	make --quiet test
"

debug log:

solving e37e1d2d5f ...
found e37e1d2d5f in https://public-inbox.org/git/20180122133220.18587-5-szeder.dev@gmail.com/
found c9476d6598 in https://public-inbox.org/git/20180122133220.18587-4-szeder.dev@gmail.com/
found 248183982b in https://80x24.org/mirrors/git.git
preparing index
index prepared:
100755 248183982be53af836feb296755d56ceccfb0c18	ci/run-linux32-build.sh

applying [1/2] https://public-inbox.org/git/20180122133220.18587-4-szeder.dev@gmail.com/
diff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh
index 248183982b..c9476d6598 100755


applying [2/2] https://public-inbox.org/git/20180122133220.18587-5-szeder.dev@gmail.com/
diff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh
index c9476d6598..e37e1d2d5f 100755

Checking patch ci/run-linux32-build.sh...
Applied patch ci/run-linux32-build.sh cleanly.
Checking patch ci/run-linux32-build.sh...
Applied patch ci/run-linux32-build.sh cleanly.

index at:
100755 e37e1d2d5f1bb407deb2578309ad6c279da506ae	ci/run-linux32-build.sh

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).