@@ -1,7 +1,7 @@
1version: 2.1
1version: 2.1
3#-----------------------------------------------------------------------------
3#-----------------------------------------------------------------------------
4−# packcheck-0.4.2
4+# packcheck-0.7.0
5# Packcheck global environment variables
5# Packcheck global environment variables
6#-----------------------------------------------------------------------------
6#-----------------------------------------------------------------------------
@@ -11,6 +11,8 @@ env: &env
11 # Common options
11 # Common options
12 # ------------------------------------------------------------------------
12 # ------------------------------------------------------------------------
13 # GHC_OPTIONS: "-Werror"
13 # GHC_OPTIONS: "-Werror"
14+ # For updating see: https://downloads.haskell.org/~ghcup/
15+ GHCUP_VERSION: 0.1.20.0
14 CABAL_REINIT_CONFIG: "y"
16 CABAL_REINIT_CONFIG: "y"
15 LC_ALL: "C.UTF-8"
17 LC_ALL: "C.UTF-8"
@@ -22,7 +24,6 @@ env: &env
22 # DISABLE_DOCS: "y"
24 # DISABLE_DOCS: "y"
23 # DISABLE_SDIST_BUILD: "y"
25 # DISABLE_SDIST_BUILD: "y"
24 # DISABLE_DIST_CHECKS: "y"
26 # DISABLE_DIST_CHECKS: "y"
27 # ------------------------------------------------------------------------
28 # ------------------------------------------------------------------------
28 # stack options
29 # stack options
@@ -38,15 +39,12 @@ env: &env
38 # cabal options
39 # cabal options
39 # ------------------------------------------------------------------------
40 # ------------------------------------------------------------------------
40 CABAL_CHECK_RELAX: "y"
41 CABAL_CHECK_RELAX: "y"
41− CABAL_NO_SANDBOX: "y"
42− CABAL_HACKAGE_MIRROR: "hackage.haskell.org:http://hackage.fpcomplete.com"
43 CABAL_BUILD_OPTIONS: "-j1 --flag limit-build-mem"
42 CABAL_BUILD_OPTIONS: "-j1 --flag limit-build-mem"
45 # ------------------------------------------------------------------------
44 # ------------------------------------------------------------------------
46 # Where to find the required tools
45 # Where to find the required tools
47 # ------------------------------------------------------------------------
46 # ------------------------------------------------------------------------
48− PATH: /opt/ghc/bin:/opt/ghcjs/bin:/sbin:/usr/sbin:/bin:/usr/bin
47+ PATH: /sbin:/usr/sbin:/bin:/usr/bin
51 # ------------------------------------------------------------------------
49 # ------------------------------------------------------------------------
52 # Location of packcheck.sh (the shell script invoked to perform CI tests ).
50 # Location of packcheck.sh (the shell script invoked to perform CI tests ).
@@ -59,15 +57,15 @@ env: &env
59 # If you have not committed packcheck.sh in your repo at PACKCHECK
57 # If you have not committed packcheck.sh in your repo at PACKCHECK
60 # then it is automatically pulled from this URL.
58 # then it is automatically pulled from this URL.
61 PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
59 PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
62− PACKCHECK_GITHUB_COMMIT: "a302772c8f3791c477edd1764b82f8d1f5b22fdf"
60+ PACKCHECK_GITHUB_COMMIT: "v0.7.0"
65 amd64-executor:
63 amd64-executor:
67− - image: ubuntu:xenial
65+ - image: ubuntu:latest
68 x86-executor:
66 x86-executor:
70− - image: i386/ubuntu:eoan
68+ - image: i386/ubuntu:focal
72#-----------------------------------------------------------------------------
70#-----------------------------------------------------------------------------
73# Common utility stuff, not to be modified usually
71# Common utility stuff, not to be modified usually
@@ -79,38 +77,50 @@ preinstall: &preinstall
79 # required for https/cache save and restore
77 # required for https/cache save and restore
80 apt-get install -y ca-certificates
78 apt-get install -y ca-certificates
82− # required to (re)generate the configure script
80+ # Alternative way of installing ghc and cabal, directly from
83− apt-get install -y autoconf
81+ # haskell.org instead of using ghcup. NOTE: this is for Debian
84−
82+ # only and is debian release specific.
85− # For ghc and cabal-install packages from hvr's ppa
86 # gnupg is required for apt-key to work
83 # gnupg is required for apt-key to work
87− apt-get install -y gnupg
84+ #apt-get install -y gnupg
88− apt-get install -y apt-transport-https
89− apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574
85+ #apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574
90− apt-get install -y software-properties-common
91− add-apt-repository -y ppa:hvr/ghc
92− # echo "deb http://downloads.haskell.org/debian stretch main" >> /etc/apt/sources.list
86+ #echo "deb http://downloads.haskell.org/debian buster main" >> /etc/apt/sources.list
93− echo "deb-src http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main" >> /etc/apt/sources.list
94− apt-get update
87+ #apt-get update
96− # required for packcheck
89+ # required for outbound https for stack and for stack setup
90+ apt-get install -y netbase xz-utils make
97− apt-get install -y curl
91+ apt-get install -y zlib1g-dev
93+ # For ghcup to install ghc
94+ if test -n "$GHCUP_VERSION"
96+ apt-get install -y gcc
97+ apt-get install -y g++
99− # required for circleci.
100+ # libgmp required by ghc for linking
100− apt-get install -y libcurl4-gnutls-dev
101+ apt-get install -y libgmp-dev
101− apt-get install -y git
102 apt-get install -y libtinfo-dev
102 apt-get install -y libtinfo-dev
104− # required for outbound https for stack and for stack setup
104+ # Required by cabal when git URL is specified in project file
105+ apt-get install -y git
107+ # Required for and by packcheck
105− apt-get install -y netbase xz-utils make
108+ apt-get install -y curl
107−project-preinstall: &project-preinstall
109 # Get packcheck if needed
110 # Get packcheck if needed
110− CURL=$(which curl)
111+ if test ! -e "$PACKCHECK"
113+ if test -z "$PACKCHECK_GITHUB_COMMIT"
115+ die "PACKCHECK_GITHUB_COMMIT is not specified."
111− PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
117+ PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
112− if test ! -e "$PACKCHECK"; then $CURL -sL -o "$PACKCHECK" $PACKCHECK_URL; fi;
118+ curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1
120+ elif test ! -x "$PACKCHECK"
113− chmod +x $PACKCHECK
122+ chmod +x $PACKCHECK
115restore: &restore
125restore: &restore
116 # Needs to happen after installing ca-certificates
126 # Needs to happen after installing ca-certificates
@@ -126,266 +136,47 @@ save: &save
126 save_cache:
136 save_cache:
127 key: v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}
137 key: v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}
131 - ~/.local
139 - ~/.local
132 - ~/.stack
141 - ~/.stack
134#-----------------------------------------------------------------------------
144#-----------------------------------------------------------------------------
135# Build matrix
145# Build matrix
136#-----------------------------------------------------------------------------
146#-----------------------------------------------------------------------------
141− executor: amd64-executor
145− - *project-preinstall
149− CABAL_PROJECT: "cabal.project"
151− DISABLE_BENCH: "yes"
152− DISABLE_SDIST_BUILD: "yes"
154− apt-get install -y ghc-8.10.4
155− apt-get install -y cabal-install-3.4
156− bash -c "$PACKCHECK cabal"
160− executor: amd64-executor
164− - *project-preinstall
167− name: GHC 8.8 + stack lts-16.12
170− RESOLVER: "lts-16.12"
171− SDIST_OPTIONS: "--ignore-check"
172− STACK_BUILD_OPTIONS: "--flag streamly-benchmarks:-opt"
174− apt-get build-dep -y ghc-8.8.4
175− apt-get install -y cabal-install-3.2
176− bash -c "$PACKCHECK $BUILD"
178 cabal-ghc-8_6_5:
149 cabal-ghc-8_6_5:
180 executor: amd64-executor
151 executor: amd64-executor
184− - *project-preinstall
187− apt-get install -y ghc-8.6.3
188− apt-get install -y cabal-install-2.4
189− bash -c "$PACKCHECK cabal-v2"
193− executor: x86-executor
197− - *project-preinstall
200− name: GHC 8.4.4 + x86 + debug
204− CABAL_BUILD_OPTIONS: "--flag debug --flag limit-build-mem"
206− apt-get install -y ghc-8.4.4
207− apt-get install -y cabal-install-3.2
208− bash -c "$PACKCHECK $BUILD"
212− executor: amd64-executor
215 - checkout
153 - checkout
216− - *project-preinstall
217 - *restore
154 - *restore
222− DISABLE_BENCH: "yes"
224− DISABLE_SDIST_BUILD: "yes"
225− DISABLE_DIST_CHECKS: "yes"
227− apt-get install -y ghc-8.2.2
228− apt-get install -y cabal-install-3.2
229− bash -c "$PACKCHECK $BUILD"
233− executor: amd64-executor
235 - *preinstall
155 - *preinstall
237− - *project-preinstall
240 environment:
157 environment:
241− BUILD: "cabal-v2"
158+ CABAL_PROJECT: "cabal.project"
243− DISABLE_BENCH: "yes"
245 DISABLE_SDIST_BUILD: "yes"
159 DISABLE_SDIST_BUILD: "yes"
246− DISABLE_DIST_CHECKS: "yes"
160+ CABAL_BUILD_OPTIONS: "--flag debug --flag -opt"
247 command: |
161 command: |
248− apt-get install -y ghc-8.0.2
162+ bash -c "$PACKCHECK cabal GHCVER=8.6.5"
249− apt-get install -y cabal-install-3.2
250− bash -c "$PACKCHECK $BUILD"
254− executor: amd64-executor
258− - *project-preinstall
261− apt-get install -y ghc-7.10.3
262− apt-get install -y cabal-install-2.4
263− bash -c "$PACKCHECK cabal-v2"
265− stack-ghc-8_4:
164+ hlint-trailing-spaces:
267 executor: amd64-executor
166 executor: amd64-executor
270 - checkout
168 - checkout
271− - *project-preinstall
272 - *restore
169 - *restore
274− bash -c "$PACKCHECK stack RESOLVER=lts-12"
278− executor: amd64-executor
280 - *preinstall
170 - *preinstall
282− - *project-preinstall
285− bash -c "$PACKCHECK stack RESOLVER=lts-11"
289− executor: amd64-executor
293− - *project-preinstall
296− name: GHCJS 8.4+no-test+no-docs
172+ name: hlint and trailing spaces
297 environment:
173 environment:
303 DISABLE_SDIST_BUILD: "yes"
174 DISABLE_SDIST_BUILD: "yes"
175+ HLINT_VERSION: 3.6.1
177+ HLINT_TARGETS: core/src src test benchmark
304 command: |
178 command: |
305− add-apt-repository -y ppa:hvr/ghcjs
306− add-apt-repository -y 'deb https://deb.nodesource.com/node_11.x xenial main'
307− curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
309− apt-get install -y cabal-install-3.2
310− apt-get install -y nodejs
311− apt-get install -y ghcjs-8.4
312− cabal user-config update -a "jobs: 1"
313− bash -c "$PACKCHECK $BUILD"
179+ bash -c "$PACKCHECK hlint" || exit 1
315− coveralls-ghc-8_2_2:
317− executor: amd64-executor
321− - *project-preinstall
326− COVERALLS_OPTIONS: "--repo-token=\"$REPO_TOKEN\" --coverage-mode=StrictlyFullLines --exclude-dir=test test"
327− GHC_OPTIONS: "-DCOVERAGE_BUILD"
329− apt-get install -y ghc-8.2.2
330− apt-get install -y cabal-install-2.4
331− bash -c "$PACKCHECK cabal-v1"
333− coveralls-ghc-8_8_3:
335− executor: amd64-executor
339− - *project-preinstall
344− COVERALLS_OPTIONS: "--repo-token=\"$REPO_TOKEN\" --coverage-mode=StrictlyFullLines --exclude-dir=test"
345− CABAL_PROJECT: "cabal.project.coverage"
346− CABAL_BUILD_TARGETS: ""
348− apt-get install -y ghc-8.8.3
349− apt-get install -y cabal-install-3.0
350− bash -c "$PACKCHECK cabal-v2"
351− no_output_timeout: 25m
353− coveralls-ghc-8_10_2:
355− executor: amd64-executor
359− - *project-preinstall
362− name: Build and test with inspection, coverage, Werror
364− apt-get install -y ghc-8.10.2
365− apt-get install -y cabal-install-3.2
366− # Run tests with coverage
368− cabal user-config update -a "jobs: 1"
369− bin/test.sh --coverage --raw
370− # Upload results to coveralls.io
371− PATH=$HOME/.cabal/bin:$PATH
373− which hpc-coveralls 2>/dev/null || cabal install --project-file cabal.project.hpc-coveralls hpc-coveralls
374− hpc-coveralls --repo-token="$REPO_TOKEN" --coverage-mode=StrictlyFullLines
375− no_output_timeout: 25m
379− executor: amd64-executor
383− - *project-preinstall
386− name: Check trailing spaces
388− # bash -c "$PACKCHECK $BUILD" || exit 1
389 echo "Checking trailing spaces..."
180 echo "Checking trailing spaces..."
390 count=$(find . -name "*.hs" -exec grep -H '\ $' {} \; | tee /dev/tty | wc -l)
181 count=$(find . -name "*.hs" -exec grep -H '\ $' {} \; | tee /dev/tty | wc -l)
391 exit $count
182 exit $count
@@ -395,23 +186,7 @@ workflows:
395 version: 2
186 version: 2
398− - cabal-ghc-8_10_4:
189+ #- cabal-ghc-8_6_5:
399− name: GHC 8.10.4 + sdist + no-test + no-bench
190+ # name: 8.6.5-debug-unoptimized
400− #- cabal-ghc-8.6.5
191+ - hlint-trailing-spaces:
402− # name: GHC 8.4.4 + x86 + debug
404− # name: GHC 8.2.2 + no-test + no-bench + no-docs
406− # name: GHC 8.0.2 + no-test + no-bench + no-docs
408− # - cabal-ghcjs-8_4:
409− # name: GHCJS 8.4 + no-test + no-docs
412− #- coveralls-ghc-8.2.2
413− #- coveralls-ghc-8.8.3
414− #- coveralls-ghc-8_10_2:
415− # name: GHC 8.10.2 + inspection + coverage + Werror
416− - trailing-spaces:
192+ name: hlint and trailing spaces
417− name: Trailing Spaces