Kokoro: Move the clean checkout to tmpfs
tmpfs is where the real disk space lives. Fixes spurious out-of-disk errors. Change-Id: Icd82b58888f5ffa26680c9f68cd65e7b53874bf5 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/64541 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
ddc9eb2b85
commit
17720fdec7
|
@ -19,10 +19,24 @@ set -e # Fail on any error.
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
|
||||||
ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." >/dev/null 2>&1 && pwd )"
|
ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
|
# Inside the docker VM, we clone the project to a new directory.
|
||||||
|
# We do this so that the docker script can be tested in a local development
|
||||||
|
# checkout, without having the build litter the local checkout with artifacts.
|
||||||
|
# This directory is mapped to the host temporary directory.
|
||||||
|
# Kokoro uses a '/tmpfs' root, where as most linux enviroments just have '/tmp'
|
||||||
|
if [ -d "/tmpfs" ]; then
|
||||||
|
TMP_DIR=/tmpfs
|
||||||
|
else
|
||||||
|
TMP_DIR=/tmp
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
docker run --rm -i \
|
docker run --rm -i \
|
||||||
--volume "${ROOT_DIR}:${ROOT_DIR}" \
|
--volume "${ROOT_DIR}:${ROOT_DIR}" \
|
||||||
|
--volume "${TMP_DIR}:/src" \
|
||||||
--volume "${KOKORO_ARTIFACTS_DIR}:/mnt/artifacts" \
|
--volume "${KOKORO_ARTIFACTS_DIR}:/mnt/artifacts" \
|
||||||
--workdir "${ROOT_DIR}" \
|
--workdir "${ROOT_DIR}" \
|
||||||
|
--env SRC_DIR="/src/tint" \
|
||||||
--env BUILD_TYPE=$BUILD_TYPE \
|
--env BUILD_TYPE=$BUILD_TYPE \
|
||||||
--env BUILD_SYSTEM=$BUILD_SYSTEM \
|
--env BUILD_SYSTEM=$BUILD_SYSTEM \
|
||||||
--env BUILD_SANITIZER=$BUILD_SANITIZER \
|
--env BUILD_SANITIZER=$BUILD_SANITIZER \
|
||||||
|
|
|
@ -54,7 +54,7 @@ function with_retry {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
ORIGINAL_SRC_DIR="$(pwd)"
|
CLONE_SRC_DIR="$(pwd)"
|
||||||
|
|
||||||
. /bin/using.sh # Declare the bash `using` function for configuring toolchains.
|
. /bin/using.sh # Declare the bash `using` function for configuring toolchains.
|
||||||
|
|
||||||
|
@ -62,13 +62,11 @@ using depot_tools
|
||||||
using go-1.14.4 # Speeds up ./tools/lint
|
using go-1.14.4 # Speeds up ./tools/lint
|
||||||
using doxygen-1.8.18
|
using doxygen-1.8.18
|
||||||
|
|
||||||
status "Cloning to clean source directory"
|
status "Cloning to clean source directory at '${SRC_DIR}'"
|
||||||
# We do this so that the docker script can be tested in a local development
|
|
||||||
# checkout, without having the build litter the local checkout with artifacts
|
|
||||||
SRC_DIR=/tmp/tint-src
|
|
||||||
mkdir -p ${SRC_DIR}
|
mkdir -p ${SRC_DIR}
|
||||||
cd ${SRC_DIR}
|
cd ${SRC_DIR}
|
||||||
git clone ${ORIGINAL_SRC_DIR} .
|
git clone ${CLONE_SRC_DIR} .
|
||||||
|
|
||||||
status "Fetching dependencies"
|
status "Fetching dependencies"
|
||||||
cp standalone.gclient .gclient
|
cp standalone.gclient .gclient
|
||||||
|
|
Loading…
Reference in New Issue