From a3d0786643304caf5eb80cb17c8aa9580b12430c Mon Sep 17 00:00:00 2001 From: Adithya Kumar Date: Sat, 26 Oct 2024 20:29:04 +0530 Subject: [PATCH] Update packcheck and add ghc-9.12.1-alpha to the CI --- .github/workflows/haskell.yml | 45 +++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index c513c52..59b4620 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -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. @@ -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 @@ -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: @@ -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"