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 LANG: en_US.UTF-8 matrix: - STACK_YAML: stack.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: - '%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' 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" test_script: # chcp 65001 (utf-8) needed to make doctest work - chcp 65001 && stack test dhall - stack test dhall-json - stack test dhall-bash # - stack test dhall-lsp-server # Disabled while the tests are broken. - stack bench dhall --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" test_script: # chcp 65001 (utf-8) needed to make doctest work - chcp 65001 && stack test dhall 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