-
Notifications
You must be signed in to change notification settings - Fork 286
/
appveyor.yml
94 lines (77 loc) · 3.7 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
# Specify version format
version: "3.6.1-{build}"
image:
- Visual Studio 2022
# to add several platforms to build matrix
platform:
- x64
configuration:
- Release
environment:
matrix:
- TARGET: mingw
# - TARGET: msvc
- TARGET: uwp
- TARGET: visp_sample
# 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
- set VISP_INPUT_IMAGE_PATH=C:\projects\deps\visp-images
# visp_sample
- git clone --depth 1 https://github.com/lagadic/visp_sample
# visp clone directory
clone_folder: C:\projects\visp\visp
before_build:
# Setup path for mingw
# Use MinGW-w64 in C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
- if "%TARGET%"=="mingw" set MINGW_DIR=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
# Workaround for CMake not wanting sh.exe on PATH for MinGW
- if "%TARGET%"=="mingw" set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- if "%TARGET%"=="mingw" set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%
- if "%TARGET%"=="mingw" dir C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
- if "%TARGET%"=="mingw" mingw32-make --version
# Setup path for ViSP
- if "%TARGET%"=="msvc" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc17\bin
- if "%TARGET%"=="msvc" set PATH=%VISP_DLL_DIR%;%PATH%
- if "%TARGET%"=="mingw" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\mingw\bin
- if "%TARGET%"=="mingw" set PATH=%VISP_DLL_DIR%;%PATH%
- if "%TARGET%"=="visp_sample" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc17\bin
- if "%TARGET%"=="visp_sample" set PATH=%VISP_DLL_DIR%;%PATH%
build_script:
- echo %PATH%
- dir C:\projects\deps
- dir C:\tools
- md C:\projects\visp\build
- cd C:\projects\visp\build
# mingw case
- if "%TARGET%"=="mingw" cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=%configuration% ..\visp
- if "%TARGET%"=="mingw" cmake --build . --config %configuration% --target install -- -j2
- if "%TARGET%"=="mingw" dir C:\projects\visp\build\install
- if "%TARGET%"=="mingw" dir %VISP_DLL_DIR%
- if "%TARGET%"=="mingw" ctest --output-on-failure -j2
# msvc case
- if "%TARGET%"=="msvc" cmake -G "Visual Studio 17 2022" -A %platform% ..\visp
- if "%TARGET%"=="msvc" cmake --build . --config %configuration% --target install -- /m:2
- if "%TARGET%"=="msvc" dir C:\projects\visp\build\install
- if "%TARGET%"=="msvc" dir %VISP_DLL_DIR%
- if "%TARGET%"=="msvc" ctest --output-on-failure -j2
# uwp case
- if "%TARGET%"=="uwp" cmake -G "Visual Studio 17 2022" -A %platform% -DCMAKE_SYSTEM_NAME="WindowsStore" -DCMAKE_SYSTEM_VERSION="10.0" -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_TUTORIALS=OFF ..\visp
- if "%TARGET%"=="uwp" cmake --build . --config %configuration% -- /m:2
# visp_sample case: ViSP as 3rdparty with cmake
- if "%TARGET%"=="visp_sample" cmake -G "Visual Studio 17 2022" -A %platform% -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_TUTORIALS=OFF ..\visp
- if "%TARGET%"=="visp_sample" cmake --build . --config %configuration% --target install -- /m:2
- if "%TARGET%"=="visp_sample" cd C:\projects\deps\visp_sample
- if "%TARGET%"=="visp_sample" mkdir build
- if "%TARGET%"=="visp_sample" cd build
- if "%TARGET%"=="visp_sample" cmake -G "Visual Studio 17 2022" -A %platform% .. -DVISP_DIR=C:\projects\visp\build\install
- if "%TARGET%"=="visp_sample" cmake --build . --config %configuration% -- /m:2