Relax upper bound of dependencies #378
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Haskell CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
env: | |
# ------------------------------------------------------------------------ | |
# Common options | |
# ------------------------------------------------------------------------ | |
CABAL_REINIT_CONFIG: y | |
LC_ALL: C.UTF-8 | |
DISABLE_TEST: n | |
# ------------------------------------------------------------------------ | |
# cabal options | |
# ------------------------------------------------------------------------ | |
CABAL_CHECK_RELAX: y | |
CABAL_NO_SANDBOX: y | |
CABAL_HACKAGE_MIRROR: "hackage.haskell.org:http://hackage.fpcomplete.com" | |
# ------------------------------------------------------------------------ | |
# Location of packcheck.sh | |
# ------------------------------------------------------------------------ | |
PACKCHECK_LOCAL_PATH: "./packcheck.sh" | |
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck" | |
PACKCHECK_GITHUB_COMMIT: "v0.6.0" | |
# ------------------------------------------------------------------------ | |
# Build options | |
# ------------------------------------------------------------------------ | |
BUILD: cabal-v2 ${{ matrix.pack_options }} | |
GHCVER: ${{ matrix.ghc_version }} | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
name: | |
- 8.0.2 | |
- 8.2.2 | |
- 8.4.4 | |
- 8.6.5 | |
- 8.8.4 | |
- 8.8.4+macOS+exe | |
- 8.10.7+exe | |
- 9.0.2 | |
- 9.2.8+exe | |
- 9.4.7 | |
- 9.6.2 | |
- 9.8.1 | |
- latest-nightly | |
- hlint | |
include: | |
- name: 8.0.2 | |
ghc_version: 8.0.2 | |
runner: ubuntu-latest | |
cabal_version: 3.2 | |
pack_options: DISABLE_TEST=y | |
- name: 8.2.2 | |
ghc_version: 8.2.2 | |
runner: ubuntu-latest | |
cabal_version: 3.2 | |
pack_options: DISABLE_TEST=y | |
- name: 8.4.4 | |
ghc_version: 8.4.4 | |
runner: ubuntu-latest | |
cabal_version: 3.2 | |
pack_options: DISABLE_TEST=y | |
- name: 8.6.5 | |
ghc_version: 8.6.5 | |
runner: ubuntu-latest | |
cabal_version: 3.2 | |
- name: 8.8.4 | |
ghc_version: 8.8.4 | |
runner: ubuntu-latest | |
cabal_version: 3.2 | |
- name: 8.8.4+macOS+exe | |
ghc_version: 8.8.4 | |
pack_options: CABAL_BUILD_OPTIONS="-f ucd2haskell" | |
runner: macos-latest | |
cabal_version: 3.2 | |
- name: 8.10.7+exe | |
ghc_version: 8.10.7 | |
pack_options: CABAL_BUILD_OPTIONS="-f ucd2haskell" | |
runner: ubuntu-latest | |
cabal_version: 3.2 | |
- name: 9.0.2 | |
ghc_version: 9.0.2 | |
runner: ubuntu-latest | |
cabal_version: 3.2 | |
# [NOTE] Last GHC version that can build ucd2haskell | |
- name: 9.2.8+exe | |
ghc_version: 9.2.8 | |
pack_options: CABAL_BUILD_OPTIONS="-f ucd2haskell" | |
runner: ubuntu-latest | |
cabal_version: 3.6 | |
- name: 9.4.7 | |
ghc_version: 9.4.7 | |
runner: ubuntu-latest | |
cabal_version: 3.8.1.0 | |
- name: 9.6.2 | |
ghc_version: 9.6.2 | |
runner: ubuntu-latest | |
cabal_version: 3.10.1.0 | |
- name: 9.8.1 | |
ghc_version: 9.8.1 | |
runner: ubuntu-latest | |
cabal_version: latest | |
# Template for release candidates | |
# - name: 9.10.0 | |
# ghc_version: 9.8.0.XXXXX | |
# ghcup_release_channel: "https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml" | |
# runner: ubuntu-latest | |
# cabal_version: latest | |
# [TODO] Use latest cabal (pre-)release | |
- 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 | |
- name: hlint | |
pack_options: HLINT_OPTIONS="lint" HLINT_TARGETS="lib exe" | |
runner: ubuntu-latest | |
cabal_version: 3.2 | |
steps: | |
- uses: actions/checkout@v3 | |
- 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@v3 | |
name: Cache ~/.cabal | |
with: | |
path: ~/.cabal | |
key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal | |
- 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 | |
- 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" |