kokoro: Use 'data' disk for build directory
Fixes spurious out-of-disk failures Change-Id: I31c5f7f5c07c0f75826909de6444b8ef9cc8818e Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/81100 Auto-Submit: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
parent
27605e505b
commit
25c6505a64
|
@ -35,10 +35,11 @@ fi
|
||||||
docker run --rm -i \
|
docker run --rm -i \
|
||||||
--privileged \
|
--privileged \
|
||||||
--volume "${ROOT_DIR}:${ROOT_DIR}" \
|
--volume "${ROOT_DIR}:${ROOT_DIR}" \
|
||||||
--volume "${TMP_DIR}:/src" \
|
--volume "${TMP_DIR}/kokoro/tint:/tint" \
|
||||||
--volume "${KOKORO_ARTIFACTS_DIR}:/mnt/artifacts" \
|
--volume "${KOKORO_ARTIFACTS_DIR}:/mnt/artifacts" \
|
||||||
--workdir "${ROOT_DIR}" \
|
--workdir "${ROOT_DIR}" \
|
||||||
--env SRC_DIR="/src/tint" \
|
--env SRC_DIR="/tint/src" \
|
||||||
|
--env BUILD_DIR="/tint/build" \
|
||||||
--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 \
|
||||||
|
|
|
@ -14,6 +14,22 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
# This is the bash script invoked inside a docker container.
|
||||||
|
# The script expects that the CWD points to a clean checkout of Tint.
|
||||||
|
# As `gclient sync` will litter the tint checkout with fetched tools and
|
||||||
|
# projects, this script will first clone the pristine tint checkout to
|
||||||
|
# ${SRC_DIR}. This allows developers to locally run this script without having
|
||||||
|
# to worry about their local tint copy being touched.
|
||||||
|
#
|
||||||
|
# This script expects the following environment variables to be set on entry:
|
||||||
|
#
|
||||||
|
# SRC_DIR - Path to where the local Tint copy will be made. See above.
|
||||||
|
# BUILD_DIR - Path to where Tint will be built.
|
||||||
|
# BUILD_TYPE - Either: 'Debug' or 'Release'
|
||||||
|
# BUILD_SYSTEM - Must be 'cmake'
|
||||||
|
# BUILD_SANITIZER - Either: '', 'asan', or 'ubstan'
|
||||||
|
# BUILD_TOOLCHAIN - Either: 'clang' or 'gcc'
|
||||||
|
|
||||||
set -e # Fail on any error.
|
set -e # Fail on any error.
|
||||||
|
|
||||||
function show_cmds { set -x; }
|
function show_cmds { set -x; }
|
||||||
|
@ -62,9 +78,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 at '${SRC_DIR}'"
|
status "Creating source directory '${SRC_DIR}' and build directory '${BUILD_DIR}'"
|
||||||
|
|
||||||
mkdir -p ${SRC_DIR}
|
mkdir -p ${SRC_DIR}
|
||||||
|
mkdir -p ${BUILD_DIR}
|
||||||
|
|
||||||
|
status "Cloning to source directory '${SRC_DIR}'"
|
||||||
cd ${SRC_DIR}
|
cd ${SRC_DIR}
|
||||||
git clone ${CLONE_SRC_DIR} .
|
git clone ${CLONE_SRC_DIR} .
|
||||||
|
|
||||||
|
@ -79,9 +97,6 @@ status "Configuring build system"
|
||||||
if [ "$BUILD_SYSTEM" == "cmake" ]; then
|
if [ "$BUILD_SYSTEM" == "cmake" ]; then
|
||||||
using cmake-3.17.2
|
using cmake-3.17.2
|
||||||
|
|
||||||
BUILD_DIR=/tmp/tint-build
|
|
||||||
mkdir -p ${BUILD_DIR}
|
|
||||||
|
|
||||||
COMMON_CMAKE_FLAGS=""
|
COMMON_CMAKE_FLAGS=""
|
||||||
COMMON_CMAKE_FLAGS+=" -DCMAKE_BUILD_TYPE=${BUILD_TYPE}"
|
COMMON_CMAKE_FLAGS+=" -DCMAKE_BUILD_TYPE=${BUILD_TYPE}"
|
||||||
COMMON_CMAKE_FLAGS+=" -DTINT_DOCS_WARN_AS_ERROR=1"
|
COMMON_CMAKE_FLAGS+=" -DTINT_DOCS_WARN_AS_ERROR=1"
|
||||||
|
@ -117,7 +132,7 @@ if [ "$BUILD_SYSTEM" == "cmake" ]; then
|
||||||
cmake --build . --target tint-docs
|
cmake --build . --target tint-docs
|
||||||
hide_cmds
|
hide_cmds
|
||||||
|
|
||||||
status "Building tint"
|
status "Building tint in '${BUILD_DIR}'"
|
||||||
show_cmds
|
show_cmds
|
||||||
cmake ${SRC_DIR} ${CMAKE_FLAGS} ${COMMON_CMAKE_FLAGS}
|
cmake ${SRC_DIR} ${CMAKE_FLAGS} ${COMMON_CMAKE_FLAGS}
|
||||||
cmake --build . -- --jobs=$(nproc)
|
cmake --build . -- --jobs=$(nproc)
|
||||||
|
|
Loading…
Reference in New Issue