forked from lagadic/visp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
109 lines (91 loc) · 4.56 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Specify version format
version: "3.2.0-{build}"
image:
- Visual Studio 2017
# to add several platforms to build matrix
platform:
- x64
configuration:
- Release
environment:
VISP_OPENCV_MINGW_FILE: opencv-4.0.0-ebc801563-MinGW-build-package.7z
VISP_OPENCV_MINGW_DIR: opencv-4.0.0-ebc801563-MinGW-build-package
VISP_OPENCV_MINGW_PKG: https://github.com/s-trinh/visp-dependencies/blob/master/opencv-4.0.0-ebc801563-MinGW-build-package.7z?raw=true
VISP_OPENCV_VS2015_2017_FILE: opencv-4.0.0-beta-vc14_vc15.exe
VISP_OPENCV_VS2015_2017_DIR: opencv-4.0.0-beta-vc14_vc15
VISP_OPENCV_VS2015_2017_PKG: https://github.com/opencv/opencv/releases/download/4.0.0-beta/opencv-4.0.0-beta-vc14_vc15.exe
matrix:
- CMAKE_GENERATOR: MinGW Makefiles
BUILD_NAME: mingw
- CMAKE_GENERATOR: Visual Studio 15 2017 Win64
BUILD_NAME: vs2017
# Scripts that are called at very beginning, before repo cloning
init:
- cmake --version
- msbuild /version
install:
# Create temp dir to collect test outputs
- md C:\temp
# All external dependencies are installed in C:\projects\deps
- mkdir C:\projects\deps
- cd C:\projects\deps
# visp-images
- git clone --depth 1 https://github.com/lagadic/ViSP-images C:\projects\deps\ViSP-images
- set VISP_INPUT_IMAGE_PATH=C:\projects\deps
# opencv
- ps: >-
if (${env:CMAKE_GENERATOR} -imatch "Visual Studio 15 2017 Win64" -and !(Test-Path ${env:VISP_OPENCV_VS2015_2017_FILE})) {
echo "Downloading OpenCV Visual Studio from ${env:VISP_OPENCV_VS2015_2017_PKG} ..."
appveyor DownloadFile "${env:VISP_OPENCV_VS2015_2017_PKG}" -FileName ${env:VISP_OPENCV_VS2015_2017_FILE} -Timeout 1200000
}
- ps: >-
if (${env:CMAKE_GENERATOR} -imatch "Visual Studio 15 2017 Win64") {
echo "Extracting OpenCV Visual Studio to C:\projects\deps ..."
7z x ${env:VISP_OPENCV_VS2015_2017_FILE} -y "-o${env:VISP_OPENCV_VS2015_2017_DIR}"
}
- ps: >-
if (${env:CMAKE_GENERATOR} -imatch "MinGW Makefiles" -and !(Test-Path ${env:VISP_OPENCV_MINGW_FILE})) {
echo "Downloading OpenCV MinGW from ${env:VISP_OPENCV_MINGW_PKG} ..."
appveyor DownloadFile "${env:VISP_OPENCV_MINGW_PKG}" -FileName ${env:VISP_OPENCV_MINGW_FILE} -Timeout 1200000
}
- ps: >-
if (${env:CMAKE_GENERATOR} -imatch "MinGW Makefiles") {
echo "Extracting OpenCV MinGW to C:\projects\deps ..."
7z x ${env:VISP_OPENCV_MINGW_FILE} -y "-o${env:VISP_OPENCV_MINGW_DIR}"
}
cache:
- opencv-4.0.0-ebc801563-MinGW-build-package.7z -> appveyor.yml
- opencv-4.0.0-beta-vc14_vc15.exe -> appveyor.yml
# visp clone directory
clone_folder: C:\projects\visp\visp
before_build:
# Use MinGW-w64 in C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin
# Workaround for CMake not wanting sh.exe on PATH for MinGW
- if "%CMAKE_GENERATOR%"=="MinGW Makefiles" set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- if "%CMAKE_GENERATOR%"=="MinGW Makefiles" set PATH=C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin;%PATH%
- dir C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin
- if "%CMAKE_GENERATOR%"=="MinGW Makefiles" mingw32-make --version
# Setup ViSP
- if "%CMAKE_GENERATOR%"=="Visual Studio 15 2017 Win64" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc15\bin
- if "%CMAKE_GENERATOR%"=="MinGW Makefiles" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\mingw\bin
- SET PATH=%VISP_DLL_DIR%;%PATH%
# Setup OpenCV
- if "%CMAKE_GENERATOR%"=="Visual Studio 15 2017 Win64" set OpenCV_DIR=C:\projects\deps\%VISP_OPENCV_VS2015_2017_DIR%\opencv\build
- if "%CMAKE_GENERATOR%"=="Visual Studio 15 2017 Win64" set OpenCV_DLL_DIR=%OpenCV_DIR%\%platform%\vc15\bin
- if "%CMAKE_GENERATOR%"=="MinGW Makefiles" set OpenCV_DIR=C:\projects\deps\%VISP_OPENCV_MINGW_DIR%\install
- if "%CMAKE_GENERATOR%"=="MinGW Makefiles" set OpenCV_DLL_DIR=%OpenCV_DIR%\x64\mingw\bin
- set PATH=%OPENCV_DLL_DIR%;%PATH%
build_script:
- echo %PATH%
- dir C:\projects\deps
- dir C:\tools
- dir %OpenCV_DLL_DIR%
- md C:\projects\visp\build
- cd C:\projects\visp\build
- cmake -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=%configuration% ..\visp
- if "%CMAKE_GENERATOR%"=="Visual Studio 15 2017 Win64" cmake --build . --config %configuration% --target install -- /m:2
- if "%CMAKE_GENERATOR%"=="MinGW Makefiles" cmake --build . --config %configuration% --target install -- -j2
- dir C:\projects\visp\build\install
- dir %VISP_DLL_DIR%
- if "%CMAKE_GENERATOR%"=="Visual Studio 15 2017 Win64" ctest --output-on-failure
- if "%CMAKE_GENERATOR%"=="MinGW Makefiles" ctest --output-on-failure