Skip to content

Commit

Permalink
Update packcheck and add ghc-9.12.1-alpha to the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaov committed Oct 26, 2024
1 parent 695898f commit a3d0786
Showing 1 changed file with 27 additions and 18 deletions.
45 changes: 27 additions & 18 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ jobs:
# ------------------------------------------------------------------------
PACKCHECK_LOCAL_PATH: "./packcheck.sh"
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "v0.6.0"
PACKCHECK_GITHUB_COMMIT: "e575ff318c93add2a6d3f9107a52c5e37c666a98"

# ------------------------------------------------------------------------
# Build options
# ------------------------------------------------------------------------
BUILD: cabal-v2 ${{ matrix.pack_options }}
GHCVER: ${{ matrix.ghc_version }}
CABALVER: ${{ matrix.cabal_version }}

runs-on: ${{ matrix.runner }}
# [NOTE] The following is a hack to fix the lack of “allow-failure” feature.
Expand Down Expand Up @@ -135,17 +136,27 @@ jobs:

- name: 9.8.2
ghc_version: 9.8.2
cabal_version: 3.12.1.0
runner: ubuntu-latest
cabal_version: latest
ignore_error: false

- name: 9.10.1+ucd2haskell
ghc_version: 9.10.1
cabal_version: 3.12.1.0
pack_options: CABAL_BUILD_OPTIONS="-f ucd2haskell"
runner: ubuntu-latest
cabal_version: latest
ignore_error: false

- name: 9.12.1-alpha
ghc_version: head
cabal_version: 3.12.1.0
pack_options: GHCUP_GHC_OPTIONS="-u https://downloads.haskell.org/ghc/9.12.1-alpha1/ghc-9.12.20241014-x86_64-deb12-linux.tar.xz"
runner: ubuntu-latest
cabal_version: latest
ignore_error: false

# Template for release candidates
# - name: 9.10.0
# ghc_version: 9.8.0.XXXXX
Expand All @@ -172,12 +183,6 @@ jobs:
steps:
- uses: actions/checkout@v4

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

- uses: actions/cache@v4
name: Cache ~/.cabal
with:
Expand All @@ -186,18 +191,22 @@ jobs:

- name: Download packcheck
run: |
# If a custom stack-yaml is specified, replace the default with that
if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
unset STACK_YAML
# Get packcheck if needed
CURL=$(which curl)
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
chmod +x $PACKCHECK_LOCAL_PATH
if test ! -e "$PACKCHECK"
then
if test -z "$PACKCHECK_GITHUB_COMMIT"
then
die "PACKCHECK_GITHUB_COMMIT is not specified."
fi
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1
chmod +x $PACKCHECK
elif test ! -x "$PACKCHECK"
then
chmod +x $PACKCHECK
fi
- name: Run packcheck
run: |
# Unset GHC version if it is not numeric, e.g. “latest-nightly”
! [[ $GHCVER =~ ^([[:digit:]]+) ]] && unset GHCVER
# /usr/local/opt/curl/bin for macOS
export PATH=$HOME/.local/bin:$HOME/.ghcup/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/curl/bin
bash -c "$PACKCHECK_LOCAL_PATH $BUILD"

0 comments on commit a3d0786

Please sign in to comment.