diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 6eaf62c..7dd4817 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -49,23 +49,32 @@ jobs: # Latest releases - ghc: latest cabal: latest + cabal_update: "true" + # cabal-3.12 build always needs a repo, so, `cabal update` is mandatory # Latest ghc with cabal head - ghc: latest cabal: head + cabal_update: "true" # Recent releases + - ghc: "9.8" + cabal: "3.10" + cabal_update: "false" + - ghc: "9.6" cabal: "3.10" + cabal_update: "true" + # Test #210 (XDG): is the cabal store-dir set to something meaningful? - ghc: "9.4" cabal: "3.8" + cabal_update: "false" - ghc: "9.2" cabal: "3.6" - - cabal_update: ["false"] + cabal_update: "false" # The following tests do not set 'cabal-update', which defaults to 'true' then. @@ -95,29 +104,18 @@ jobs: plan: ghc: "8.6" cabal: "2.4" - cabal_update: "true" + cabal_update: "false" + # Setting cabal_update to "true" will try to build the test project + # with hackage dependencies, but something goes wrong. + # TODO: figure out what. # cabal update needed here since cabal-2.4 is still v1 - # Test #210 (XDG): is the cabal store-dir set to something meaningful? - - os: ubuntu-latest - plan: - ghc: "9.6" - cabal: "3.10" - cabal_update: "true" - - # With choco, cabal 3.10.1.0 should map to 3.10.1.1 - - os: windows-latest - plan: - ghc: "9.6" - cabal: "3.10" - cabal_update: "true" - # Test some old versions - os: ubuntu-latest plan: ghc: "8.2.2" cabal: "2.4.1.0" - cabal_update: "false" + cabal_update: "false" # Test ghcup pre-release channel - os: ubuntu-latest @@ -188,7 +186,7 @@ jobs: ghc-version: ${{ matrix.plan.ghc }} ghcup-release-channel: ${{ matrix.ghcup_release_channel }} cabal-version: ${{ matrix.plan.cabal }} - cabal-update: ${{ matrix.cabal_update }} + cabal-update: ${{ matrix.plan.cabal_update }} - name: Show installed versions and PATH run: | @@ -248,7 +246,7 @@ jobs: # This tests whether the default installdir has been added to the PATH (issue #130). - name: Build and run test with Hackage dependency - if: ${{ matrix.cabal_update != 'false' }} + if: ${{ matrix.plan.cabal_update != 'false' }} working-directory: __tests__/project-with-hackage-dependency run: cabal build && cabal run diff --git a/README.md b/README.md index 7da8679..f5dbf25 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,21 @@ jobs: - run: runhaskell Hello.hs ``` +### Multiple GHC versions + +If you need multiple versions of GHC installed at the same time, it is possible +to run the action twice. + +```yaml +- uses: haskell-actions/setup@v2 + with: + ghc-version: '9.8.2' + +- uses: haskell-actions/setup@v2 + with: + ghc-version: '8.10.7' +``` + ### Model cabal workflow with caching ```yaml @@ -300,6 +315,7 @@ Suggestion: Try to support at least the three latest major versions of GHC. - `head` (the [cabal-head](https://github.com/haskell/cabal/releases/tag/cabal-head) release of the most recent build of the `master` branch) - `latest` (default, recommended) +- `3.12.1.0` `3.12` - `3.10.3.0` `3.10` - `3.10.2.1` - `3.10.2.0` diff --git a/dist/index.js b/dist/index.js index 2a1e2bf..56872a2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -14340,7 +14340,7 @@ module.exports = JSON.parse('{"win32":{"ghc":[{"from":"9.4.3","to":"9.4.3.1"},{" /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"ghc":["9.10.1","9.8.2","9.8.1","9.6.5","9.6.4","9.6.3","9.6.2","9.6.1","9.4.8","9.4.7","9.4.6","9.4.5","9.4.4","9.4.3","9.4.2","9.4.1","9.2.8","9.2.7","9.2.6","9.2.5","9.2.4","9.2.3","9.2.2","9.2.1","9.0.2","9.0.1","8.10.7","8.10.6","8.10.5","8.10.4","8.10.3","8.10.2","8.10.1","8.8.4","8.8.3","8.8.2","8.8.1","8.6.5","8.6.4","8.6.3","8.6.2","8.6.1","8.4.4","8.4.3","8.4.2","8.4.1","8.2.2","8.0.2","7.10.3"],"cabal":["3.10.3.0","3.10.2.1","3.10.2.0","3.10.1.0","3.8.1.0","3.6.2.0","3.6.0.0","3.4.1.0","3.4.0.0","3.2.0.0","3.0.0.0","2.4.1.0"],"stack":["2.15.7","2.15.5","2.15.3","2.15.1","2.13.1","2.11.1","2.9.3","2.9.1","2.7.5","2.7.3","2.7.1","2.5.1","2.3.3","2.3.1","2.1.3","2.1.1","1.9.3","1.9.1","1.7.1","1.6.5","1.6.3","1.6.1","1.5.1","1.5.0","1.4.0","1.3.2","1.3.0","1.2.0"],"ghcup":["0.1.22.0"]}'); +module.exports = JSON.parse('{"ghc":["9.10.1","9.8.2","9.8.1","9.6.5","9.6.4","9.6.3","9.6.2","9.6.1","9.4.8","9.4.7","9.4.6","9.4.5","9.4.4","9.4.3","9.4.2","9.4.1","9.2.8","9.2.7","9.2.6","9.2.5","9.2.4","9.2.3","9.2.2","9.2.1","9.0.2","9.0.1","8.10.7","8.10.6","8.10.5","8.10.4","8.10.3","8.10.2","8.10.1","8.8.4","8.8.3","8.8.2","8.8.1","8.6.5","8.6.4","8.6.3","8.6.2","8.6.1","8.4.4","8.4.3","8.4.2","8.4.1","8.2.2","8.0.2","7.10.3"],"cabal":["3.12.1.0","3.10.3.0","3.10.2.1","3.10.2.0","3.10.1.0","3.8.1.0","3.6.2.0","3.6.0.0","3.4.1.0","3.4.0.0","3.2.0.0","3.0.0.0","2.4.1.0"],"stack":["2.15.7","2.15.5","2.15.3","2.15.1","2.13.1","2.11.1","2.9.3","2.9.1","2.7.5","2.7.3","2.7.1","2.5.1","2.3.3","2.3.1","2.1.3","2.1.1","1.9.3","1.9.1","1.7.1","1.6.5","1.6.3","1.6.1","1.5.1","1.5.0","1.4.0","1.3.2","1.3.0","1.2.0"],"ghcup":["0.1.22.0"]}'); /***/ }) diff --git a/lib/versions.json b/lib/versions.json index 0daeaa4..6f4e0bd 100644 --- a/lib/versions.json +++ b/lib/versions.json @@ -51,6 +51,7 @@ "7.10.3" ], "cabal": [ + "3.12.1.0", "3.10.3.0", "3.10.2.1", "3.10.2.0", diff --git a/src/versions.json b/src/versions.json index 1cc84c2..a8564cb 100644 --- a/src/versions.json +++ b/src/versions.json @@ -51,6 +51,7 @@ "7.10.3" ], "cabal": [ + "3.12.1.0", "3.10.3.0", "3.10.2.1", "3.10.2.0",