forked from lensfun/lensfun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
69 lines (56 loc) · 2.47 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
# becomes PLATFORM=X64|X86 environment variable (note uppercase!)
platform:
- x64
- x86
# becomes CONFIGURATION=Debug|Release environment variable
configuration:
- Debug
- Release
environment:
global:
BUILD_LENSTOOL: 'OFF'
BUILD_STATIC: 'OFF'
matrix:
# VS 2015
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VS_INIT_CMD: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
GENERATOR: Visual Studio 14 2015
# VS 2017
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VS_INIT_CMD: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat
GENERATOR: Visual Studio 15 2017
# VS 2019
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
VS_INIT_CMD: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
GENERATOR: Visual Studio 16 2019
# VS 2019 (with lenstool and static libraries)
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
VS_INIT_CMD: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
GENERATOR: Visual Studio 16 2019
BUILD_LENSTOOL: 'ON'
BUILD_STATIC: 'ON'
install:
- set APPVEYOR_SAVE_CACHE_ON_ERROR=true
# Select Visual Studio version and architecture
- call "%VS_INIT_CMD%" %PLATFORM%
- if /I %PLATFORM% == x86 ( set GENERATOR_PLATFORM=Win32 )
- if /I %PLATFORM% == x64 ( set GENERATOR_PLATFORM=x64 )
# Print environment variables
- set
# Update vcpkg
# https://help.appveyor.com/discussions/problems/24684-problem-with-vcpkg-wrong-version-on-appveyor
- powershell iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/build-images/master/scripts/Windows/install_vcpkg.ps1'))
# Install dependencies
- vcpkg install glib:%PLATFORM%-windows
- if %BUILD_LENSTOOL% == ON ( vcpkg install libpng:%PLATFORM%-windows )
# xmllint tool for tests
- choco install xsltproc
build_script:
- mkdir build
- cd build
- cmake .. -G "%GENERATOR%" -A %GENERATOR_PLATFORM% -DBUILD_STATIC=%BUILD_STATIC% -DBUILD_LENSTOOL=%BUILD_LENSTOOL% -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DGLIB2_BASE_DIR=c:/tools/vcpkg/installed/%PLATFORM%-windows
- cmake --build . --config %CONFIGURATION%
- cmake --build . --target install
test_script:
- ctest -C %CONFIGURATION% --output-on-failure
cache: c:\tools\vcpkg\installed\