Disable attempt to use ccache for docker build.

This commit is contained in:
Josh Haberman 2016-03-03 17:08:37 -08:00
parent 2bda98f79c
commit 7d793c167f
3 changed files with 13 additions and 20 deletions

View File

@ -62,6 +62,7 @@ RUN apt-get update && apt-get install -y \
libtool \ libtool \
make \ make \
parallel \ parallel \
time \
wget \ wget \
# -- For csharp -- # -- For csharp --
mono-devel \ mono-devel \
@ -116,19 +117,6 @@ RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc" RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
##################
# Prepare ccache
# We do this BEFORE the Java dependency step below, so the build of protoc
# can benefit from it.
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++
RUN ln -s /usr/bin/ccache /usr/local/bin/cc
RUN ln -s /usr/bin/ccache /usr/local/bin/c++
RUN ln -s /usr/bin/ccache /usr/local/bin/clang
RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
################## ##################
# Java dependencies # Java dependencies
@ -149,6 +137,15 @@ RUN cd /tmp && \
cd ../javanano && \ cd ../javanano && \
$MVN install dependency:go-offline -Dmaven.repo.local=$MAVEN_REPO $MVN install dependency:go-offline -Dmaven.repo.local=$MAVEN_REPO
##################
# Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++
RUN ln -s /usr/bin/ccache /usr/local/bin/cc
RUN ln -s /usr/bin/ccache /usr/local/bin/c++
RUN ln -s /usr/bin/ccache /usr/local/bin/clang
RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
# Define the default command. # Define the default command.
CMD ["bash"] CMD ["bash"]

View File

@ -46,15 +46,13 @@ cd -
# Use image name based on Dockerfile location checksum # Use image name based on Dockerfile location checksum
DOCKER_IMAGE_NAME=$(basename $DOCKERFILE_DIR)_$(sha1sum $DOCKERFILE_DIR/Dockerfile | cut -f1 -d\ ) DOCKER_IMAGE_NAME=$(basename $DOCKERFILE_DIR)_$(sha1sum $DOCKERFILE_DIR/Dockerfile | cut -f1 -d\ )
# Make sure docker image has been built. Should be instantaneous if so.
docker build -t $DOCKER_IMAGE_NAME $DOCKERFILE_DIR
# Ensure existence of ccache directory # Ensure existence of ccache directory
CCACHE_DIR=/tmp/protobuf-ccache CCACHE_DIR=/tmp/protobuf-ccache
mkdir -p $CCACHE_DIR mkdir -p $CCACHE_DIR
# Make sure docker image has been built. Should be instantaneous if so.
docker build \
-v $CCACHE_DIR:$CCACHE_DIR \
-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)"

View File

@ -44,8 +44,6 @@ $TIME_CMD $TEST_SCRIPT cpp > >(tee $CPP_STDOUT) 2> >(tee $CPP_STDERR >&2)
# Other tests are run in parallel. The overall run fails if any one of them # Other tests are run in parallel. The overall run fails if any one of them
# fails. # fails.
FAILED=false
parallel --results $LOG_OUTPUT_DIR --joblog $OUTPUT_DIR/joblog $TEST_SCRIPT ::: \ parallel --results $LOG_OUTPUT_DIR --joblog $OUTPUT_DIR/joblog $TEST_SCRIPT ::: \
csharp \ csharp \
java_jdk7 \ java_jdk7 \