Skip to content

v1.6.0.1: repair build on Windows with GHC 9.6 (directory-1.3.8): #24

v1.6.0.1: repair build on Windows with GHC 9.6 (directory-1.3.8):

v1.6.0.1: repair build on Windows with GHC 9.6 (directory-1.3.8): #24

Workflow file for this run

# modified from https://github.com/agda/agda/blob/8b7c6d886b835f5dfcf1e5052dd83ebabac73592/src/github/workflows/cabal.yml
name: Cabal build (Windows/macOS)
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
shell: bash
jobs:
cabal:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
ghc: ['9.6', '9.4', '9.2', '8.0']
# Minor versions are determined by setup-haskell.
# Use quotes so that the version numbers are not interpreted as floats.
# GHC 7.10.3 is broken on Windows (Chocolatey)
cabal: [latest]
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
cabal-update: true
# # How would you get something like steps.setup-haskell.outputs.cabal-store
# # when installing with ghcup?
# - name: Install ghc and cabal with ghcup
# run: |
# ghcup install --set ghc ${{ matrix.ghc }}
# ghcup install cabal ${{ matrix.cabal }}
- name: Environment settings based on the Haskell setup
run: |
export GHC_VER=$(ghc --numeric-version)
export CABAL_VER=$(cabal --numeric-version)
echo "GHC_VER = ${GHC_VER}"
echo "CABAL_VER = ${CABAL_VER}"
echo "GHC_VER=${GHC_VER}" >> ${GITHUB_ENV}
echo "CABAL_VER=${CABAL_VER}" >> ${GITHUB_ENV}
# From now on, use env.{GHC|CABAL}_VER rather than matrix.{ghc|cabal}!
- name: Configure the build plan
run: |
cabal configure -O0 --enable-tests --enable-benchmarks
- uses: actions/cache@v3
name: Cache dependencies
id: cache
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
# The file `plan.json` contains the build information.
key: ${{ runner.os }}-cabal-01-${{ env.GHC_VER }}-${{ env.CABAL_VER }}-${{ hashFiles('**/plan.json') }}
- name: Install dependencies
if: ${{ !steps.cache.outputs.cache-hit }}
run: |
cabal build --only-dependencies
- name: Build
run: |
cabal build
- name: Test
run: |
cabal test
- name: Haddock
run: |
cabal haddock
- name: Check cabal file
run: |
cabal check