Skip to content

Commit

Permalink
Use GHC Nightlies
Browse files Browse the repository at this point in the history
  • Loading branch information
wismill committed Sep 5, 2023
1 parent a46a952 commit 2c4e3e7
Showing 1 changed file with 6 additions and 33 deletions.
39 changes: 6 additions & 33 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- 9.2.8+exe
- 9.4.7
- 9.6.2
- head
- latest-nightly
- hlint

include:
Expand Down Expand Up @@ -128,9 +128,9 @@ jobs:
# cabal_version: 3.8.1.0

# [TODO] Use latest cabal (pre-)release
- name: head
ghc_version: head
# ghcup_release_channel: "https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml"
- name: latest-nightly
ghc_version: latest-nightly
ghcup_release_channel: "https://ghc.gitlab.haskell.org/ghcup-metadata/ghcup-nightlies-0.0.7.yaml"
runner: ubuntu-latest
# cabal_version: 3.11.0.0
cabal_version: latest
Expand All @@ -144,40 +144,11 @@ jobs:
- uses: actions/checkout@v3

- uses: haskell/actions/setup@v2
if: ${{ matrix.ghc_version != 'head' }}
with:
ghc-version: ${{ matrix.ghc_version }}
ghcup-release-channel: ${{ matrix.ghcup_release_channel }}
cabal-version: ${{ matrix.cabal_version }}

# Adapted from https://github.com/composewell/streamly/blob/master/.github/workflows/haskell.yml
- name: Install GHC head environment
if: ${{ matrix.ghc_version == 'head' }}
run: |
# Install ghcup
CURL=$(which curl)
os=$(uname -s -m)
case "$os" in
"Linux x86_64") GHCUP_ARCH="x86_64-linux" ;;
"Darwin x86_64") GHCUP_ARCH="x86_64-apple-darwin" ;;
*) echo "Unknown OS/Arch: $os"; exit 1;;
esac
# Check available versions here: https://downloads.haskell.org/~ghcup/
GHCUP_VER=0.1.19.0
$CURL -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VER/${GHCUP_ARCH}-ghcup-$GHCUP_VER
chmod +x ./ghcup
# Install GHC head
# The URL may change, to find a working URL go to https://gitlab.haskell.org/ghc/ghc/-/jobs/
# Find a debian10 job, click on a passed/failed job, at the
# end of the output you will find the tar.xz name, put that after
# "raw/", and put the job name after "job=".
# Also see https://github.com/mpickering/ghc-artefact-nix/blob/master/gitlab-artifact.nix
./ghcup install ghc -u https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-linux-deb10-int_native-validate.tar.xz?job=x86_64-linux-deb10-int_native-validate head
./ghcup set ghc ${{ matrix.ghc_version }}
# Install cabal
./ghcup install cabal ${{ matrix.cabal_version }}
./ghcup set cabal ${{ matrix.cabal_version }}
- uses: actions/cache@v3
name: Cache ~/.cabal
with:
Expand All @@ -198,4 +169,6 @@ jobs:
- name: Run packcheck
run: |
# Unset GHC version if it is not numeric, e.g. “latest-nightly”
! [[ $GHCVER =~ ^([[:digit:]]+) ]] && unset GHCVER
bash -c "$PACKCHECK_LOCAL_PATH $BUILD"

0 comments on commit 2c4e3e7

Please sign in to comment.