GitHub-hosted runner for macOS/AArch64

GitHub now hosts a runner for macOS/AArch64 - macos-14. However, it does not yet come with Haskell tools. I have requested that they be added. EDIT: The request was rejected, for reasons set out here. It appears that, previously, Haskell tools were removed from macos-13 on 20 December 2023, following an action taken on 10 November 2023.

I am planning to add this to Stack’s CI, so that macOS/AArch64 releases of Stack no longer have to be built ‘by hand’. EDIT: I have now done this. As an aside, with Stack’s Integration tests GitHub actions workflow, macos-14 appears to be ~ 44% quicker than macos-latest.

5 Likes

The new runners are very low in space (14GB of storage). GHC alone takes around ~2GB. So it makes sense to not provide pre-installed Haskell tools.

The GH Haskell org has 3 self-hosted aarch64 darwin runners.

2 Likes

Stack for use with one version of GHC requires at least about 5 GB of disk space (the local copy of the Hackage package index requires about 2 GB, on top of GHC). I’ve now added Stack’s disk space requirements to its online documentation.

3 Likes

I have hidden a discussion which was about problems with running Haskell on MacOS in general so that this thread can stay on topic, that is about the new Github runners for MacOS. If any of you want to discuss MacOS problems, please open a new thread.

6 Likes

A pity [that the Haskell tools were removed]! Thanks for the update.

An update: macOS 14 (Sonoma) is generally available - The GitHub Blog. macos-latest is now, post-migration, macos-14.

Thanks for making this discussion, we recently started seeing stack not found errors and arrived here.

Apologies if I’ve missed it, but does anyone know what exactly folks are supposed to do on macos-14? Is it brew install stack? The GitHub response implies stack was removed because it “can be installed quickly and easily at runtime”, but I’ve yet to see anyone actually quote the installation command.

1 Like

What the Stack project does in its own CI is as follows:

    - name: My step
      shell: bash
      run: |
        set -ex

        if [[ "${{ matrix.os }}" == "macos-latest" ]]
        then
          # macos-latest does not include Haskell tools as at 2024-04-25.
          curl -sSL https://get.haskellstack.org/ | sh
        fi

where Stack uses os to hold the name of the runner in the matrix.

1 Like

Ah, so the official curl-sh works, perfect!

For ease of copy-paste, the following should be an equivalent drop-in for any workflow:

      - if: ${{ runner.os == 'macOS' }}
        run: curl -sSL https://get.haskellstack.org/ | sh

EDIT: or, to base it on a matrix:

      - if: ${{ matrix.runner == 'macos-latest' }}
        run: curl -sSL https://get.haskellstack.org/ | sh
1 Like

macos-12 (x86_64) still provides Haskell tools.

Good point. I’ll only be using my snippet on macos-latest. We have a lot of matrices that are windows/linux/mac, we don’t have any that are multiple, non-latest mac versions – so this snippet will work for our cases.