Commit b28b3f60 authored by Josh Haberman's avatar Josh Haberman

Configure ccache directory.

parent d08c39c2
...@@ -52,12 +52,18 @@ docker build -t $DOCKER_IMAGE_NAME $DOCKERFILE_DIR ...@@ -52,12 +52,18 @@ docker build -t $DOCKER_IMAGE_NAME $DOCKERFILE_DIR
# Choose random name for docker container # Choose random name for docker container
CONTAINER_NAME="build_and_run_docker_$(uuidgen)" CONTAINER_NAME="build_and_run_docker_$(uuidgen)"
# Ensure existence of ccache directory
CCACHE_DIR=/tmp/protobuf-ccache
mkdir -p $CCACHE_DIR
# Run command inside docker # Run command inside docker
docker run \ docker run \
"$@" \ "$@" \
-e CCACHE_DIR=$CCACHE_DIR \
-e EXTERNAL_GIT_ROOT="/var/local/jenkins/protobuf" \ -e EXTERNAL_GIT_ROOT="/var/local/jenkins/protobuf" \
-e THIS_IS_REALLY_NEEDED='see https://github.com/docker/docker/issues/14203 for why docker is awful' \ -e THIS_IS_REALLY_NEEDED='see https://github.com/docker/docker/issues/14203 for why docker is awful' \
-v "$git_root:/var/local/jenkins/protobuf:ro" \ -v "$git_root:/var/local/jenkins/protobuf:ro" \
-v $CCACHE_DIR:$CCACHE_DIR \
-w /var/local/git/protobuf \ -w /var/local/git/protobuf \
--name=$CONTAINER_NAME \ --name=$CONTAINER_NAME \
$DOCKER_IMAGE_NAME \ $DOCKER_IMAGE_NAME \
......
...@@ -103,7 +103,7 @@ use_java() { ...@@ -103,7 +103,7 @@ use_java() {
} }
# --batch-mode supresses download progress output that spams the logs. # --batch-mode supresses download progress output that spams the logs.
MVN=mvn --batch-mode MVN="mvn --batch-mode"
build_java() { build_java() {
# Java build needs `protoc`. # Java build needs `protoc`.
...@@ -125,7 +125,7 @@ build_java_with_conformance_tests() { ...@@ -125,7 +125,7 @@ build_java_with_conformance_tests() {
build_javanano() { build_javanano() {
# Java build needs `protoc`. # Java build needs `protoc`.
internal_build_cpp internal_build_cpp
cd javanano && mvn test && cd .. cd javanano && $MVN test && cd ..
} }
build_java_jdk6() { build_java_jdk6() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment