-
Notifications
You must be signed in to change notification settings - Fork 214
/
appveyor.yml
97 lines (87 loc) · 3.9 KB
/
appveyor.yml
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
version: 1.0.{build}
branches:
only:
- master
- /\d*\.\d*\.\d*/
# For testing:
- /.*appveyor-build-branch.*/
environment:
STACK_ROOT: C:\sr
STACK_VERSION: 2.7.1
# Override the temp directory to avoid sed escaping issues
# See https://github.com/haskell/cabal/issues/5386
TMP: c:\tmp
LANG: en_US.UTF-8
matrix:
- STACK_YAML: stack.yaml
install:
# http://help.appveyor.com/discussions/problems/6312-curl-command-not-found
- set PATH=C:\Program Files\Git\mingw64\bin;%PATH%
- curl --silent --show-error --output stack.zip --location "https://github.com/commercialhaskell/stack/releases/download/v%STACK_VERSION%/stack-%STACK_VERSION%-windows-x86_64.zip"
- 7z x stack.zip stack.exe
- stack setup > nul
- git submodule update --init --recursive
cache:
- '%STACK_ROOT% -> %STACK_YAML%, appveyor.yml'
- '.stack-work -> %STACK_YAML%, appveyor.yml'
- 'dhall/.stack-work -> %STACK_YAML%, appveyor.yml'
- 'dhall-bash/.stack-work -> %STACK_YAML%, appveyor.yml'
build_script:
- stack build
- stack install --local-bin-path bin
- if /I "%APPVEYOR_REPO_TAG%" EQU "true" (set DEPLOY_TAG=%APPVEYOR_REPO_TAG_NAME%-x86_64-windows.zip)
- set DEPLOY_DIR=%APPVEYOR_BUILD_FOLDER%\bin
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-%DEPLOY_TAG%" "%DEPLOY_DIR%\dhall.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-json-%DEPLOY_TAG%" "%DEPLOY_DIR%\dhall-to-json.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-json-%DEPLOY_TAG%" "%DEPLOY_DIR%\dhall-to-yaml.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-json-%DEPLOY_TAG%" "%DEPLOY_DIR%\json-to-dhall.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-toml-%DEPLOY_TAG%" "%DEPLOY_DIR%\toml-to-dhall.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-toml-%DEPLOY_TAG%" "%DEPLOY_DIR%\dhall-to-toml.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-bash-%DEPLOY_TAG%" "%DEPLOY_DIR%\dhall-to-bash.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-lsp-server-%DEPLOY_TAG%" "%DEPLOY_DIR%\dhall-lsp-server.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-openapi-%DEPLOY_TAG%" "%DEPLOY_DIR%\openapi-to-dhall.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-yaml-%DEPLOY_TAG%" "%DEPLOY_DIR%\dhall-to-yaml-ng.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-yaml-%DEPLOY_TAG%" "%DEPLOY_DIR%\yaml-to-dhall.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-docs-%DEPLOY_TAG%" "%DEPLOY_DIR%\dhall-docs.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-csv-%DEPLOY_TAG%" "%DEPLOY_DIR%\dhall-to-csv.exe")
- if /I "%DEPLOY_TAG%" NEQ "" (7z a "bin\dhall-csv-%DEPLOY_TAG%" "%DEPLOY_DIR%\csv-to-dhall.exe")
test_script:
# chcp 65001 (utf-8) needed to make doctest work
- chcp 65001 && stack test dhall
- stack test dhall-json
- stack test dhall-toml
- stack test dhall-yaml
- stack test dhall-bash
- stack test dhall-lsp-server
- stack test dhall-openapi
- stack test dhall-csv
# Enable when issue with path-separators tests on windows is resolved
# - stack test dhall-docs
- stack bench dhall --benchmark-arguments "--quick --min-duration=0 --include-first-iter"
artifacts:
- path: bin\dhall-%DEPLOY_TAG%
name: dhall
- path: bin\dhall-json-%DEPLOY_TAG%
name: dhall-json
- path: bin\dhall-toml-%DEPLOY_TAG%
name: dhall-toml
- path: bin\dhall-yaml-%DEPLOY_TAG%
name: dhall-yaml
- path: bin\dhall-bash-%DEPLOY_TAG%
name: dhall-bash
- path: bin\dhall-lsp-server-%DEPLOY_TAG%
name: dhall-lsp-server
- path: bin\dhall-openapi-%DEPLOY_TAG%
name: dhall-openapi
- path: bin\dhall-docs-%DEPLOY_TAG%
name: dhall-docs
- path: bin\dhall-csv-%DEPLOY_TAG%
name: dhall-csv
deploy:
- provider: GitHub
auth_token:
secure: Gs/tiz6Jtg/Zjd4zGHDhuSv4Y9a+zJ574LWwzOe2bvZNGX/M8XupkxdGmBpDlnOf
artifact: dhall, dhall-json, dhall-toml, dhall-yaml, dhall-bash, dhall-lsp-server, dhall-openapi, dhall-docs, dhall-csv
on:
APPVEYOR_REPO_TAG: true
STACK_YAML: stack.yaml