Skip to content

Commit b53652e

Browse files
committed
Upgrade appveyor ci with Visual Studio 2022 image
1 parent 14589a6 commit b53652e

File tree

1 file changed

+13
-63
lines changed

1 file changed

+13
-63
lines changed

appveyor.yml

+13-63
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
version: "3.6.1-{build}"
33

44
image:
5-
- Visual Studio 2017
5+
- Visual Studio 2022
66

77
# to add several platforms to build matrix
88
platform:
@@ -12,13 +12,6 @@ configuration:
1212
- Release
1313

1414
environment:
15-
VISP_OPENCV_MINGW_FILE: opencv-4.1.0-MinGW-build-package.7z
16-
VISP_OPENCV_MINGW_DIR: opencv-4.1.0-MinGW-build-package
17-
VISP_OPENCV_MINGW_PKG: https://github.com/lagadic/visp-dependencies/blob/master/opencv-4.1.0-MinGW-x86_64-7.3.0-release-posix-seh-rt_v5-rev0-build-package.7z?raw=true
18-
VISP_OPENCV_VS2015_2017_FILE: opencv-4.1.0-vc14_vc15.exe
19-
VISP_OPENCV_VS2015_2017_DIR: opencv-4.1.0-vc14_vc15
20-
VISP_OPENCV_VS2015_2017_PKG: https://github.com/opencv/opencv/releases/download/4.1.0/opencv-4.1.0-vc14_vc15.exe
21-
2215
matrix:
2316
- TARGET: mingw
2417
# - TARGET: msvc
@@ -45,67 +38,27 @@ install:
4538
# visp_sample
4639
- git clone --depth 1 https://github.com/lagadic/visp_sample
4740

48-
# opencv
49-
- ps: >-
50-
if ((${env:TARGET} -imatch "msvc" -or ${env:TARGET} -imatch "visp_sample") -and !(Test-Path ${env:VISP_OPENCV_VS2015_2017_FILE})) {
51-
echo "Downloading OpenCV Visual Studio from ${env:VISP_OPENCV_VS2015_2017_PKG} ..."
52-
appveyor DownloadFile "${env:VISP_OPENCV_VS2015_2017_PKG}" -FileName ${env:VISP_OPENCV_VS2015_2017_FILE} -Timeout 1200000
53-
}
54-
55-
- ps: >-
56-
if (${env:TARGET} -imatch "msvc" -or ${env:TARGET} -imatch "visp_sample") {
57-
echo "Extracting OpenCV Visual Studio to C:\projects\deps ..."
58-
7z x ${env:VISP_OPENCV_VS2015_2017_FILE} -y "-o${env:VISP_OPENCV_VS2015_2017_DIR}"
59-
}
60-
61-
- ps: >-
62-
if (${env:TARGET} -imatch "mingw" -and !(Test-Path ${env:VISP_OPENCV_MINGW_FILE})) {
63-
echo "Downloading OpenCV MinGW from ${env:VISP_OPENCV_MINGW_PKG} ..."
64-
appveyor DownloadFile "${env:VISP_OPENCV_MINGW_PKG}" -FileName ${env:VISP_OPENCV_MINGW_FILE} -Timeout 1200000
65-
}
66-
67-
- ps: >-
68-
if (${env:TARGET} -imatch "mingw") {
69-
echo "Extracting OpenCV MinGW to C:\projects\deps ..."
70-
7z x ${env:VISP_OPENCV_MINGW_FILE} -y "-o${env:VISP_OPENCV_MINGW_DIR}"
71-
}
72-
73-
cache:
74-
- opencv-4.1.0-MinGW-build-package.7z -> appveyor.yml
75-
- opencv-4.1.0-vc14_vc15.exe -> appveyor.yml
76-
7741
# visp clone directory
7842
clone_folder: C:\projects\visp\visp
7943

8044
before_build:
8145
# Setup path for mingw
82-
# Use MinGW-w64 in C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin
83-
- if "%TARGET%"=="mingw" set MINGW_DIR=C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64
46+
# Use MinGW-w64 in C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
47+
- if "%TARGET%"=="mingw" set MINGW_DIR=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
8448
# Workaround for CMake not wanting sh.exe on PATH for MinGW
8549
- if "%TARGET%"=="mingw" set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
86-
- if "%TARGET%"=="mingw" set PATH=C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin;%PATH%
87-
- if "%TARGET%"=="mingw" dir C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin
50+
- if "%TARGET%"=="mingw" set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%
51+
- if "%TARGET%"=="mingw" dir C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
8852
- if "%TARGET%"=="mingw" mingw32-make --version
8953

