summaryrefslogtreecommitdiff
path: root/appveyor.yml
blob: f5222f7d9a482c29eb1f3f6c84d92620093f866d (plain)
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
version: 1.0.{build}-{branch}

clone_depth: 1

# Do not build on tags (GitHub only)
skip_tags: true

os: Windows Server 2012

platform:
# - x86
# - x64
  - Win32

configuration:
  - Debug
  - Release

environment:
  VisualStudioVersion: 10.0
  Generator: Visual Studio 10
  OPENSSL_VERSION: 1.0.2f
  PCRE_VERSION: 8.38

cache:
  - '..\zlib-1.2.8'
  - '..\zlib-%PLATFORM%'
  - '..\openssl-%OPENSSL_VERSION%.tar.gz'
  - '..\openssl-%OPENSSL_VERSION%'
  - '..\openssl-%PLATFORM%'
  - '..\pcre-%PCRE_VERSION%.zip'
  - '..\pcre-%PCRE_VERSION%'
  - '..\pcre-%PLATFORM%'
  - 'infrastructure\cmake\build'

init:
# Uncomment the following two lines to enable RDP access to the virtual machine for debugging.
# - reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

build:
  parallel: true
  project: infrastructure/cmake/build/BoxBackup.sln

install:
  # Show compiled files restored from cache
  - dir %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build
  # test_bbackupd needs 7zip to extract tar archives on Windows:
  - cinst -y --limit-output 7zip.commandline
  # Install cmake.portable instead of cmake, to get it on the path again:
  # http://disq.us/p/xdknrt
  - dir "c:\Program Files"
  - dir "c:\Program Files (x86)"
  # We don't need strawberryperl on AppVeyor because there is already a Perl in c:\Perl.
  # If you are doing this on a fresh box for development, you would probably want to
  # install Chocolatey and then run:
  # cinst -y cmake strawberryperl git vim visualstudio2012wdx

  - '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86'

  - cd %APPVEYOR_BUILD_FOLDER%\..
  - if not exist zlib128.zip appveyor DownloadFile "http://zlib.net/zlib128.zip"
  - 7za x -aoa zlib128.zip
  - cd zlib-1.2.8
  - cmake -G "%Generator%" -A %PLATFORM% -DCMAKE_INSTALL_PREFIX="..\zlib-%PLATFORM%" .
  # We need to build both versions, debug and release, because cmake requires both to be
  # present to generate its multi-configuration project files for Visual Studio/MSBuild.
  - msbuild INSTALL.vcxproj /m /p:Configuration=Debug   /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
  - msbuild INSTALL.vcxproj /m /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

  - cd %APPVEYOR_BUILD_FOLDER%\..
  - if not exist openssl-%OPENSSL_VERSION%.tar.gz appveyor DownloadFile "https://www.openssl.org/source/openssl-%OPENSSL_VERSION%.tar.gz"
  - 7za x -aoa openssl-%OPENSSL_VERSION%.tar.gz
  - 7za x -aoa openssl-%OPENSSL_VERSION%.tar
  - cd openssl-%OPENSSL_VERSION%
  - perl Configure debug-VC-WIN32 no-asm --prefix="%APPVEYOR_BUILD_FOLDER%\..\openssl-%PLATFORM%"
  - ms\do_ms
  - nmake /s /f ms\nt.mak
  - nmake /s /f ms\nt.mak install

  - cd %APPVEYOR_BUILD_FOLDER%\..
  - if not exist pcre-%PCRE_VERSION%.zip appveyor DownloadFile "http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-%PCRE_VERSION%.zip"
  - 7za x -aoa pcre-%PCRE_VERSION%.zip
  - cd %APPVEYOR_BUILD_FOLDER%\..
  - cd pcre-%PCRE_VERSION%
  - cmake -G "%Generator%" -A %PLATFORM% -DCMAKE_INSTALL_PREFIX="..\pcre-%PLATFORM%" .
  - dir
  # We need to build both versions, debug and release, because cmake requires both to be
  # present to generate its multi-configuration project files for Visual Studio/MSBuild.
  - msbuild INSTALL.vcxproj /m /p:Configuration=Debug   /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
  - msbuild INSTALL.vcxproj /m /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
  - cd %APPVEYOR_BUILD_FOLDER%\..
  - dir
  - dir pcre-%PLATFORM%
  - dir pcre-%PLATFORM%\bin
  - dir pcre-%PLATFORM%\lib

  - cd %APPVEYOR_BUILD_FOLDER%
  - cd infrastructure\cmake\build
  - cmake -G "%Generator%" -A %PLATFORM% ..
  - cd %APPVEYOR_BUILD_FOLDER%

  # Show files after build
  - dir %APPVEYOR_BUILD_FOLDER%\..\zlib-1.2.8
  - dir %APPVEYOR_BUILD_FOLDER%\..\zlib-%PLATFORM%
  - dir %APPVEYOR_BUILD_FOLDER%\..\openssl-%OPENSSL_VERSION%
  - dir %APPVEYOR_BUILD_FOLDER%\..\openssl-%PLATFORM%
  - dir %APPVEYOR_BUILD_FOLDER%\..\pcre-%PCRE_VERSION%
  - dir %APPVEYOR_BUILD_FOLDER%\..\pcre-%PLATFORM%
  - dir %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build

test_script:
  - cd %APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\build
  - ctest -C %CONFIGURATION% -V