From 9e1c253fe814c85a316520bd6bd258adaa71df79 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Fri, 3 May 2019 14:11:55 -0700 Subject: gvisor: run bazel in a docker container bazel has a lot of dependencies and users don't want to install them just to build gvisor. These changes allows to run bazel in a docker container. A bazel cache is on the local file system (~/.cache/bazel), so incremental builds should be fast event after recreating a bazel container. Here is an example how to build runsc: make BAZEL_OPTIONS="build runsc:runsc" bazel Change-Id: I8c0a6d0c30e835892377fb6dd5f4af7a0052d12a PiperOrigin-RevId: 246570877 --- kokoro/run_tests.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'kokoro') diff --git a/kokoro/run_tests.sh b/kokoro/run_tests.sh index c5c6a7780..fbe353a1e 100755 --- a/kokoro/run_tests.sh +++ b/kokoro/run_tests.sh @@ -197,6 +197,16 @@ finish() { exit ${exit_code} } +# Run bazel in a docker container +build_in_docker() { + cd ${WORKSPACE_DIR} + bazel clean + bazel shutdown + make + make runsc + make bazel-shutdown +} + ######## # MAIN # ######## @@ -220,6 +230,7 @@ main() { # Build other flavors too. build_everything dbg + build_in_docker # No need to call "finish" here, it will happen at exit. } -- cgit v1.2.3