Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Commit 17acefb

Browse files
authored
Merge pull request #1296 from Kleidukos/ghc-9.0
Merge the late additions to ghc-8.10 into ghc-9.0
2 parents e88a637 + fcf9a04 commit 17acefb

File tree

4 files changed

+31
-33
lines changed

4 files changed

+31
-33
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: CI
44
on:
55
pull_request:
66
push:
7-
branches: ["ghc-8.10"]
7+
branches: ["ghc-9.0"]
88

99
jobs:
1010
cabal:
@@ -13,37 +13,41 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ubuntu-latest]
16-
cabal: ["3.2"]
16+
cabal: ["3.4"]
1717
ghc:
18-
- "8.10.1"
19-
- "8.10.2"
18+
- "9.0.1"
2019

2120
steps:
2221
- uses: actions/checkout@v2
23-
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/ghc-8.10'
22+
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/ghc-9.0'
2423

25-
- uses: actions/setup-haskell@v1.1.4
24+
- uses: haskell/actions/setup@v1
2625
id: setup-haskell-cabal
2726
name: Setup Haskell
2827
with:
2928
ghc-version: ${{ matrix.ghc }}
3029
cabal-version: ${{ matrix.cabal }}
3130

31+
- name: Prepare environment
32+
run: echo "$HOME/.ghcup/bin" >> $GITHUB_PATH
33+
34+
3235
- name: Freeze
3336
run: |
3437
cabal freeze
35-
36-
- uses: actions/cache@v1
37-
name: Cache ~/.cabal/store
38+
39+
- uses: actions/cache@v2
40+
name: Cache ~/.cabal/store and .ghcup
3841
with:
39-
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
40-
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
42+
path: |
43+
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
44+
.ghcup
45+
key: ${{ runner.os }}
4146

4247
- name: Build
4348
run: |
4449
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
4550
cabal build all
4651
4752
- name: Test
48-
run: |
49-
cabal test all
53+
run: cabal test all

README.md

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,13 @@ Note: before building `haddock`, you need to build the subprojects
4141
`haddock-library` and `haddock-api`, in this order!
4242
The `cabal v2-build` takes care of this automatically.
4343

44-
#### Using [`cabal v2-build`][cabal v2]
44+
#### Using `cabal`
45+
46+
Requires cabal `>= 3.4` and GHC `== 9.0`:
4547

4648
```bash
47-
cabal v2-build -w ghc-8.10.1
48-
cabal v2-test -w ghc-8.10.1 all
49+
cabal build all --enable-tests
50+
cabal test all
4951
```
5052

5153
#### Using `stack`
@@ -57,22 +59,6 @@ export HADDOCK_PATH="$(stack exec which haddock)"
5759
stack test
5860
```
5961

60-
#### Using Cabal sandboxes (deprecated)
61-
62-
```bash
63-
cabal sandbox init
64-
cabal sandbox add-source haddock-library
65-
cabal sandbox add-source haddock-api
66-
cabal sandbox add-source haddock-test
67-
# adjust -j to the number of cores you want to use
68-
cabal install -j4 --dependencies-only --enable-tests
69-
cabal configure --enable-tests
70-
cabal build -j4
71-
# run the test suite
72-
export HADDOCK_PATH="dist/build/haddock/haddock"
73-
cabal test
74-
```
75-
7662
### Git Branches
7763

7864
If you're a GHC developer and want to update Haddock to work with your changes,

cabal.project

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,12 @@ packages: ./
33
./haddock-library
44
./haddock-test
55

6+
with-compiler: ghc-9.0
7+
8+
allow-newer:
9+
ghc-paths:Cabal,
10+
*:base,
11+
*:ghc-prim
12+
613
-- Pinning the index-state helps to make reasonably CI deterministic
7-
index-state: 2020-12-08T20:13:44Z
14+
index-state: 2021-01-24T12:09:34Z

haddock-api/haddock-api.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ test-suite spec
189189
, containers
190190
, deepseq
191191
, directory
192+
, exceptions
192193
, filepath
193194
, ghc-boot
194195
, transformers

0 commit comments

Comments
 (0)