97 lines
3.3 KiB
YAML
97 lines
3.3 KiB
YAML
version: 1.0.{build}
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- /.*appveyor.*/
|
|
- /\d*\.\d*\.\d*/
|
|
|
|
environment:
|
|
STACK_ROOT: C:\sr
|
|
STACK_VERSION: 1.9.3
|
|
# Override the temp directory to avoid sed escaping issues
|
|
# See https://github.com/haskell/cabal/issues/5386
|
|
TMP: c:\tmp
|
|
|
|
matrix:
|
|
# Commenting out for now default stack (lts-13) cause
|
|
# compilations times are reaching appveyor default build timeout
|
|
# - STACK_YAML: stack.yaml
|
|
- STACK_YAML: stack-lts-12.yaml
|
|
- STACK_YAML: stack-lts-6.yaml
|
|
|
|
install:
|
|
- choco install -y haskell-stack --version %STACK_VERSION%
|
|
- stack setup > nul
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
|
- git submodule update --init --recursive
|
|
|
|
cache:
|
|
- C:\sr -> '%STACK_YAML%'
|
|
- .stack-work -> '%STACK_YAML%'
|
|
- dhall\.stack-work -> '%STACK_YAML%'
|
|
- dhall-json\.stack-work -> '%STACK_YAML%'
|
|
- dhall-bash\.stack-work -> '%STACK_YAML%'
|
|
- dhall-lsp-server\.stack-work -> '%STACK_YAML%'
|
|
|
|
for:
|
|
-
|
|
matrix:
|
|
except:
|
|
- STACK_YAML: stack-lts-6.yaml
|
|
|
|
build_script:
|
|
- stack build
|
|
- stack install --local-bin-path bin
|
|
- if /I "%APPVEYOR_REPO_TAG%" EQU "true" (set DEPLOY_TAG=%APPVEYOR_REPO_TAG_NAME%) else (set DEPLOY_TAG=%APPVEYOR_REPO_COMMIT:~0,5%)
|
|
- set DEPLOY_SUFFIX=%DEPLOY_TAG%-x86_64-windows.zip
|
|
- 7z a "bin\dhall-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\dhall.exe"
|
|
- 7z a "bin\dhall-json-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\dhall-to-json.exe"
|
|
- 7z a "bin\dhall-json-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\dhall-to-yaml.exe"
|
|
- 7z a "bin\dhall-json-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\json-to-dhall.exe"
|
|
- 7z a "bin\dhall-json-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\yaml-to-dhall.exe"
|
|
- 7z a "bin\dhall-bash-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\dhall-to-bash.exe"
|
|
- 7z a "bin\dhall-lsp-server-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\dhall-lsp-server.exe"
|
|
|
|
# stack is not able to build test dependencies with lts-6
|
|
test_script:
|
|
- stack test dhall:tasty
|
|
- stack test dhall-json
|
|
- stack test dhall-bash
|
|
# - stack test dhall-lsp-server # Disabled while the tests are broken.
|
|
- stack bench --benchmark-arguments "--quick --min-duration=0 --include-first-iter"
|
|
|
|
-
|
|
matrix:
|
|
only:
|
|
- STACK_YAML: stack-lts-6.yaml
|
|
|
|
build_script:
|
|
- stack build
|
|
- stack install --local-bin-path bin
|
|
- if /I "%APPVEYOR_REPO_TAG%" EQU "true" (set DEPLOY_TAG=%APPVEYOR_REPO_TAG_NAME%) else (set DEPLOY_TAG=%APPVEYOR_REPO_COMMIT:~0,5%)
|
|
- set DEPLOY_SUFFIX=%DEPLOY_TAG%-x86_64-windows.zip
|
|
# dhall-json and dhall-lsp-server is not supported for LTS 6, so do not try to copy the
|
|
# corresponding binaries
|
|
- 7z a "bin\dhall-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\dhall.exe"
|
|
- 7z a "bin\dhall-bash-%DEPLOY_SUFFIX%" "%APPVEYOR_BUILD_FOLDER%\bin\dhall-to-bash.exe"
|
|
|
|
artifacts:
|
|
- path: bin\dhall-%DEPLOY_SUFFIX%
|
|
name: dhall
|
|
- path: bin\dhall-json-%DEPLOY_SUFFIX%
|
|
name: dhall-json
|
|
- path: bin\dhall-bash-%DEPLOY_SUFFIX%
|
|
name: dhall-bash
|
|
- path: bin\dhall-lsp-server-%DEPLOY_SUFFIX%
|
|
name: dhall-lsp-server
|
|
|
|
deploy:
|
|
- provider: GitHub
|
|
auth_token:
|
|
secure: Gs/tiz6Jtg/Zjd4zGHDhuSv4Y9a+zJ574LWwzOe2bvZNGX/M8XupkxdGmBpDlnOf
|
|
artifact: dhall, dhall-json, dhall-bash, dhall-lsp-server
|
|
on:
|
|
APPVEYOR_REPO_TAG: true
|
|
STACK_YAML: stack.yaml
|