Skip to content

Does this action reuse pre-installed versions of GHC and Cabal? #119

@langston-barrett

Description

@langston-barrett

The README says:

The GitHub runners come with pre-installed versions of GHC and Cabal. Those will be used whenever possible.

But check out this workflow run:

Run cabal --version
  
cabal-install version 3.14.1.1
compiled using version 3.14.1.1 of the Cabal library

but

Resolved cabal latest to 3.14.1.1
Preparing ghc environment
Installing ghc version 9.8.4
Preparing cabal environment
Installing cabal version 3.14.1.1
  /opt/hostedtoolcache/ghcup/0.1.50.1/x64/ghcup whereis cabal 3.14.1.1
  [ Error ] [�
  Attempting to access tool cabal at location /opt/cabal/3.14/bin
  Failed to access tool cabal at location /opt/cabal/3.14/bin
  Attempting to access tool cabal at location /home/runner/.ghcup/bin
  Succeeded accessing tool cabal at location /home/runner/.ghcup/bin
  /opt/hostedtoolcache/ghcup/0.1.50.1/x64/ghcup set cabal 3.14.1.1
  [ Error ] [�
  /opt/hostedtoolcache/ghcup/0.1.50.1/x64/ghcup unset cabal
  [ Info  ] Cabal successfully unset
  Attempting to install cabal 3.14.1.1 using ghcup
  /opt/hostedtoolcache/ghcup/0.1.50.1/x64/ghcup install cabal 3.14.1.1
  [ Info  ] downloading: https://downloads.haskell.org/~ghcup/unofficial-bindists/cabal/3.14.1.1/cabal-install-3.14.1.1-x86_64-linux-ubuntu22.04.tar.xz as file /usr/local/.ghcup/tmp/ghcup-4e6b75f5cebe0ee4/cabal-install-3.14.1.1-x86_64-linux-ubuntu22.04.tar.xz

It appears that the requested version match the pre-installed version, but then ghcup is still downloading and re-installing the same Cabal version. Am I reading this wrong? Or is this possibly a bug?

Workflow file (not quite minimal)
name: CI

on:
  push:
  pull_request:

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        ghc: ["9.4.8", "9.6.6", "9.8.4"]
        os: [ubuntu-22.04]
      # complete all jobs
      fail-fast: false
    name: GREASE - GHC v${{ matrix.ghc }}
    steps:
    - run: cabal --version

    - uses: haskell-actions/setup@v2
      with:
        ghc-version: ${{ matrix.ghc }}

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