diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index c646fc3..2837190 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -17,24 +17,30 @@ jobs: strategy: fail-fast: false matrix: - ghc: ["9.2.2", "9.0.2", "8.10.7", "8.8.4", "8.6.5"] + ghc: ["9.8.1", "9.6.3", "9.4.8", "9.2.8", "9.0.2", "8.10.7"] os: [ubuntu-latest, macOS-latest, windows-latest] + env: + # Modify this value to "invalidate" the cabal cache. + CABAL_CACHE_VERSION: "2024-01-05" + steps: - uses: actions/checkout@v2 - - uses: haskell/actions/setup@v1 + - uses: haskell-actions/setup@v2 id: setup-haskell with: ghc-version: ${{ matrix.ghc }} - cabal-version: 3.6.2.0 + cabal-version: '3.10.2.1' - name: Set some window specific things if: matrix.os == 'windows-latest' run: echo 'EXE_EXT=.exe' >> $GITHUB_ENV - name: Configure project - run: cabal configure --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+ + run: | + cabal configure --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+ + cabal build all --enable-tests --enable-benchmarks --dry-run - name: Cabal cache over S3 uses: action-works/cabal-cache-s3@v1 @@ -46,7 +52,7 @@ jobs: dist-dir: dist-newstyle store-path: ${{ steps.setup-haskell.outputs.cabal-store }} threads: 16 - archive-uri: ${{ secrets.BINARY_CACHE_URI }} + archive-uri: ${{ secrets.BINARY_CACHE_URI }}/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}/${{ matrix.cabal }}/${{ matrix.ghc }} skip: "${{ secrets.BINARY_CACHE_URI == '' }}" - name: Cabal cache over HTTPS @@ -55,18 +61,14 @@ jobs: dist-dir: dist-newstyle store-path: ${{ steps.setup-haskell.outputs.cabal-store }} threads: 16 - archive-uri: https://cache.haskellworks.io/archive + archive-uri: https://cache.haskellworks.io/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}/${{ matrix.cabal }}/${{ matrix.ghc }} skip: "${{ secrets.BINARY_CACHE_URI != '' }}" - name: Build - # Try building it twice in case of flakey builds on Windows - run: | - cabal build all --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+ || \ - cabal build all --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+ -j1 + run: cabal build all --enable-tests --enable-benchmarks - name: Test - run: | - cabal test all --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+ + run: cabal test all --enable-tests --enable-benchmarks check: needs: build diff --git a/.vscode/tasks.json b/.vscode/tasks.json index f6d86eb..dc24b1f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -5,7 +5,7 @@ "label": "Build", "type": "shell", "command": "bash", - "args": ["-lc", "./project.sh build && echo 'Done'"], + "args": ["-lc", "cabal build all --enable-tests && echo 'Done'"], "group": { "kind": "build", "isDefault": true @@ -37,7 +37,7 @@ "label": "Test", "type": "shell", "command": "bash", - "args": ["-lc", "./project.sh test && echo 'Done'"], + "args": ["-lc", "cabal test all --enable-tests && echo 'Done'"], "group": { "kind": "test", "isDefault": true