aboutsummaryrefslogtreecommitdiff
path: root/.appveyor.yml
blob: 1bc0f82e0b7a69edab27d937ef5aa7491605bb79 (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
version: 0.0.{build}
environment:
  global:
    ASCIIDOCTOR_VER: 1.5.4
    CFLAGS: /MP
    TERM: xterm
  matrix:
    # array of all environments used to test builds
    # Note that we require relatively modern Visual Studio, in order to pick
    # up snprintf.  You don't want the older versions of VS, really!
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
#      GENERATOR: Visual Studio 15 2017
      GENERATOR: Ninja
      CFG: Debug
      VSINSTALL: '"Microsoft Visual Studio"/2017/Community/VC/Auxiliary/Build'
      MSVC_PLATFORM: x86
    - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
#      GENERATOR: Visual Studio 15 2017 Win64
      GENERATOR: Ninja
      CFG: Debug
      VSINSTALL: '"Microsoft Visual Studio"/2017/Community/VC/Auxiliary/Build'
      MSVC_PLATFORM: amd64


cache:
  - '%USERPROFILE%\asciidoctor-%ASCIIDOCTOR_VER%.gem -> .appveyor.yml'

install:
  # Gem fetching can sometimes be excruciatingly slow due to the rubygems database,
  # so we have to manually download our target gem.
  - ps: |
      $asciidoctor = "$($env:USERPROFILE)\asciidoctor-$($env:ASCIIDOCTOR_VER).gem"
      if (-not (Test-Path $asciidoctor)) {
          $url = "https://rubygems.org/downloads/asciidoctor-$($env:ASCIIDOCTOR_VER).gem"
          Write-Output "Downloading asciidoctor $env:ASCIIDOCTOR_VER from $url"
          (New-Object Net.WebClient).DownloadFile($url, $asciidoctor)
      }
      gem install --no-document --local $asciidoctor
      choco install ninja


init:
  - cmake --version
  - C:\"Program Files (x86)"/%VSINSTALL%/vcvarsall.bat %MSVC_PLATFORM%

build:
  parallel: true

build_script:
  - cmd: md build
  - cmd: cd build
  - cmd: cmake -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=%CFG% ..
  - cmd: cmake --build .

test_script:
  - cmd: ctest --output-on-failure -C "%CFG%"