-
Notifications
You must be signed in to change notification settings - Fork 34
/
appveyor.yml
75 lines (59 loc) · 3.06 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
# Notes:
# - Minimal appveyor.yml file is an empty file. All sections are optional.
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: '{branch}-{build}'
# branches to build
branches:
# blacklist
except:
- gh-pages
#---------------------------------#
# environment configuration #
#---------------------------------#
image:
- Visual Studio 2015
- Visual Studio 2017
# build Configuration, i.e. Debug, Release, etc.
configuration:
- Debug
- Release
platform:
- x86
- x64
# clone directory
clone_folder: c:\projects\platform_folders
# This and clone_depth speed up git cloning
# fetch repository as zip archive
shallow_clone: true
# set clone depth
clone_depth: 1
# Generate the .sln file with Cmake before running MSBuild
before_build:
- cmd: mkdir "%APPVEYOR_BUILD_FOLDER%"\build
- cmd: cd "%APPVEYOR_BUILD_FOLDER%"\build
# I know this is ugly, but the matrix didn't work, and newlines seem to not be supported
- cmd: IF "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (IF "%PLATFORM%"=="x86" (cmake -G "Visual Studio 14 2015" ..) ELSE (cmake -G "Visual Studio 14 2015 Win64" -T host=x64 ..)) ELSE (IF "%PLATFORM%"=="x86" (cmake -G "Visual Studio 15 2017" ..) ELSE (cmake -G "Visual Studio 15 2017 Win64" -T host=x64 ..))
# CMake generates the platform as "Win32" instead of "x86" when building 32-bit
# but 64-bit is "x64"
build_script:
- cmd: IF "%PLATFORM%"=="x86" (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\platform_folders.sln /p:Configuration="%CONFIGURATION%" /p:Platform="Win32" /v:minimal /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll") ELSE (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\platform_folders.sln /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /v:minimal /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")
#---------------------------------#
# tests configuration #
#---------------------------------#
# to run your custom scripts instead of automatic tests
# The %CONFIGURATION% and %PLATFORM% variables are set from Appveyor as env-vars
test_script:
- cmd: IF "%PLATFORM%"=="x86" (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\RUN_TESTS.vcxproj /p:Configuration="%CONFIGURATION%" /p:Platform="Win32" /v:minimal /m) ELSE (MSBuild.exe "%APPVEYOR_BUILD_FOLDER%"\build\RUN_TESTS.vcxproj /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /v:minimal /m)
#---------------------------------#
# global handlers #
#---------------------------------#
# on build failure dump cmake and test err log
on_failure:
- cmd: IF exist "%APPVEYOR_BUILD_FOLDER%"\build\CMakeFiles\CMakeError.log (type "%APPVEYOR_BUILD_FOLDER%"\build\CMakeFiles\CMakeError.log)
- cmd: IF exist "%APPVEYOR_BUILD_FOLDER%"\build\Testing\Temporary\LastTest.log (type "%APPVEYOR_BUILD_FOLDER%"\build\Testing\Temporary\LastTest.log)