Skip to content
Permalink
Browse files

set ccache

  • Loading branch information
3nids committed Feb 27, 2018
1 parent 1fbd51c commit 84a7a6effd8a76ab80ed2edfeda149a505034022
Showing with 8 additions and 3 deletions.
  1. +1 −1 .ci/travis/linux/script.sh
  2. +7 −2 .docker/qgis.dockerfile
@@ -23,7 +23,7 @@ if [[ $DOCKER_QGIS_IMAGE_PUSH =~ true ]]; then
DIR=$(git rev-parse --show-toplevel)/.docker
pushd ${DIR}
echo "${bold}Building QGIS Docker image...${endbold}"
docker build -v /root/QGIS:/root/QGIS --cache-from "qgis/qgis:${DOCKER_TAG}" -t "qgis/qgis:${DOCKER_TAG}" -f qgis.dockerfile .
docker build --build-arg CACHE_DIR=/root/.ccache --cache-from "qgis/qgis:${DOCKER_TAG}" -t "qgis/qgis:${DOCKER_TAG}" -f qgis.dockerfile .
if [[ $DOCKER_QGIS_IMAGE_PUSH =~ true ]]; then
echo "${bold}Pushing image to docker hub...${endbold}"
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
@@ -2,7 +2,8 @@
# CACHE_TAG is provided by Docker cloud
# see https://docs.docker.com/docker-cloud/builds/advanced/
# using ARG in FROM requires min v17.05.0-ce
ARG CACHE_TAG=latest
ARG CACHE_TAG=latest
ARG CCACHE_DIR

FROM qgis/qgis3-build-deps:${CACHE_TAG}
MAINTAINER Denis Rouzaud <denis.rouzaud@gmail.com>
@@ -12,7 +13,11 @@ ENV CXX=/usr/lib/ccache/clang++
ENV QT_SELECT=5
ENV LANG=C.UTF-8

COPY . /usr/src/QGIS
COPY .. /usr/src/QGIS

COPY $CACHE_DIR /root/.ccache
ENV CCACHE_DIR=/root/.ccache
RUN ccache -M 1G

WORKDIR /usr/src/QGIS/build

0 comments on commit 84a7a6e

Please sign in to comment.
You can’t perform that action at this time.