actions / setup-haskell

Set up your GitHub Actions workflow with a specific version of Haskell (GHC and Cabal)
MIT License
71 stars 30 forks source link

Setting GHC/Cabal versions doesn't work with macOS #43

Open johnjcamilleri opened 4 years ago

johnjcamilleri commented 4 years ago

Take this workflow file:

name: Main
on: push
jobs:
  main:
    runs-on: macos-latest
    steps:
    - uses: actions/setup-haskell@v1.1
      with:
        ghc-version: 8.6.5
        cabal-version: 2.4
    - run: ghc --version
    - run: cabal --version

The output I get when running the action is:

Run actions/setup-haskell@v1.1
Preparing to setup a Haskell environment
Resolved 2.4 to 2.4.1.0
Installing ghc version 8.6.5
Installing cabal version 2.4.1.0
Setting up cabal
Run ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.2
Run cabal --version
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library 

When I try replacing macos-latest with ubuntu-latest, I get the output I expect:

Run ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.5
Run cabal --version
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library 

You can see my MWE in action here.

johnjcamilleri commented 4 years ago

I see this has already been discussed in #21 and fixed in #22, so I was confused as to why I was still getting this behaviour. I changed the action version from v1.1 to v1 and it seemed to effect the GHC version, but not the Cabal version:

Run ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.5
Run cabal --version
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library 

See this workflow run.