2019-06-16 16:34:44 +03:00
|
|
|
# packcheck-0.4.2
|
2018-05-27 16:59:14 +03:00
|
|
|
# You can use any of the options supported by packcheck as environment
|
|
|
|
# variables here. See https://github.com/harendra-kumar/packcheck for all
|
|
|
|
# options and their explanation.
|
2020-01-07 08:36:00 +03:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
2017-08-30 12:46:14 +03:00
|
|
|
environment:
|
2018-05-27 16:59:14 +03:00
|
|
|
# ------------------------------------------------------------------------
|
|
|
|
# Global options, you can use these per build as well
|
|
|
|
# ------------------------------------------------------------------------
|
2017-08-30 12:46:14 +03:00
|
|
|
global:
|
2018-03-08 23:35:29 +03:00
|
|
|
# ------------------------------------------------------------------------
|
2018-05-27 16:59:14 +03:00
|
|
|
# Common options
|
2018-03-08 23:35:29 +03:00
|
|
|
# ------------------------------------------------------------------------
|
|
|
|
GHC_OPTIONS: "-Werror"
|
2018-05-27 16:59:14 +03:00
|
|
|
CABAL_REINIT_CONFIG: "y"
|
|
|
|
LC_ALL: "C.UTF-8"
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------
|
|
|
|
# What to build
|
|
|
|
# ------------------------------------------------------------------------
|
|
|
|
# DISABLE_TEST: "y"
|
|
|
|
# DISABLE_BENCH: "y"
|
|
|
|
# DISABLE_DOCS: "y"
|
2018-06-23 19:25:59 +03:00
|
|
|
DISABLE_SDIST_BUILD: "y"
|
2019-06-16 16:34:44 +03:00
|
|
|
DISABLE_DIST_CHECKS: "y"
|
2018-05-27 16:59:14 +03:00
|
|
|
ENABLE_INSTALL: "y"
|
2018-03-15 20:50:03 +03:00
|
|
|
|
2018-03-08 23:35:29 +03:00
|
|
|
# ------------------------------------------------------------------------
|
2018-05-27 16:59:14 +03:00
|
|
|
# stack options
|
2018-03-08 23:35:29 +03:00
|
|
|
# ------------------------------------------------------------------------
|
2018-03-15 20:50:03 +03:00
|
|
|
# Note requiring a specific version of stack using STACKVER may fail due to
|
|
|
|
# github API limit while checking and upgrading/downgrading to the specific
|
|
|
|
# version.
|
2018-03-08 23:35:29 +03:00
|
|
|
#STACKVER: "1.6.5"
|
|
|
|
STACK_UPGRADE: "y"
|
2020-09-03 07:06:53 +03:00
|
|
|
RESOLVER: "lts-16.12"
|
2018-05-27 16:59:14 +03:00
|
|
|
STACK_ROOT: "c:\\sr"
|
2020-12-14 09:27:28 +03:00
|
|
|
STACK_BUILD_OPTIONS: "--flag streamly-benchmarks:-opt"
|
2018-03-15 20:50:03 +03:00
|
|
|
|
2017-12-22 01:23:46 +03:00
|
|
|
# ------------------------------------------------------------------------
|
2018-05-27 16:59:14 +03:00
|
|
|
# cabal options
|
2017-12-22 01:23:46 +03:00
|
|
|
# ------------------------------------------------------------------------
|
2018-03-08 23:35:29 +03:00
|
|
|
CABAL_CHECK_RELAX: "y"
|
|
|
|
CABAL_NO_SANDBOX: "y"
|
|
|
|
CABAL_HACKAGE_MIRROR: "hackage.haskell.org:http://hackage.fpcomplete.com"
|
2018-05-27 16:59:14 +03:00
|
|
|
|
|
|
|
# ------------------------------------------------------------------------
|
|
|
|
# Where to find the required tools
|
|
|
|
# ------------------------------------------------------------------------
|
2018-03-08 23:35:29 +03:00
|
|
|
PATH: "%PATH%;%APPDATA%\\local\\bin"
|
|
|
|
LOCAL_BIN: "%APPDATA%\\local\\bin"
|
2018-03-15 20:50:03 +03:00
|
|
|
|
2018-03-08 23:35:29 +03:00
|
|
|
# ------------------------------------------------------------------------
|
|
|
|
# Location of packcheck.sh (the shell script invoked to perform CI tests ).
|
|
|
|
# ------------------------------------------------------------------------
|
|
|
|
# You can either commit the packcheck.sh script at this path in your repo or
|
|
|
|
# you can use it by specifying the PACKCHECK_REPO_URL option below in which
|
|
|
|
# case it will be automatically copied from the packcheck repo to this path
|
|
|
|
# during CI tests. In any case it is finally invoked from this path.
|
|
|
|
PACKCHECK_LOCAL_PATH: "./packcheck.sh"
|
|
|
|
# If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
|
|
|
|
# then it is automatically pulled from this URL.
|
2021-06-13 21:55:07 +03:00
|
|
|
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
|
|
|
|
PACKCHECK_GITHUB_COMMIT: "8c77f80fd3a9df7307d06256c11a9e31d066475e"
|
2019-06-16 16:34:44 +03:00
|
|
|
|
|
|
|
# Override the temp directory to avoid sed escaping issues
|
|
|
|
# See https://github.com/haskell/cabal/issues/5386
|
|
|
|
TMP: "c:\\tmp"
|
2017-08-30 12:46:14 +03:00
|
|
|
|
|
|
|
cache:
|
2017-12-22 01:23:46 +03:00
|
|
|
- "%STACK_ROOT%"
|
2017-08-30 12:46:14 +03:00
|
|
|
- "%LOCAL_BIN%"
|
|
|
|
- "%APPDATA%\\cabal"
|
|
|
|
- "%APPDATA%\\ghc"
|
2017-12-22 01:23:46 +03:00
|
|
|
# - "%LOCALAPPDATA%\\Programs\\stack"
|
2017-08-30 12:46:14 +03:00
|
|
|
|
2017-12-22 01:23:46 +03:00
|
|
|
clone_folder: "c:\\pkg"
|
2017-08-30 12:46:14 +03:00
|
|
|
build: off
|
|
|
|
|
|
|
|
before_test:
|
2018-03-08 23:35:29 +03:00
|
|
|
- if not exist %PACKCHECK_LOCAL_PATH% curl -sSkL -o%PACKCHECK_LOCAL_PATH% %PACKCHECK_GITHUB_URL%/%PACKCHECK_GITHUB_COMMIT%/packcheck.sh
|
2017-08-30 12:46:14 +03:00
|
|
|
- if not exist %LOCAL_BIN% mkdir %LOCAL_BIN%
|
|
|
|
- where stack.exe || curl -sSkL -ostack.zip http://www.stackage.org/stack/windows-x86_64 && 7z x stack.zip stack.exe && move stack.exe %LOCAL_BIN%
|
2018-05-27 16:59:14 +03:00
|
|
|
- if defined STACKVER (stack upgrade --binary-only --binary-version %STACKVER%) else (stack upgrade --binary-only || ver > nul)
|
2017-12-07 22:21:02 +03:00
|
|
|
- stack --version
|
2017-08-30 12:46:14 +03:00
|
|
|
|
|
|
|
test_script:
|
|
|
|
- stack setup > nul
|
2018-05-27 16:59:14 +03:00
|
|
|
- for /f "usebackq tokens=*" %%i in (`where 7z.exe`) do set PATH7Z=%%i\..
|
|
|
|
- for /f "usebackq tokens=*" %%i in (`where git.exe`) do set PATHGIT=%%i\..
|
|
|
|
- chcp 65001 && stack exec bash -- -c "chmod +x %PACKCHECK_LOCAL_PATH%; %PACKCHECK_LOCAL_PATH% stack PATH=/usr/bin:\"%PATH7Z%\":\"%PATHGIT%\""
|