aboutsummaryrefslogtreecommitdiff
path: root/appveyor.yml
blob: e1d6061ac044cde3c7360f8b051637de8c4931f8 (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
clone_folder: "c:\\stack"
environment:
  global:
    STACK_ROOT: "c:\\sr"
    STACK_YAML: "c:\\stack\\windows\\stack-appveyor.yaml"
    WIXBIN: "c:\\Program Files (x86)\\WiX Toolset v3.10\\bin"

cache:
  - "c:\\sr" # stack root, short paths == fewer problems
  - '%LOCALAPPDATA%\Programs\stack' # even less to install...
  - '%WIXBIN%'

# We don't do a normal C build, but build in test_script via stack
build: off 

install:
  - choco install wixtoolset
  - curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386
  - 7z x stack.zip stack.exe
  - stack setup > nul

before_test:
  # the stack install already fails without the templates...
  - git submodule update --init
  # set PATH to where the hsb2hs binary is copied to
  - cmd: set "PATH=%PATH%;%APPDATA%\\local\\bin"
  - stack install hsb2hs


test_script:
  # The ugly echo "" hack is to avoid complaints about 0 being an invalid file
  # descriptor
  - echo "" | stack --no-terminal  test
  - echo "" | stack --local-bin-path . install pandoc

after_test:
    # .\ in the stack commandline seems to be .\windows\ (where the stack-appveyor.yaml is)
  - cd windows
  - 7z a "pandoc.zip" pandoc.exe"
  - for /f "tokens=2 delims= " %%a in ('.\pandoc.exe --version') do ( set "VERSION=%%a" && exit )
  - .\pandoc.exe -s -S ..\README -o README.html
  - .\pandoc.exe -s -S ..\COPYING -o COPYING.rtf
  - copy ..\COPYRIGHT COPYRIGHT.txt
  - set "WIXPATH=C:\\Program Files (x86)\\WiX Toolset v3.10\\bin"
  - '"%WIXPATH%\\candle" -dVERSION="%VERSION%" -dBINPATH=. pandoc.wxs'
  - '"%WIXPATH%\\light" -sw1076 -ext WixUIExtension -ext WixUtilExtension -out pandoc-%VERSION%-windows.msi pandoc.wixobj'

artifacts:
  - path: windows\pandoc.zip
    name: exe
  - path: windows\pandoc-%VERSION%-windows.msi
    name: msi