From e132b5bf960d7ca4efe94ff565a5bc2e77231512 Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Sat, 23 Jul 2022 12:40:05 +0200 Subject: [PATCH] tried to improve Appveyor build-script to increase build speed --- JKQtPlotterAppveyorBuild.pro | 23 +++++++++++++++++++++++ appveyor.yml | 30 +++++++++++++++++++++++------- 2 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 JKQtPlotterAppveyorBuild.pro diff --git a/JKQtPlotterAppveyorBuild.pro b/JKQtPlotterAppveyorBuild.pro new file mode 100644 index 0000000000..40cef824a6 --- /dev/null +++ b/JKQtPlotterAppveyorBuild.pro @@ -0,0 +1,23 @@ +TEMPLATE = subdirs + +SUBDIRS += jkqtplotterlib \ + jkqtplotterlib_sharedlib \ + jkqtmathtextlib \ + jkqtmathtextlib_sharedlib \ + jkqtpcommonlib \ + jkqtpcommonlib_sharedlib \ + jkqtfastplotterlib \ + jkqtfastplotterlib_sharedlib + + +jkqtplotterlib.file = qmake/staticlib/jkqtplotterlib/jkqtplotterlib.pro +jkqtplotterlib_sharedlib.file = qmake/sharedlib/jkqtplotterlib/jkqtplotterlib.pro + +jkqtmathtextlib.file = qmake/staticlib/jkqtmathtextlib/jkqtmathtextlib.pro +jkqtmathtextlib_sharedlib.file = qmake/sharedlib/jkqtmathtextlib/jkqtmathtextlib.pro + +jkqtpcommonlib.file = qmake/staticlib/jkqtpcommonlib/jkqtpcommonlib.pro +jkqtpcommonlib_sharedlib.file = qmake/sharedlib/jkqtpcommonlib/jkqtpcommonlib.pro + +jkqtfastplotterlib.file = qmake/staticlib/jkqtfastplotterlib/jkqtfastplotterlib.pro +jkqtfastplotterlib_sharedlib.file = qmake/sharedlib/jkqtfastplotterlib/jkqtfastplotterlib.pro diff --git a/appveyor.yml b/appveyor.yml index 25c997703e..0bb5a552ee 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,6 +27,7 @@ environment: VSVER: 0 CMAKE_BUILDFLAGS: USE_CMAKE: true + INSTALL_QMAKE5: false matrix: @@ -36,6 +37,7 @@ environment: USE_CMAKE: false APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004 CMAKE_GENERATOR: "Unix Makefiles" + INSTALL_QMAKE5: true - QTABI: msvc2019_64 COMPILER: MSVC @@ -56,12 +58,14 @@ environment: QTVER: 5.15 APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004 CMAKE_GENERATOR: "Unix Makefiles" + INSTALL_QMAKE5: true - QTABI: gcc_64 COMPILER: GCC QTVER: 6.2 APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004 CMAKE_GENERATOR: "Unix Makefiles" + INSTALL_QMAKE5: true - QTABI: macos COMPILER: CLANG @@ -150,18 +154,30 @@ for: - sh: export QT_DIR=$HOME/Qt/$QTVER/$QTABI/ - sh: export Qt5_DIR=$QTDIR/lib/cmake - sh: sudo apt update -qq - - sh: sudo apt install -y build-essential git graphviz doxygen mesa-common-dev libglu1-mesa-dev qt5-qmake cmake + - sh: if [ "$INSTALL_QMAKE5" = true ]; then sudo apt install -y build-essential git mesa-common-dev libglu1-mesa-dev qt5-qmake cmake; fi + - sh: if [ "$INSTALL_QMAKE5" = false ]; then sudo apt install -y build-essential git mesa-common-dev libglu1-mesa-dev cmake; fi - sh: echo QTDIR=$QTDIR - sh: echo QT_DIR=$QT_DIR - sh: echo Qt5_DIR=$Qt5_DIR - sh: echo PATH=$PATH - sh: sudo apt-get update -y # Install OpenCV - - sh: echo == INSTALL OPENCV =============================================================================== - - sh: sudo apt install -y libopencv-dev + - sh: | + if [ "$USE_CMAKE" = true ]; then + echo == INSTALL OPENCV =============================================================================== + sudo apt install -y libopencv-dev + fi # Install CImg - #- sh: echo == INSTALL CImg ================================================================================= - #- sh: sudo apt install -y cimg-dev + - sh: | + if [ "$USE_CMAKE" = true ]; then + echo == INSTALL CIMG ================================================================================= + mkdir $HOME/cimg + git clone --depth=1 https://github.com/dtschump/CImg.git $HOME/\cimg + set CIMG_DIR=$HOME/\cimg + echo CIMG_DIR=$CIMG_DIR + set CIMG_INCLUDE_DIR=$HOME/\cimg + echo CIMG_INCLUDE_DIR=$CIMG_INCLUDE_DIR + fi build_script: - sh: echo == BUILD JKQtPlotter ============================================================================ @@ -171,7 +187,7 @@ for: if [ "$USE_CMAKE" = true ]; then echo --- Run CMake Configure ----------------------------------------------------------------------------- cmake --version - cmake -G "$CMAKE_GENERATOR" "-DCMAKE_PREFIX_PATH=$QTDIR" .. + cmake -G "$CMAKE_GENERATOR" "-DCMAKE_PREFIX_PATH=$QTDIR;$CIMG_INCLUDE_DIR" .. echo --- Build using CMake ------------------------------------------------------------------------------- cmake --build . --config "$CONFIGURATION" -j$(getconf _NPROCESSORS_ONLN) -- $CMAKE_BUILDFLAGS fi @@ -179,7 +195,7 @@ for: if [ "$USE_CMAKE" = false ]; then echo --- Run QMake Configure ----------------------------------------------------------------------------- $QTDIR/bin/qmake -v - $QTDIR/bin/qmake -makefile -o Makefile "CONFIG+=%CONFIGURATION%" ../JKQtPlotterBuildLibsOnly.pro + $QTDIR/bin/qmake -makefile -o Makefile "CONFIG+=%CONFIGURATION%" ../JKQtPlotterAppveyorBuild.pro echo --- Build for QMake --------------------------------------------------------------------------------- make -j$(getconf _NPROCESSORS_ONLN) fi