Skip to content

GHC 9.8

GHC 9.8 #37

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
config-dir: 'ci-configs'
jobs:
enumerate:
name: Generate Build Matrix Dynamically
runs-on: ubuntu-latest
outputs:
configs: ${{ steps.enumerate.outputs.configs }}
steps:
- uses: actions/checkout@v3
- name: Enumerate Configs
id: enumerate
run: |
set -euxo pipefail
find "${{env.config-dir}}"/ -type f -name 'ghc-*.config' \
| sort -h | jq -ncR '[inputs | {ghc: match("ghc-(.+)\\.config$", .) | .captures[0].string | select(.), plan: .}]' | tee configs.json
echo "configs=$(cat configs.json)" >> "${GITHUB_OUTPUT}"
build:
name: Build
needs: [enumerate]
strategy:
fail-fast: false
matrix:
include: ${{fromJSON(needs.enumerate.outputs.configs)}}
runs-on: ubuntu-latest
env:
CABAL: cabal --project-file=${{matrix.plan}}
continue-on-error: false
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: false
- name: Cache ~/.cabal/store
uses: actions/cache@v2
env:
cache-name: cache-cabal-store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '${{matrix.plan}}') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.ghc }}-
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Cache dist-newstyle
uses: actions/cache@v2
env:
cache-name: cache-dist-newstyle
with:
path: "dist-newstyle"
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '${{matrix.plan}}') }}-${{ hashFiles('**/*.hs') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '${{matrix.plan}}') }}-
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.ghc }}-
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Configure and update
run: |
${CABAL} v2-configure
${CABAL} v2-update
- name: Build
run: |
${CABAL} v2-build