Skip to content

Commit

Permalink
fix CCACHE dir
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Mar 5, 2019
1 parent 1e11e11 commit 943492e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .ci/travis/docker_image/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

set -e

mkdir -p "CCACHE_DIR_IMAGE_BUILD"
mkdir -p "${CCACHE_DIR}"

# copy ccache dir within QGIS source so it can be accessed from docker
cp -r ${CCACHE_DIR_IMAGE_BUILD} ${TRAVIS_BUILD_DIR}/.ccache_image_build
cp -r ${CCACHE_DIR} ${TRAVIS_BUILD_DIR}/.ccache_image_build
# building docker images
DIR=$(git rev-parse --show-toplevel)/.docker
pushd "${DIR}"
Expand All @@ -33,10 +33,10 @@ echo "${bold}Pushing image to docker hub...${endbold}"
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
docker push "qgis/qgis:${DOCKER_TAG}"
echo "Copy build cache from Docker container to Travis cache directory"
rm -rf "${CCACHE_DIR_IMAGE_BUILD:?}/"*
rm -rf "${CCACHE_DIR:?}/"*
container_id=$(docker images -q "qgis/qgis:${DOCKER_TAG}")
docker start ${container_id}
docker cp ${container_id}:/usr/src/QGIS/.ccache_image_build ${CCACHE_DIR_IMAGE_BUILD}
docker cp ${container_id}:/usr/src/QGIS/.ccache_image_build ${CCACHE_DIR}
popd
echo "Trigger build of PyQGIS Documentation"
body='{
Expand Down
2 changes: 1 addition & 1 deletion .docker/docker-compose.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
image: qgis/qgis3-build-deps:${DOCKER_TAG}
volumes:
- ${TRAVIS_BUILD_DIR}:/root/QGIS
- ${CCACHE_DIR_TESTING}:/root/.ccache # if changed, also change env var
- ${CCACHE_DIR}:/root/.ccache # if changed, also change env var
links:
- postgres
- mssql
Expand Down
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ cache:
pip: true
directories:
- ${HOME}/.ccache_testing
- ${HOME}/.ccache_docker_build
- ${HOME}/.ccache_docker_build_cosmic
- ${HOME}/.ccache_docker_build_bionic
timeout: 1000
if: NOT branch =~ /^(cherry-pick-)?backport-\d+-on-/

env:
global:
- TRAVIS_TIMESTAMP=$(date +%s)
- CCACHE_DIR_TESTING=${HOME}/.ccache_testing
- CCACHE_DIR_IMAGE_BUILD=${HOME}/.ccache_docker_build
# Docker hub username and passowrd
- secure: "b7eMDIolaAnq1voGKC1ez7Kcf+/A0WZDJEHBvNwk2KubBfrGOE83GMDrFNF4NqjIprqIAvVKj+TrX1ckCvs24re3IqUJo71TaF1IgxzDDPwSsmNh5UMmvZkeiJys9bWjqDO9wYR5ietNmIE18qyMc8ToJk8oKm6AXuAG2n6znmM="
- secure: "PHCp7F3nApp38Mz6b4/OLxgfBiikRGzPQDHg3R5LX+SQOll24c/DMtwpPwizNuFEiCFcRmJ9uc1t0HWEerIZe5uqm7AtE/nMXBsvDZ+hj4Tz/fEBF98a1k4WLYheN1exFidVkJgdAeiwMOOUQXw5KuIX62bxBdzsdcd0QGwxiXo="
Expand All @@ -42,6 +41,7 @@ matrix:
services: docker
env:
- TRAVIS_CONFIG=linux
- CCACHE_DIR=${HOME}/.ccache_testing
- DOCKER_TAG=$( [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && echo $TRAVIS_BRANCH | sed 's/master/latest/' || echo "latest" )
- DOCKER_BUILD_DEPS_FILE=qgis3-build-deps.dockerfile

Expand Down Expand Up @@ -104,6 +104,7 @@ matrix:
services: docker
env:
- TRAVIS_CONFIG=docker_image
- CCACHE_DIR=${HOME}/.ccache_docker_build_bionic
- DOCKER_TAG=$( echo $TRAVIS_BRANCH | sed 's/master/latest/' )
- DOCKER_BUILD_DEPS_FILE=qgis3-build-deps.dockerfile

Expand All @@ -116,6 +117,7 @@ matrix:
services: docker
env:
- TRAVIS_CONFIG=docker_image
- CCACHE_DIR=${HOME}/.ccache_docker_build_cosmic
- DOCKER_TAG="$( echo $TRAVIS_BRANCH | sed 's/master/latest/' )_cosmic"
- DOCKER_BUILD_DEPS_FILE=qgis3-build-deps-cosmic.dockerfile

Expand Down

0 comments on commit 943492e

Please sign in to comment.