QGIS/.docker/docker-qgis-build.sh

101 lines
2.3 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
2017-09-21 09:07:37 +02:00
set -e
##############
# Setup ccache
##############
export CCACHE_TEMPDIR=/tmp
2020-11-05 10:29:57 +01:00
# Github workflow cache max size is 2.0, but ccache data get compressed (roughly 1/5?)
ccache -M 2.0G
# Temporarily uncomment to debug ccache issues
# export CCACHE_LOGFILE=/tmp/cache.debug
ccache -z
##############################
# Variables for output styling
##############################
bold=$(tput bold)
endbold=$(tput sgr0)
###########
# Configure
###########
pushd /root/QGIS > /dev/null
mkdir -p build
pushd build > /dev/null
echo "${bold}Running cmake...${endbold}"
2021-02-03 10:08:44 +01:00
echo "::group::cmake"
export CC=/usr/lib/ccache/clang
2019-11-07 13:06:49 +01:00
export CXX=/usr/lib/ccache/clang++
2021-02-26 08:21:10 +01:00
CMAKE_EXTRA_ARGS=()
if [[ ${PATCH_QT_3D} == "true" ]]; then
2021-02-26 08:21:10 +01:00
CMAKE_EXTRA_ARGS+=(
"-DQT5_3DEXTRA_LIBRARY=/usr/lib/x86_64-linux-gnu/libQt53DExtras.so"
"-DQT5_3DEXTRA_INCLUDE_DIR=/root/QGIS/external/qt3dextra-headers"
"-DCMAKE_PREFIX_PATH=/root/QGIS/external/qt3dextra-headers/cmake"
"-DQt53DExtras_DIR=/root/QGIS/external/qt3dextra-headers/cmake/Qt53DExtras"
)
fi
2021-02-26 08:21:10 +01:00
cmake \
2021-02-26 08:28:13 +01:00
-GNinja \
-DUSE_CCACHE=OFF \
-DWITH_QUICK=OFF \
-DWITH_3D=${WITH_3D} \
2021-02-26 08:28:13 +01:00
-DWITH_STAGED_PLUGINS=ON \
-DWITH_GRASS=OFF \
-DSUPPRESS_QT_WARNINGS=ON \
-DENABLE_TESTS=ON \
-DENABLE_MODELTEST=ON \
-DENABLE_PGTEST=ON \
-DENABLE_SAGA_TESTS=ON \
-DENABLE_MSSQLTEST=ON \
-DENABLE_HANATEST=${HANA_TESTS_ENABLED} \
-DENABLE_ORACLETEST=ON \
-DPUSH_TO_CDASH=${PUSH_TO_CDASH} \
-DWITH_HANA=ON \
-DWITH_QSPATIALITE=ON \
-DWITH_QWTPOLAR=OFF \
-DWITH_APIDOC=OFF \
-DWITH_ASTYLE=OFF \
-DWITH_DESKTOP=ON \
-DWITH_BINDINGS=ON \
-DWITH_SERVER=ON \
-DWITH_ORACLE=ON \
-DWITH_PDAL=ON \
-DORACLE_INCLUDEDIR=/instantclient_19_9/sdk/include/ \
-DORACLE_LIBDIR=/instantclient_19_9/ \
-DDISABLE_DEPRECATED=ON \
-DPYTHON_TEST_WRAPPER="timeout -sSIGSEGV 55s" \
-DCXX_EXTRA_FLAGS="${CLANG_WARNINGS}" \
-DWERROR=TRUE \
-DADD_CLAZY_CHECKS=ON \
2021-02-26 08:21:10 +01:00
${CMAKE_EXTRA_ARGS[*]} ..
2021-02-03 10:08:44 +01:00
echo "::endgroup::"
#######
# Build
#######
echo "${bold}Building QGIS...${endbold}"
2021-02-03 10:08:44 +01:00
echo "::group::build"
2020-10-30 16:23:38 +01:00
${CTEST_BUILD_COMMAND}
2021-02-03 10:09:28 +01:00
echo "::endgroup::"
2017-09-21 09:07:37 +02:00
########################
# Show ccache statistics
########################
2017-10-07 11:43:52 +02:00
echo "ccache statistics"
ccache -s
2017-10-07 09:42:05 +02:00
popd > /dev/null # build
popd > /dev/null # /root/QGIS
2017-09-28 11:43:30 +02:00
[ -r /tmp/ctest-important.log ] && cat /tmp/ctest-important.log || true
2019-03-05 20:59:03 +01:00