-
-
Notifications
You must be signed in to change notification settings - Fork 108
/
appveyor.yml
169 lines (153 loc) · 6.6 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
version: "v0.0.26.{build}"
cache:
- ..\other_source
# Clean cached
# https://www.appveyor.com/docs/build-cache/#cleaning-up-cache
environment:
FaceRecognizerVersion: v0.0.4
STOREPASS:
secure: l9BZEU39F1a4vSkhwl0CHR+yh6CD1c7byGzMv+1NUa4=
QT_USER:
secure: EoBPaPuJ6u9UDYpQWjKhUg==
QT_PASSWORD:
secure: ejAYGgB+3sBispRxUSr0xw==
APPVEYOR_RDP_PASSWORD:
secure: PUmp7039ro52579dlxAk59tjpeeyiFbdWvHfLCkjF5c=
matrix:
##### msvc 2015 ########
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
GENERATORS: "Visual Studio 14 2015"
TOOLCHAIN_VERSION: 14
VCPKG_PLATFORM_TOOLSET: v140
QT_ROOT: C:\Qt\5.6\msvc2015
BUILD_ARCH: x86
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
GENERATORS: "Visual Studio 14 2015 Win64"
TOOLCHAIN_VERSION: 14
QT_ROOT: C:\Qt\5.6\msvc2015_64
BUILD_ARCH: x64
matrix:
fast_finish: false
init:
- set varch=%BUILD_ARCH%
- if "%BUILD_ARCH%" == "x64" set varch=amd64
- if "%BUILD_TARGERT%" == "windows_msvc" if %TOOLCHAIN_VERSION% LSS 15 (call "C:\Program Files (x86)\Microsoft Visual Studio %TOOLCHAIN_VERSION%.0\VC\vcvarsall.bat" %varch%) else (call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %varch%)
- echo NUMBER_OF_PROCESSORS=%NUMBER_OF_PROCESSORS%
- echo PROCESSOR_IDENTIFIER=%PROCESSOR_IDENTIFIER%
- if NOT "%QT_ROOT%" == "NO" for /f "delims=" %%i in ('%QT_ROOT%/bin/qmake -query QT_VERSION') do (set QT_VERSION=%%i)
- echo QT_ROOT=%QT_ROOT%
- echo QT_VERSION=%QT_VERSION%
install:
- git submodule update --init --recursive
- cd %APPVEYOR_BUILD_FOLDER%
- git clone https://github.com/KangLin/RabbitCommon.git
- set RabbitCommon_DIR=%APPVEYOR_BUILD_FOLDER%/RabbitCommon
- set OTHER_SOURCE=%APPVEYOR_BUILD_FOLDER%\..\other_source
- set INSTALL_DIR=%OTHER_SOURCE%\install_dir
- if not exist "%OTHER_SOURCE%" ( mkdir "%OTHER_SOURCE%" )
- if not exist "%INSTALL_DIR%" ( mkdir "%INSTALL_DIR%" )
- cd %OTHER_SOURCE%
- set CMAKE_VERSION=3.28.3
- if not exist cmake-%CMAKE_VERSION%-windows-i386 (curl -fsSL -o cmake-%CMAKE_VERSION%-windows-i386.zip https://github.com/Kitware/CMake/releases/download/v%CMAKE_VERSION%/cmake-%CMAKE_VERSION%-windows-i386.zip && 7z x cmake-%CMAKE_VERSION%-windows-i386.zip)
- cd cmake-%CMAKE_VERSION%-windows-i386
- set PATH="%CD%/bin";%PATH%
- cd %OTHER_SOURCE%
- set VCPKG_DIR=%OTHER_SOURCE%\vcpkg
- ps: |
if( -not (Test-Path -Path ${env:VCPKG_DIR}) )
{
git clone -q "https://github.com/microsoft/vcpkg.git"
cd ${env:VCPKG_DIR}
git checkout -q -b 2ac6ba173be85207a7bac4f0f02f5486f9fd4c0f 2ac6ba173be85207a7bac4f0f02f5486f9fd4c0f
bootstrap-vcpkg.bat
}
before_build:
- cd %OTHER_SOURCE%
- ps: |
if ( -not (Test-Path -Path ${env:INSTALL_DIR}\lib\cmake\SeetaFaceDetectorConfig.cmake) )
{
git clone -q https://github.com/KangLin/SeetaFace2.git
cd SeetaFace2
cmake -E make_directory build
cd build
cmake .. `
-G"${env:GENERATORS}" `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_INSTALL_PREFIX="${env:INSTALL_DIR}" `
-DCMAKE_TOOLCHAIN_FILE="${env:VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake" `
-DBUILD_EXAMPLE=OFF
cmake --build . --config Release
cmake --build . --config Release --target install
}
- cd %OTHER_SOURCE%
- ps: |
if ( -not (Test-Path -Path ${env:INSTALL_DIR}\lib\cmake\facedetection\facedetectionConfig.cmake) )
{
git clone -q https://github.com/ShiqiYu/libfacedetection.git
cd libfacedetection
cmake -E make_directory build
cd build
cmake .. `
-G"${env:GENERATORS}" `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_INSTALL_PREFIX="${env:INSTALL_DIR}" `
-DCMAKE_TOOLCHAIN_FILE="${env:VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake" `
-DBUILD_SHARED_LIBS=ON
cmake --build . --config Release
cmake --build . --config Release --target install
}
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- cmake -E make_directory build
- cd build
- cmake %APPVEYOR_BUILD_FOLDER% ^
-G"%GENERATORS%" ^
-DCMARK_SHARED=OFF ^
-DCMARK_TESTS=OFF ^
-DCMARK_STATIC=ON ^
-DQT_DIR=%QT_ROOT%/lib/cmake/Qt5 ^
-DQt5_DIR=%QT_ROOT%/lib/cmake/Qt5 ^
-DINSTALL_QT=ON ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%cd%/install" ^
-DCMAKE_PREFIX_PATH="%INSTALL_DIR%" ^
-DCMAKE_TOOLCHAIN_FILE="%VCPKG_DIR%/scripts/buildsystems/vcpkg.cmake" ^
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^
-DVCPKG_APPLOCAL_DEPS=ON ^
-DSeetaFace_DIR=%INSTALL_DIR%/lib/cmake ^
-DSeetaNet_DIR=%INSTALL_DIR%/lib/cmake ^
-DSeetaFaceDetector_DIR=%INSTALL_DIR%/lib/cmake ^
-DSeetaFaceLandmarker_DIR=%INSTALL_DIR%/lib/cmake ^
-DSeetaFaceRecognizer_DIR=%INSTALL_DIR%/lib/cmake ^
-DSeetaFaceTracker_DIR=%INSTALL_DIR%/lib/cmake ^
-DSeetaQualityAssessor_DIR=%INSTALL_DIR%/lib/cmake ^
-Dfacedetection_DIR=%INSTALL_DIR%/lib/cmake/facedetection ^
-DENABLE_DOWNLOAD_MODULE=ON
- cmake --build . --config Release
- cmake --build . --config Release --target install
- if "%BUILD_ARCH%" == "x86" (copy /Y c:\OpenSSL-Win32\bin\ssleay32.dll install\bin && copy /Y c:\OpenSSL-Win32\bin\libeay32.dll install\bin)
- if "%BUILD_ARCH%" == "x64" (copy /Y c:\OpenSSL-Win64\bin\ssleay32.dll install\bin && copy /Y c:\OpenSSL-Win64\bin\libeay32.dll install\bin)
- makensis Install.nsi
- rename FaceRecognizer_%FaceRecognizerVersion%_Setup.exe FaceRecognizer_%FaceRecognizerVersion%_windows_xp_%BUILD_ARCH%_Setup.exe
artifacts:
- path: build\FaceRecognizer_%FaceRecognizerVersion%_windows_xp_%BUILD_ARCH%_Setup.exe
test: off
#See: https://www.appveyor.com/docs/deployment/github/
deploy:
- provider: GitHub
#release: FaceRecognizer$(appveyor_build_version)
#description: 'Release FaceRecognizer $(APPVEYOR_REPO_TAG_NAME) on windows'
#token : https://github.com/settings/tokens
#password encrypt: https://ci.appveyor.com/tools/encrypt
auth_token:
secure: 2eZXTfGhgCiW9GRLbg9nq7Uz8BVEw4nLzYmgBdvdUIfeEXmlHvC8Xeabsi7yumSx
#artifact: FaceRecognizer$(BUILD_TARGERT)$(TOOLCHAIN_VERSION)_$(BUILD_ARCH)_$(QT_VERSION)_$(appveyor_build_version)
#draft: true
#prerelease: true
force_update: true
on:
BUILD_TARGERT: windows_msvc
TOOLCHAIN_VERSION: 14
QT_VERSION: 5.6.3
BUILD_ARCH: x86
appveyor_repo_tag: true # deploy on tag push only