Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Does not use apt-get installed GHCs #80

Closed

Description

@sol

Here is a repro:

jobs:
  build:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2
      - uses: haskell/actions/setup@v1
        with:
          cabal-version: '3.4'
          ghc-version: '7.4.1'
      - run: ghc --version

Activity

  1. hazelweakly commented on Nov 4, 2021

    @hazelweakly
    Collaborator

    Oh this one is fun. Here's what's happening.

    1. First the action installs GHC (from the ppa) and adds it to the path.
    2. Then it installs cabal from ghcup, and adds it to the path.

    The path looks like your-cabal-location:your-ghc-location:$PATH. But the problem is that ghcup installs cabal by default to ~/.ghcup/bin which contains... preinstalled GHCs for github actions. So ~/.ghcup/bin/ghc is v9.2.1 because that's what the github action runners installed last.

    (This didn't come up before because almost always cabal and ghc come from the same source). I'll have to see if I can figure out an order-independent way to resolve this. I think the solution is going to be (for now) that I unset a few known things, but I'll have to be careful to not break stuff that's manually/pre-installed :)

  2. ncaq commented on Nov 10, 2021

    @ncaq

    I had the same problem too.
    My solution was to run the following command before setup.

    - run: sudo rm -rf ~/.ghcup/bin/
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions