Skip to content

Commit a6a77c9

Browse files
committed
Build with GHC 8.2 and 8.0
1 parent 39bdc75 commit a6a77c9

3 files changed

Lines changed: 55 additions & 8 deletions

File tree

.circleci/config.yml

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
version: 2
22
jobs:
3-
build:
3+
build-8.0:
44
docker:
5-
# GHC 8.0.2 is the lowest (and so far, only) supported compiler version.
5+
# GHC 8.0.2 is the lowest supported compiler version.
66
- image: fpco/stack-build:lts-9.21
77
steps:
88
- checkout
99
- restore_cache:
1010
keys:
11-
- stack-ghc-{{ checksum "stack.yaml" }}
11+
- stack-ghc-{{ checksum "stack-8.0.yaml" }}
1212
- restore_cache:
1313
keys:
1414
- stack-deps-{{ checksum "package.yaml" }}
1515
- run:
1616
name: Set up Stack
17-
command: stack setup --no-terminal --no-reinstall
17+
command: STACK_YAML=stack-8.0.yaml stack setup --no-terminal --no-reinstall
1818
- save_cache:
19-
key: stack-ghc-{{ checksum "stack.yaml" }}
19+
key: stack-ghc-{{ checksum "stack-8.0.yaml" }}
2020
paths:
2121
- /root/.stack
2222
- run:
2323
name: Install dependencies
24-
command: stack build --skip-ghc-check --no-terminal --test --only-dependencies
24+
command: STACK_YAML=stack-8.0.yaml stack build --skip-ghc-check --no-terminal --test --only-dependencies
2525
- save_cache:
2626
key: stack-deps-{{ checksum "package.yaml" }}
2727
paths:
@@ -32,4 +32,44 @@ jobs:
3232
# *don't* build with -Werror on Hackage as that is strongly
3333
# discouraged.
3434
name: Tests
35-
command: stack test --skip-ghc-check --no-terminal --pedantic
35+
command: STACK_YAML=stack-8.0.yaml stack test --skip-ghc-check --no-terminal --pedantic
36+
build-8.2:
37+
docker:
38+
# Latest stackage LTS for GHC 8.2 at time of writing
39+
- image: fpco/stack-build:lts-10.4
40+
steps:
41+
- checkout
42+
- restore_cache:
43+
keys:
44+
- stack-ghc-{{ checksum "stack-8.2.yaml" }}
45+
- restore_cache:
46+
keys:
47+
- stack-deps-{{ checksum "package.yaml" }}
48+
- run:
49+
name: Set up Stack
50+
command: STACK_YAML=stack-8.2.yaml stack setup --no-terminal --no-reinstall
51+
- save_cache:
52+
key: stack-ghc-{{ checksum "stack-8.2.yaml" }}
53+
paths:
54+
- /root/.stack
55+
- run:
56+
name: Install dependencies
57+
command: STACK_YAML=stack-8.2.yaml stack build --skip-ghc-check --no-terminal --test --only-dependencies
58+
- save_cache:
59+
key: stack-deps-{{ checksum "package.yaml" }}
60+
paths:
61+
- /root/.stack
62+
- .stack-work
63+
- run:
64+
# Build with --pedantic here to avoid introducing warnings. We
65+
# *don't* build with -Werror on Hackage as that is strongly
66+
# discouraged.
67+
name: Tests
68+
command: STACK_YAML=stack-8.2.yaml stack test --skip-ghc-check --no-terminal --pedantic
69+
70+
workflows:
71+
version: 2
72+
build_all_versions:
73+
jobs:
74+
- build-8.0
75+
- build-8.2

stack.yaml renamed to stack-8.0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# GHC 8.0.2 is the lowest (and currently, only) supported compiler version.
1+
# GHC 8.0.2 is the lowest supported compiler version.
22
resolver: lts-9.21
33

44
packages:

stack-8.2.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# LTS 10.4 is the latest LTS that supports GHC 8.2 at the time of writing.
2+
resolver: lts-10.4
3+
4+
packages:
5+
- "."
6+
- "./docs/source/tutorial"
7+
- "./graphql-wai"

0 commit comments

Comments
 (0)