-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
101 lines (84 loc) · 3.88 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
# Specify version format
version: "3.2.0-{build}"
os: Visual Studio 2015
# to add several platforms to build matrix
platform:
- x64
configuration:
- Release
environment:
VISP_OPENCV_MINGW_FILE: opencv-3.3.0-MinGW-build-package.7z
VISP_OPENCV_MINGW_DIR: opencv-3.3.0-MinGW-build-package
VISP_OPENCV_MINGW_PKG: https://github.com/s-trinh/visp-dependencies/blob/master/opencv-3.3.0-MinGW-build-package.7z?raw=true
matrix:
- CMAKE_GENERATOR: MinGW Makefiles
BUILD_NAME: mingw
- CMAKE_GENERATOR: Visual Studio 14 2015 Win64
BUILD_NAME: vs2015
# 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
- if "%CMAKE_GENERATOR%"=="Visual Studio 14 2015 Win64" choco install OpenCV
- 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"C:\projects\deps"
}
# ant
- choco install ant
cache:
- opencv-3.3.0-MinGW-build-package.7z -> appveyor.yml
# visp clone directory
clone_folder: C:\projects\visp\visp
before_build:
# Use MinGW-w64 in C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1
- cd C:\
- ren MinGW MinGW-w32
# 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\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin;%PATH%
- dir C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin
- if "%CMAKE_GENERATOR%"=="MinGW Makefiles" mingw32-make --version
# Setup ViSP
- if "%CMAKE_GENERATOR%"=="Visual Studio 14 2015 Win64" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc14\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 14 2015 Win64" set OpenCV_DIR=C:\tools\opencv\build
- if "%CMAKE_GENERATOR%"=="Visual Studio 14 2015 Win64" set OpenCV_DLL_DIR=%OpenCV_DIR%\%platform%\vc14\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%\x86\mingw\bin
- set PATH=%OPENCV_DLL_DIR%;%PATH%
# Issue with pthreads threading on MinGW AppVeyor
- if "%CMAKE_GENERATOR%"=="MinGW Makefiles" set APPVEYOR_THREADING=false
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 14 2015 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 14 2015 Win64" ctest --output-on-failure
# Issue with exception on MinGW AppVeyor
- if "%CMAKE_GENERATOR%"=="MinGW Makefiles" ctest --output-on-failure -E testMatrixException