From 53244da3330ada568f80e2a07b4c6fe7268c91fc Mon Sep 17 00:00:00 2001 From: Steve Hart Date: Fri, 25 Mar 2022 15:43:50 -0400 Subject: Fix CI (#1467) * CI: Reinstall GHC with docs CI tests were failing because the GHC preinstalled to the CI environment does not include documentation, which is required for running the Haddock tests. This commit causes the CI workflow to reinstall GHC with docs so that tests can succeed. --- .github/workflows/ci.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to '.github/workflows/ci.yml') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9268c6b7..c147cbdc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,6 @@ jobs: steps: - uses: actions/checkout@v2 - if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/ghc-9.2' - uses: haskell/actions/setup@v1 id: setup-haskell-cabal @@ -28,9 +27,19 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - - name: Prepare environment - run: echo "$HOME/.ghcup/bin" >> $GITHUB_PATH + # GitHub preinstalls recent GHC versions, and haskell/actions/setup uses the + # preinstalled version when possible. However, GitHub's preinstalled GHC does + # not include documentation, and we need documentation to run Haddock tests. + # Therefore, we reinstall GHC to ensure that we have the documentation we + # need. + # TODO: Only reinstall GHC when the docs are actually missing. (If we're + # using a GHC version that is not preinstalled by GitHub, then we will be + # using a GHC installed by ghcup, which should have documentation.) + - name: Reinstall GHC with docs + run: | + ghcup rm ghc ${{ matrix.ghc }} + ghcup install ghc ${{ matrix.ghc }} - name: Freeze run: | -- cgit v1.2.3