|
1 | 1 | version: 2 |
2 | 2 | jobs: |
3 | | - build: |
| 3 | + build-8.0: |
4 | 4 | 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. |
6 | 6 | - image: fpco/stack-build:lts-9.21 |
7 | 7 | steps: |
8 | 8 | - checkout |
9 | 9 | - restore_cache: |
10 | 10 | keys: |
11 | | - - stack-ghc-{{ checksum "stack.yaml" }} |
| 11 | + - stack-ghc-{{ checksum "stack-8.0.yaml" }} |
12 | 12 | - restore_cache: |
13 | 13 | keys: |
14 | 14 | - stack-deps-{{ checksum "package.yaml" }} |
15 | 15 | - run: |
16 | 16 | 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 |
18 | 18 | - save_cache: |
19 | | - key: stack-ghc-{{ checksum "stack.yaml" }} |
| 19 | + key: stack-ghc-{{ checksum "stack-8.0.yaml" }} |
20 | 20 | paths: |
21 | 21 | - /root/.stack |
22 | 22 | - run: |
23 | 23 | 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 |
25 | 25 | - save_cache: |
26 | 26 | key: stack-deps-{{ checksum "package.yaml" }} |
27 | 27 | paths: |
|
32 | 32 | # *don't* build with -Werror on Hackage as that is strongly |
33 | 33 | # discouraged. |
34 | 34 | 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 |
0 commit comments