Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul metadata merging and add 'ghcup config add-release-channel URI' #647

Closed
wants to merge 1 commit into from

Conversation

hasufell
Copy link
Member

In GitLab by @maerwald on Mar 11, 2022, 03:30

Wrt #328 @abel

This PR does two things:

  1. makes merging release channels more robust (previously we would only merge versions if the tool exists in the main channel)
  2. adds cli support, so to get pre-releases you would do: ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml

This might make adding pre-releases easier as described in https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/328#note_414294


So a github workflow would look as follows:

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macOS-latest, windows-latest]
        ghc: ['8.10.7', '9.3.2.20220308']
        cabal: ['3.6.2.0']

    steps:
    - uses: actions/checkout@v2

    - name: enable pre-releases
      run: ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml
      shell: bash

    - uses: haskell/actions/[email protected]
      with:
        ghc-version: ${{ matrix.ghc }}
        cabal-version: ${{ matrix.cabal }}

Obviously, this will only work for windows if haskell/actions#70 is merged. But since ghcup is pre-installed on ALL github environments, you can simply drop haskell/actions/[email protected] and do this instead:

    - name: Install ghc/cabal
      run: |
        ghcup install ghc --set ${{ matrix.ghc }}
        ghcup install cabal ${{ matrix.cabal }}

@hasufell hasufell closed this Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant