Skip to content

v1.6.0.1-r1: Allow containers-0.7 #26

v1.6.0.1-r1: Allow containers-0.7

v1.6.0.1-r1: Allow containers-0.7 #26

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']
# Minor versions are determined by setup-haskell.
# Use quotes so that the version numbers are not interpreted as floats.
include:
- os: macos-latest
ghc: '7.10'
- os: windows-latest
ghc: '8.4'
# 2022-05-26: GHC 7.10.3 is broken on Windows (Chocolatey)
# 2023-02-10: GHCs 8.0 and 8.2 fail to build hsc2hs-0.68.10 on Windows
# see https://github.com/haskell/hsc2hs/issues/81
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: latest
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