JKQtPlotter/appveyor.yml

244 lines
9.3 KiB
YAML
Raw Normal View History

version: 0.{build}-{branch}
# don't build tags
skip_tags: true
# exclude gh-pages branch
branches:
except:
- gh-pages
shallow_clone: true
2022-07-20 01:09:16 +08:00
# auto-build VSProject: OFF
build: false
#configurations to build
configuration:
- Release
# - debug
2018-12-20 01:58:18 +08:00
# define build matrix
2018-12-20 01:58:18 +08:00
environment:
global:
JOMDIR: C:\Qt\Tools\QtCreator\bin
VSVER: 0
CMAKE_BUILDFLAGS:
USE_CMAKE: true
INSTALL_QMAKE5: false
2018-12-20 01:58:18 +08:00
matrix:
2022-07-20 13:29:04 +08:00
- QTABI: gcc_64
COMPILER: GCC
2022-07-19 22:03:23 +08:00
QTVER: 5.15
2022-07-19 22:08:24 +08:00
USE_CMAKE: false
2022-07-20 13:29:04 +08:00
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
CMAKE_GENERATOR: "Unix Makefiles"
INSTALL_QMAKE5: true
2022-07-19 22:08:24 +08:00
- QTABI: msvc2019_64
COMPILER: MSVC
QTVER: 5.15
2022-07-20 01:09:16 +08:00
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_GENERATOR: "Visual Studio 16 2019"
CMAKE_BUILDFLAGS: /verbosity:minimal /maxcpucount
2022-07-19 22:08:24 +08:00
2022-04-22 21:24:54 +08:00
- QTABI: msvc2019_64
COMPILER: MSVC
QTVER: 6.4
2022-07-20 01:09:16 +08:00
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
2022-04-22 21:24:54 +08:00
CMAKE_GENERATOR: "Visual Studio 16 2019"
CMAKE_BUILDFLAGS: /verbosity:minimal /maxcpucount
- QTABI: gcc_64
COMPILER: GCC
QTVER: 5.15
2022-07-20 01:09:16 +08:00
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
CMAKE_GENERATOR: "Unix Makefiles"
INSTALL_QMAKE5: true
2022-04-22 21:24:54 +08:00
- QTABI: gcc_64
COMPILER: GCC
QTVER: 6.4
2022-07-20 01:09:16 +08:00
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
2022-04-22 21:24:54 +08:00
CMAKE_GENERATOR: "Unix Makefiles"
INSTALL_QMAKE5: true
2022-07-19 00:14:00 +08:00
- QTABI: macos
COMPILER: CLANG
QTVER: 6.4
2022-07-20 01:09:16 +08:00
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
2022-07-19 00:14:00 +08:00
CMAKE_GENERATOR: "Unix Makefiles"
2022-07-20 01:09:16 +08:00
2018-12-20 01:58:18 +08:00
for:
# Windows (MinGW 8.1 & MSVC2019)
-
matrix:
only:
2022-07-20 01:09:16 +08:00
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
init:
- cmd: echo == INIT SYSTEM ENVIRONMENT ======================================================================
- cmd: echo NUMBER_OF_PROCESSORS=%NUMBER_OF_PROCESSORS%
- cmd: echo PROCESSOR_IDENTIFIER=%PROCESSOR_IDENTIFIER%
- cmd: echo APPVEYOR_BUILD_WORKER_IMAGE=%APPVEYOR_BUILD_WORKER_IMAGE%
- cmd: echo QTABI=%QTABI%
- cmd: echo CMAKE_GENERATOR=%CMAKE_GENERATOR%
- cmd: echo CMAKE_BUILDFLAGS=%CMAKE_BUILDFLAGS%
install:
# Init compiler environment
- cmd: echo == INIT COMPILER ENVIRONMENT ====================================================================
- cmd: set QTDIR=C:\Qt\%QTVER%\%QTABI%\bin
- cmd: set QT_DIR=C:\Qt\%QTVER%\%QTABI%\bin
- cmd: set PATH=%QTDIR%;%JOMDIR%;%PATH%
- cmd: if %COMPILER%==MinGW set "PATH=%MINGWDIR%\bin;%PATH%"
- cmd: if %QTABI%==msvc2019 call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
- cmd: if %QTABI%==msvc2019_64 call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
# Rename sh.exe as sh.exe in PATH interferes with MinGW
- cmd: if %COMPILER%==MinGW rename "C:\Program Files\Git\usr\bin\sh.exe" "sh2.exe"
- cmd: echo QTDIR=%QTDIR%
- cmd: echo QT_DIR=%QT_DIR%
- cmd: echo JOMDIR=%JOMDIR%
- cmd: echo PATH=%PATH%
# Install OpenCV
- cmd: echo == INSTALL OPENCV ===============================================================================
- cmd: choco install OpenCV
- cmd: set OPENCV_DIR=C:\tools\opencv\build
- cmd: echo OPENCV_DIR=%OPENCV_DIR%
# Install CImg
- cmd: echo == INSTALL CIMG =================================================================================
- cmd: mkdir C:\tools\cimg
- cmd: git clone --depth=1 https://github.com/dtschump/CImg.git C:\tools\cimg
- cmd: set CIMG_DIR=C:\tools\cimg
- cmd: echo CIMG_DIR=%CIMG_DIR%
- cmd: set CIMG_INCLUDE_DIR=C:\tools\cimg
- cmd: echo CIMG_INCLUDE_DIR=%CIMG_INCLUDE_DIR%
build_script:
- cmd: echo == BUILD JKQtPlotter ============================================================================
- cmd: mkdir build
- cmd: cd build
- cmd: if %USE_CMAKE%==true cmake --version
- cmd: if %USE_CMAKE%==true cmake -G "%CMAKE_GENERATOR%" "-DCMAKE_PREFIX_PATH=%QTDIR%;%CIMG_INCLUDE_DIR%" ..
2022-07-19 20:35:08 +08:00
- cmd: if %USE_CMAKE%==true cmake --build . --config "%CONFIGURATION%" -j%NUMBER_OF_PROCESSORS% -- %CMAKE_BUILDFLAGS%
- cmd: if %USE_CMAKE%==false qmake.exe -v
- cmd: if %USE_CMAKE%==false qmake.exe CONFIG+=%CONFIGURATION% ..\JKQtPlotterBuildAllExamples.pro
- cmd: if %USE_CMAKE%==false call %MAKETOOL%
- cmd: cd ..
2022-07-19 05:01:18 +08:00
# Linux (Ubuntu2004)
-
matrix:
only:
2022-07-20 01:09:16 +08:00
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
2022-07-19 05:01:18 +08:00
init:
- sh: echo == INIT SYSTEM ENVIRONMENT ======================================================================
- sh: echo _NPROCESSORS_ONLN=$(getconf _NPROCESSORS_ONLN)
- sh: echo APPVEYOR_BUILD_WORKER_IMAGE=$APPVEYOR_BUILD_WORKER_IMAGE
- sh: echo QTABI=$QTABI
- sh: echo CMAKE_GENERATOR=$CMAKE_GENERATOR
install:
# Init compiler environment
- sh: echo == INIT COMPILER ENVIRONMENT ====================================================================
- sh: export QTDIR=$HOME/Qt/$QTVER/$QTABI/
- sh: export QT_DIR=$HOME/Qt/$QTVER/$QTABI/
- sh: export Qt5_DIR=$QTDIR/lib/cmake
2023-05-28 20:25:50 +08:00
- sh: sudo ls /etc/apt/sources.list.d/
#- sh: sudo rm /etc/apt/sources.list.d/github_git-lfs.list
- sh: sudo apt update -yy --allow-releaseinfo-change
- 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
# Install OpenCV
- sh: |
if [ "$USE_CMAKE" = true ]; then
echo == INSTALL OPENCV ===============================================================================
sudo apt install -y libopencv-dev
fi
# Install CImg
- sh: |
if [ "$USE_CMAKE" = true ]; then
echo == INSTALL CIMG =================================================================================
mkdir $HOME/cimg
git clone --depth=1 https://github.com/dtschump/CImg.git $HOME/cimg
ls $HOME/*
ls $HOME/cimg/*
export CIMG_DIR=$HOME/cimg
echo "CIMG_DIR=$CIMG_DIR"
export CIMG_INCLUDE_DIR=$HOME/cimg
echo "CIMG_INCLUDE_DIR=$CIMG_INCLUDE_DIR"
fi
2018-12-20 01:58:18 +08:00
build_script:
- sh: echo == BUILD JKQtPlotter ============================================================================
- sh: mkdir build
- sh: cd build
2022-07-20 18:34:14 +08:00
- sh: |
if [ "$USE_CMAKE" = true ]; then
2022-07-20 13:29:04 +08:00
echo --- Run CMake Configure -----------------------------------------------------------------------------
cmake --version
cmake -G "$CMAKE_GENERATOR" "-DCMAKE_PREFIX_PATH=$QTDIR;$CIMG_INCLUDE_DIR" ..
2022-07-20 13:29:04 +08:00
echo --- Build using CMake -------------------------------------------------------------------------------
cmake --build . --config "$CONFIGURATION" -j$(getconf _NPROCESSORS_ONLN) -- $CMAKE_BUILDFLAGS
fi
2022-07-20 18:34:14 +08:00
- sh: |
if [ "$USE_CMAKE" = false ]; then
2022-07-20 13:29:04 +08:00
echo --- Run QMake Configure -----------------------------------------------------------------------------
2022-07-21 01:37:09 +08:00
$QTDIR/bin/qmake -v
$QTDIR/bin/qmake -makefile -o Makefile "CONFIG+=%CONFIGURATION%" ../JKQtPlotterAppveyorBuild.pro
2022-07-20 18:34:14 +08:00
echo --- Build for QMake ---------------------------------------------------------------------------------
2022-07-21 02:58:11 +08:00
make -j$(getconf _NPROCESSORS_ONLN)
2022-07-20 13:29:04 +08:00
fi
2022-07-19 05:01:18 +08:00
# MacOS (Monterey)
-
matrix:
only:
2022-07-20 01:09:16 +08:00
- APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
2022-07-19 05:01:18 +08:00
init:
- sh: echo == INIT SYSTEM ENVIRONMENT ======================================================================
- sh: echo _NPROCESSORS_ONLN=$(getconf _NPROCESSORS_ONLN)
- sh: echo APPVEYOR_BUILD_WORKER_IMAGE=$APPVEYOR_BUILD_WORKER_IMAGE
- sh: echo QTABI=$QTABI
- sh: echo CMAKE_GENERATOR=$CMAKE_GENERATOR
install:
# Init compiler environment
- sh: echo == INIT COMPILER ENVIRONMENT ====================================================================
- sh: export QTDIR=$HOME/Qt/$QTVER/$QTABI/
- sh: export QT_DIR=$HOME/Qt/$QTVER/$QTABI/
- sh: export Qt5_DIR=$QTDIR/lib/cmake
- sh: echo QTDIR=$QTDIR
- sh: echo QT_DIR=$QT_DIR
- sh: echo Qt5_DIR=$Qt5_DIR
- sh: echo PATH=$PATH
# Install OpenCV
build_script:
- sh: echo == BUILD JKQtPlotter ============================================================================
- sh: mkdir build
- sh: cd build
- sh: echo --- Run CMake Configure -----------------------------------------------------------------------------
- sh: cmake --version
- sh: cmake -G "$CMAKE_GENERATOR" "-DCMAKE_PREFIX_PATH=$QTDIR" ..
- sh: echo --- Build using CMake -------------------------------------------------------------------------------
2022-07-19 20:35:08 +08:00
- sh: cmake --build . --config "$CONFIGURATION" -j$(getconf _NPROCESSORS_ONLN) -- $CMAKE_BUILDFLAGS