mirror of
https://github.com/git/git
synced 2024-10-30 13:20:15 +00:00
b2cbaa091c
Some of our 'ci/*' scripts repeat the name or full path of the Travis CI cache directory, and the following patches will add new places using that path. Use a variable to refer to the path of the cache directory instead, so it's hard-coded only in a single place. Pay extra attention to the 32 bit Linux build: it runs in a Docker container, so pass the path of the cache directory from the host to the container in an environment variable. Note that an environment variable passed this way is exported inside the container, therefore its value is directly available in the 'su' snippet even though that snippet is single quoted. Furthermore, use the variable in the container only if it's been assigned a non-empty value, to prevent errors when someone is running or debugging the Docker build locally, because in that case the variable won't be set as there won't be any Travis CI cache. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
31 lines
787 B
Bash
Executable file
31 lines
787 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Download and run Docker image to build and test 32-bit Git
|
|
#
|
|
|
|
. ${0%/*}/lib-travisci.sh
|
|
|
|
docker pull daald/ubuntu32:xenial
|
|
|
|
# Use the following command to debug the docker build locally:
|
|
# $ docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/bash daald/ubuntu32:xenial
|
|
# root@container:/# /usr/src/git/ci/run-linux32-build.sh
|
|
|
|
container_cache_dir=/tmp/travis-cache
|
|
|
|
docker run \
|
|
--interactive \
|
|
--env DEVELOPER \
|
|
--env DEFAULT_TEST_TARGET \
|
|
--env GIT_PROVE_OPTS \
|
|
--env GIT_TEST_OPTS \
|
|
--env GIT_TEST_CLONE_2GB \
|
|
--env cache_dir="$container_cache_dir" \
|
|
--volume "${PWD}:/usr/src/git" \
|
|
--volume "$cache_dir:$container_cache_dir" \
|
|
daald/ubuntu32:xenial \
|
|
/usr/src/git/ci/run-linux32-build.sh $(id -u $USER)
|
|
|
|
check_unignored_build_artifacts
|
|
|
|
save_good_tree
|