add cache to mingw builds (#41734)

This commit is contained in:
Denis Rouzaud 2021-02-22 13:47:06 +01:00 committed by GitHub
parent 61b6cc21e8
commit 002e634dba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View File

@ -63,6 +63,7 @@ jobs:
- name: Build QGIS Application - name: Build QGIS Application
run: | run: |
mkdir -p ${GITHUB_WORKSPACE}/.ccache
docker run \ docker run \
--env CCACHE_DIR=/QGIS/.ccache \ --env CCACHE_DIR=/QGIS/.ccache \
-w /QGIS \ -w /QGIS \

View File

@ -71,6 +71,7 @@ installprefix="$installroot/usr/$arch-w64-mingw32/sys-root/mingw"
rm -rf "$installroot" rm -rf "$installroot"
# Build # Build
echo "::group::cmake"
mkdir -p "$BUILDDIR" mkdir -p "$BUILDDIR"
( (
CRSSYNC_BIN=$(readlink -f "$SRCDIR")/build/output/bin/crssync CRSSYNC_BIN=$(readlink -f "$SRCDIR")/build/output/bin/crssync
@ -78,6 +79,7 @@ mkdir -p "$BUILDDIR"
QSCI_VER=$(grep -Eo '\s*([0-9]+\.[0-9]+\.[0-9]+)' "$MINGWROOT/include/qt5/Qsci/qsciglobal.h") QSCI_VER=$(grep -Eo '\s*([0-9]+\.[0-9]+\.[0-9]+)' "$MINGWROOT/include/qt5/Qsci/qsciglobal.h")
mingw$bits-cmake \ mingw$bits-cmake \
-DCMAKE_CROSS_COMPILING=1 \ -DCMAKE_CROSS_COMPILING=1 \
-DUSE_CCACHE=ON \
-DCMAKE_BUILD_TYPE=$buildtype \ -DCMAKE_BUILD_TYPE=$buildtype \
-DNATIVE_CRSSYNC_BIN="$CRSSYNC_BIN" \ -DNATIVE_CRSSYNC_BIN="$CRSSYNC_BIN" \
-DQSCINTILLA_VERSION_STR="$QSCI_VER" \ -DQSCINTILLA_VERSION_STR="$QSCI_VER" \
@ -103,6 +105,8 @@ mkdir -p "$BUILDDIR"
-DTXT2TAGS_EXECUTABLE= \ -DTXT2TAGS_EXECUTABLE= \
.. ..
) )
echo "::endgroup::"
# Compile native crssync # Compile native crssync
# mkdir -p $BUILDDIR/native_crssync # mkdir -p $BUILDDIR/native_crssync
@ -116,7 +120,12 @@ mkdir -p "$BUILDDIR"
# Xvfb :99 & # Xvfb :99 &
# export DISPLAY=:99 # export DISPLAY=:99
echo "::group::compile QGIS"
mingw$bits-make -C"$BUILDDIR" -j"$njobs" DESTDIR="${installroot}" install VERBOSE=1 mingw$bits-make -C"$BUILDDIR" -j"$njobs" DESTDIR="${installroot}" install VERBOSE=1
echo "::endgroup::"
#echo "ccache statistics"
ccache -s
# Remove plugins with missing dependencies # Remove plugins with missing dependencies
rm -rf "${installroot}/share/qgis/python/plugins/{MetaSearch,processing}" rm -rf "${installroot}/share/qgis/python/plugins/{MetaSearch,processing}"

View File

@ -12,6 +12,7 @@ dnf config-manager --add-repo https://copr.fedorainfracloud.org/coprs/smani/ming
dnf install -y --nogpgcheck \ dnf install -y --nogpgcheck \
mingw64-dlfcn \ mingw64-dlfcn \
mingw64-exiv2 \ mingw64-exiv2 \
ccache \
mingw64-gcc-c++ \ mingw64-gcc-c++ \
mingw64-gdal \ mingw64-gdal \
mingw64-gdb \ mingw64-gdb \