Skip to content

Commit

Permalink
fix Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Aug 25, 2020
1 parent e2db34f commit 46acc34
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .docker/qgis.dockerfile
Expand Up @@ -28,7 +28,8 @@ RUN echo "ccache_dir: "$(du -h --max-depth=0 ${CCACHE_DIR})

WORKDIR /QGIS/build

RUN cmake \
RUN SUCCESS=OK \
&& cmake \
-GNinja \
-DUSE_CCACHE=OFF \
-DCMAKE_BUILD_TYPE=Release \
Expand All @@ -48,13 +49,11 @@ RUN cmake \
-DWITH_APIDOC=OFF \
-DWITH_ASTYLE=OFF \
-DQT5_3DEXTRA_LIBRARY="/usr/lib/x86_64-linux-gnu/libQt53DExtras.so" \
-DQT5_3DEXTRA_INCLUDE_DIR="/QGIS/external/qt3dextra-headers" \
-DQt53DExtras_DIR="/QGIS/external/qt3dextra-headers/cmake/Qt53DExtras" \
-DCMAKE_PREFIX_PATH="/QGIS/external/qt3dextra-headers/cmake" \
.. \
&& echo "Timeout: ${BUILD_TIMEOUT}s" \
&& SUCCESS=OK \
&& timeout ${BUILD_TIMEOUT}s ninja install || SUCCESS=TIMEOUT \
&& echo "$SUCCESS" > /QGIS/build_exit_value
.. \
&& ninja install || SUCCESS=FAILED \
&& echo "$SUCCESS" > /QGIS/build_exit_value

# Additional run-time dependencies
RUN pip3 install jinja2 pygments
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/build-docker.yml
Expand Up @@ -45,6 +45,7 @@ jobs:
echo "branch: ${branch}"
echo "docker tag: ${DOCKER_TAG}"
echo "docker deps tag: ${DOCKER_DEPS_TAG}"
[[ -d ~/.ccache ]] && echo "cache directory (~/.ccache) exists" || mkdir -p ~/.ccache
# copy ccache dir within QGIS source so it can be accessed from docker
Expand All @@ -66,6 +67,14 @@ jobs:
--cache-from "qgis/qgis:${DOCKER_TAG}" \
-t "qgis/qgis:BUILDER" \
-f qgis.dockerfile ..
docker cp qgis_container:/QGIS/build_exit_value ${HOME}/build_exit_value
if [[ $(cat ${HOME}/build_exit_value) ne "OK" ]]; then
echo "Build failed, not pushing image"
exit 1
fi
echo "Copy build cache from Docker container to Travis cache directory"
rm -rf ~/.ccache/*
mkdir -p ~/.ccache
Expand All @@ -89,6 +98,11 @@ jobs:
docker push "qgis/qgis:${DOCKER_TAG}"
echo "##[endgroup]"
- name: Trigger PyQGIS API docs build for ${{ matrix.branch }}
if: success()
env:
branch: ${{ matrix.branch }}
run: |
echo "##[group] Trigger build of PyQGIS Documentation"
body='{
"ref": "master",
Expand Down

0 comments on commit 46acc34

Please sign in to comment.