@@ -0,0 +1,135 @@
3+#-----------------------------------------------------------------------------
5+# Packcheck global environment variables
6+#-----------------------------------------------------------------------------
10+ # ------------------------------------------------------------------------
12+ # ------------------------------------------------------------------------
13+ # GHC_OPTIONS: "-Werror"
14+ CABAL_REINIT_CONFIG: "y"
17+ # ------------------------------------------------------------------------
19+ # ------------------------------------------------------------------------
23+ DISABLE_SDIST_BUILD: "y"
24+ DISABLE_DIST_CHECKS: "y"
25+ # ENABLE_INSTALL: "y"
27+ # ------------------------------------------------------------------------
29+ # ------------------------------------------------------------------------
30+ # Note requiring a specific version of stack using STACKVER may fail due to
31+ # github API limit while checking and upgrading/downgrading to the specific
37+ # ------------------------------------------------------------------------
39+ # ------------------------------------------------------------------------
40+ CABAL_CHECK_RELAX: "y"
41+ CABAL_NO_SANDBOX: "y"
42+ CABAL_HACKAGE_MIRROR: "hackage.haskell.org:http://hackage.fpcomplete.com"
44+ # ------------------------------------------------------------------------
45+ # Where to find the required tools
46+ # ------------------------------------------------------------------------
50+ # ------------------------------------------------------------------------
51+ # Location of packcheck.sh (the shell script invoked to perform CI tests ).
52+ # ------------------------------------------------------------------------
53+ # You can either commit the packcheck.sh script at this path in your repo or
54+ # you can use it by specifying the PACKCHECK_REPO_URL option below in which
55+ # case it will be automatically copied from the packcheck repo to this path
56+ # during CI tests. In any case it is finally invoked from this path.
57+ PACKCHECK_LOCAL_PATH: "./packcheck.sh"
58+ # If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
59+ # then it is automatically pulled from this URL.
60+ PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/harendra-kumar/packcheck"
61+ PACKCHECK_GITHUB_COMMIT: "432621414fe9b59a29425c77d3754a671afffc95"
62+ PACKCHECK_CMD: "$PACKCHECK_LOCAL_PATH $BUILD PATH=/opt/ghc/bin:$PATH"
65+ - image: debian:stretch
67+#-----------------------------------------------------------------------------
68+# Common utility stuff, not to be modified usually
69+#-----------------------------------------------------------------------------
71+preinstall: &preinstall
73+ echo "deb http://downloads.haskell.org/debian stretch main" >> /etc/apt/sources.list
75+ apt-get install -y curl
76+ # required for apt-key
77+ apt-get install -y gnupg
78+ # required for cache save and restore
79+ apt-get install -y ca-certificates
80+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574
83+ # If a custom stack-yaml is specified, replace the default with that
84+ if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
87+ # Get packcheck if needed
89+ PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
90+ if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
91+ chmod +x $PACKCHECK_LOCAL_PATH
94+ # Needs to happen after installing ca-certificates
96+ key: v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}
100+ key: v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}
107+#-----------------------------------------------------------------------------
109+#-----------------------------------------------------------------------------
121+ COVERALLS_OPTIONS: "--repo-token=KlGN45lDWQkw55TNm18nkam2EXRg9lCSH --coverage-mode=StrictlyFullLines --exclude-dir=test test"
123+ apt-get install -y ghc-8.2.2
124+ apt-get install -y cabal-install-2.2
125+ # required by hpc-coveralls
126+ apt-get install -y libcurl4-gnutls-dev
127+ apt-get install -y git
128+ bash -c "$PACKCHECK_CMD"