diff options
author | Hécate Moonlight <Kleidukos@users.noreply.github.com> | 2021-02-05 15:03:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-05 15:03:56 +0100 |
commit | 17acefbc7f5a353c3b9ab3980944ce7141c5a7f3 (patch) | |
tree | a167e8a62769fbf5c6f6bc3d15131499046bf8c9 | |
parent | e88a63783fe716adbb96966c335f60009573dfc3 (diff) | |
parent | fcf9a04224fed910d01cf6f4d9c2d1bdc7c085af (diff) |
Merge pull request #1296 from Kleidukos/ghc-9.0
Merge the late additions to ghc-8.10 into ghc-9.0
-rw-r--r-- | .github/workflows/ci.yml | 30 | ||||
-rw-r--r-- | README.md | 24 | ||||
-rw-r--r-- | cabal.project | 9 | ||||
-rw-r--r-- | haddock-api/haddock-api.cabal | 1 |
4 files changed, 31 insertions, 33 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5b1bae2..b2b882e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ name: CI on: pull_request: push: - branches: ["ghc-8.10"] + branches: ["ghc-9.0"] jobs: cabal: @@ -13,31 +13,36 @@ jobs: strategy: matrix: os: [ubuntu-latest] - cabal: ["3.2"] + cabal: ["3.4"] ghc: - - "8.10.1" - - "8.10.2" + - "9.0.1" steps: - uses: actions/checkout@v2 - if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/ghc-8.10' + if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/ghc-9.0' - - uses: actions/setup-haskell@v1.1.4 + - uses: haskell/actions/setup@v1 id: setup-haskell-cabal name: Setup Haskell with: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} + - name: Prepare environment + run: echo "$HOME/.ghcup/bin" >> $GITHUB_PATH + + - name: Freeze run: | cabal freeze - - - uses: actions/cache@v1 - name: Cache ~/.cabal/store + + - uses: actions/cache@v2 + name: Cache ~/.cabal/store and .ghcup with: - path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} - key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} + path: | + ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + .ghcup + key: ${{ runner.os }} - name: Build run: | @@ -45,5 +50,4 @@ jobs: cabal build all - name: Test - run: | - cabal test all + run: cabal test all @@ -41,11 +41,13 @@ Note: before building `haddock`, you need to build the subprojects `haddock-library` and `haddock-api`, in this order! The `cabal v2-build` takes care of this automatically. -#### Using [`cabal v2-build`][cabal v2] +#### Using `cabal` + +Requires cabal `>= 3.4` and GHC `== 9.0`: ```bash -cabal v2-build -w ghc-8.10.1 -cabal v2-test -w ghc-8.10.1 all +cabal build all --enable-tests +cabal test all ``` #### Using `stack` @@ -57,22 +59,6 @@ export HADDOCK_PATH="$(stack exec which haddock)" stack test ``` -#### Using Cabal sandboxes (deprecated) - -```bash -cabal sandbox init -cabal sandbox add-source haddock-library -cabal sandbox add-source haddock-api -cabal sandbox add-source haddock-test -# adjust -j to the number of cores you want to use -cabal install -j4 --dependencies-only --enable-tests -cabal configure --enable-tests -cabal build -j4 -# run the test suite -export HADDOCK_PATH="dist/build/haddock/haddock" -cabal test -``` - ### Git Branches If you're a GHC developer and want to update Haddock to work with your changes, diff --git a/cabal.project b/cabal.project index 7330a775..2525070a 100644 --- a/cabal.project +++ b/cabal.project @@ -3,5 +3,12 @@ packages: ./ ./haddock-library ./haddock-test +with-compiler: ghc-9.0 + +allow-newer: + ghc-paths:Cabal, + *:base, + *:ghc-prim + -- Pinning the index-state helps to make reasonably CI deterministic -index-state: 2020-12-08T20:13:44Z +index-state: 2021-01-24T12:09:34Z diff --git a/haddock-api/haddock-api.cabal b/haddock-api/haddock-api.cabal index 93f59c1f..f3dbe2e2 100644 --- a/haddock-api/haddock-api.cabal +++ b/haddock-api/haddock-api.cabal @@ -189,6 +189,7 @@ test-suite spec , containers , deepseq , directory + , exceptions , filepath , ghc-boot , transformers |