summaryrefslogtreecommitdiff
path: root/appveyor.yml
blob: ee6504b263455a3e0c304261f97a28a0fa79a480 (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
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.2e

cache:
  - '%APPVEYOR_BUILD_FOLDER%\..\openssl-%OPENSSL_VERSION%'
  - '%APPVEYOR_BUILD_FOLDER%\..\openssl-%PLATFORM%'
  - '%APPVEYOR_BUILD_FOLDER%\..\pcre-8.38'
  - '%APPVEYOR_BUILD_FOLDER%\..\pcre-%PLATFORM%'
  - '%APPVEYOR_BUILD_FOLDER%\%PLATFORM%'

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

install:
  - cinst strawberryperl
  - cinst 7zip.commandline
  - cinst cmake

  - dir "C:\Program Files\Microsoft SDKs\Windows"
  - dir "C:\Program Files\Microsoft SDKs\Windows\v7.1"
  - dir "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin"
  - '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86'
  - ps: "[Net.ServicePointManager]::SecurityProtocol = 'Tls12'"

  - cd %APPVEYOR_BUILD_FOLDER%\..
  - ps: Start-FileDownload 'http://zlib.net/zlib128.zip'
  - 7za x zlib128.zip
  - cd zlib-1.2.8
  - cmake -G "%Generator%" -A %PLATFORM% -DCMAKE_INSTALL_PREFIX="..\zlib-%PLATFORM%" .
  - msbuild INSTALL.vcxproj /m /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

  - cd %APPVEYOR_BUILD_FOLDER%\..
  - ps: Start-FileDownload "https://www.openssl.org/source/openssl-$($env:OPENSSL_VERSION).tar.gz"
  - 7za x openssl-%OPENSSL_VERSION%.tar.gz
  - 7za x 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%\..
  - ps: Start-FileDownload 'ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.zip'
  - 7za x pcre-8.38.zip
  - cd %APPVEYOR_BUILD_FOLDER%\..
  - cd pcre-8.38
  - cmake -G "%Generator%" -A %PLATFORM% -DCMAKE_INSTALL_PREFIX="..\pcre-%PLATFORM%" .
  - dir
  - msbuild INSTALL.vcxproj /m /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
  - cmake -G "%Generator%" -A %PLATFORM%
  - cd %APPVEYOR_BUILD_FOLDER%

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