diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c1e80b..e491939 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,8 +5,8 @@ name: CI -on: - pull_request: +on: + pull_request: branches: - main push: @@ -20,7 +20,7 @@ concurrency: jobs: generate-matrix: name: "Generate matrix from cabal" - outputs: + outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} runs-on: ubuntu-latest steps: @@ -46,12 +46,13 @@ jobs: id: setup with: ghc-version: ${{ matrix.ghc }} - cabal-version: 'latest' + cabal-version: "latest" cabal-update: true - name: Configure the build run: | - cabal configure --enable-tests --disable-documentation + cabal configure --enable-tests --enable-benchmarks --disable-documentation cabal build all --dry-run + - name: Restore cached dependencies uses: actions/cache/restore@v4 id: cache @@ -59,8 +60,9 @@ jobs: key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }} with: path: ${{ steps.setup.outputs.cabal-store }} - key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }} - restore-keys: ${{ env.key }}- + key: v1-${{ env.key }}-plan-${{ hashFiles('**/dist-newstyle/cache/plan.json') }} + restore-keys: v1-ghc-deps-${{ env.key }}- + - name: Install dependencies if: steps.cache.outputs.cache-hit != 'true' run: cabal build all --only-dependencies