packages feed

CPL-0.0.9: appveyor.yml

cache:
- "c:\\sr" # stack root, short paths == less problems

# to disable automatic builds
#build: off

platform:
- x86
- x64

environment:
  global:
    STACK_ROOT: "c:\\sr"

install:
- if %PLATFORM%==x86 (curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386) else (curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-x86_64)
- 7z x stack.zip stack.exe
- stack --resolver=lts-9.21 setup > nul
- ps: |
    choco --no-progress install wixtoolset -version 3.11.1 -y
    $env:Path += ";${env:ProgramFiles}\WiX Toolset v3.11\bin"
    $env:Path += ";${env:ProgramFiles(x86)}\WiX Toolset v3.11\bin"

build_script:
# The ugly echo "" hack is to avoid complaints about 0 being an invalid file
# descriptor
- echo "" | stack --resolver=lts-9.21 --no-terminal test --bench --no-run-benchmarks --flag CPL:Haskeline --flag CPL:-Readline

after_test:
- ps: cp "$(./stack --resolver=lts-9.21 path --local-install-root)/bin/cpl.exe" cpl.exe
- cmd: |
   cd windows
   echo Creating msi...
   ..\stack --resolver=lts-9.21 runhaskell --package turtle build_msi.hs
   echo Creating zip...
   ..\stack --resolver=lts-9.21 runhaskell --package turtle build_zip.hs
   cd ..

artifacts:
- path: windows\*.msi
  name: Windows Installer
- path: windows\*.zip
  name: Portable Binary Package

deploy:
- provider: GitHub
  auth_token:
    secure: F8cldz47mQ0lW3O9uCEneU5LRklWcKw8JbPuh5BDYA2TfyeqC//GO8vl8/wmBy3Z
  artifact: Windows Installer, Portable Binary Package
  force_update: true
  release: $(appveyor_repo_tag_name)
  on:
    appveyor_repo_tag: true