9054
# Setup path for ViSP
91-
- if "%TARGET%"=="msvc" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc15\bin
55+
- if "%TARGET%"=="msvc" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc17\bin
9256
- if "%TARGET%"=="msvc" set PATH=%VISP_DLL_DIR%;%PATH%
9357
- if "%TARGET%"=="mingw" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\mingw\bin
9458
- if "%TARGET%"=="mingw" set PATH=%VISP_DLL_DIR%;%PATH%
95-
- if "%TARGET%"=="visp_sample" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc15\bin
59+
- if "%TARGET%"=="visp_sample" set VISP_DLL_DIR=C:\projects\visp\build\install\%platform%\vc17\bin
9660
- if "%TARGET%"=="visp_sample" set PATH=%VISP_DLL_DIR%;%PATH%
9761

98-
# Setup path for OpenCV
99-
- if "%TARGET%"=="msvc" set OpenCV_DIR=C:\projects\deps\%VISP_OPENCV_VS2015_2017_DIR%\opencv\build
100-
- if "%TARGET%"=="msvc" set OpenCV_DLL_DIR=%OpenCV_DIR%\%platform%\vc15\bin
101-
- if "%TARGET%"=="msvc" set PATH=%OPENCV_DLL_DIR%;%PATH%
102-
- if "%TARGET%"=="mingw" set OpenCV_DIR=C:\projects\deps\%VISP_OPENCV_MINGW_DIR%\install
103-
- if "%TARGET%"=="mingw" set OpenCV_DLL_DIR=%OpenCV_DIR%\x64\mingw\bin
104-
- if "%TARGET%"=="mingw" set PATH=%OPENCV_DLL_DIR%;%PATH%
105-
- if "%TARGET%"=="visp_sample" set OpenCV_DIR=C:\projects\deps\%VISP_OPENCV_VS2015_2017_DIR%\opencv\build
106-
- if "%TARGET%"=="visp_sample" set OpenCV_DLL_DIR=%OpenCV_DIR%\%platform%\vc15\bin
107-
- if "%TARGET%"=="visp_sample" set PATH=%OPENCV_DLL_DIR%;%PATH%
108-
10962
build_script:
11063
- echo %PATH%
11164
- dir C:\projects\deps
@@ -114,31 +67,28 @@ build_script:
11467
- cd C:\projects\visp\build
11568

11669
# mingw case
117-
- if "%TARGET%"=="mingw" dir %OpenCV_DLL_DIR%
11870
- if "%TARGET%"=="mingw" cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=%configuration% ..\visp
11971
- if "%TARGET%"=="mingw" cmake --build . --config %configuration% --target install -- -j2
12072
- if "%TARGET%"=="mingw" dir C:\projects\visp\build\install
12173
- if "%TARGET%"=="mingw" dir %VISP_DLL_DIR%
122-
- if "%TARGET%"=="mingw" ctest --output-on-failure -V
74+
- if "%TARGET%"=="mingw" ctest --output-on-failure -j2
12375

12476
# msvc case
125-
- if "%TARGET%"=="msvc" dir %OpenCV_DLL_DIR%
126-
- if "%TARGET%"=="msvc" cmake -G "Visual Studio 15 2017" -A %platform% ..\visp
77+
- if "%TARGET%"=="msvc" cmake -G "Visual Studio 17 2022" -A %platform% ..\visp
12778
- if "%TARGET%"=="msvc" cmake --build . --config %configuration% --target install -- /m:2
12879
- if "%TARGET%"=="msvc" dir C:\projects\visp\build\install
12980
- if "%TARGET%"=="msvc" dir %VISP_DLL_DIR%
130-
- if "%TARGET%"=="msvc" ctest --output-on-failure -V
81+
- if "%TARGET%"=="msvc" ctest --output-on-failure -j2
13182

13283
# uwp case
133-
- if "%TARGET%"=="uwp" cmake -G "Visual Studio 15 2017" -A %platform% -DCMAKE_SYSTEM_NAME="WindowsStore" -DCMAKE_SYSTEM_VERSION="10.0" -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_TUTORIALS=OFF ..\visp
84+
- 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
13485
- if "%TARGET%"=="uwp" cmake --build . --config %configuration% -- /m:2
13586

13687
# visp_sample case: ViSP as 3rdparty with cmake
137-
- if "%TARGET%"=="visp_sample" dir %OpenCV_DLL_DIR%
138-
- if "%TARGET%"=="visp_sample" cmake -G "Visual Studio 15 2017" -A %platform% -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_TUTORIALS=OFF ..\visp
88+
- 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
13989
- if "%TARGET%"=="visp_sample" cmake --build . --config %configuration% --target install -- /m:2
14090
- if "%TARGET%"=="visp_sample" cd C:\projects\deps\visp_sample
14191
- if "%TARGET%"=="visp_sample" mkdir build
14292
- if "%TARGET%"=="visp_sample" cd build
143-
- if "%TARGET%"=="visp_sample" cmake -G "Visual Studio 15 2017" -A %platform% .. -DVISP_DIR=C:\projects\visp\build\install
93+
- if "%TARGET%"=="visp_sample" cmake -G "Visual Studio 17 2022" -A %platform% .. -DVISP_DIR=C:\projects\visp\build\install
14494
- if "%TARGET%"=="visp_sample" cmake --build . --config %configuration% -- /m:2

0 commit comments

Comments
 (0)