tried to improve Appveyor build-script to increase build speed

This commit is contained in:
jkriege2 2022-07-23 12:40:05 +02:00
parent 3468e1b331
commit e132b5bf96
2 changed files with 46 additions and 7 deletions

View File

@ -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

View File

@ -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