Skip to content

chore(deps): bump haskell-actions/setup from 2.9.0 to 2.9.1 (#143) #1286

chore(deps): bump haskell-actions/setup from 2.9.0 to 2.9.1 (#143)

chore(deps): bump haskell-actions/setup from 2.9.0 to 2.9.1 (#143) #1286

name: Build & test (latest GHC & deps)
on:
push:
branches: [master]
pull_request:
schedule:
- cron: 0 5 * * 0 # every sunday 05:00 UTC
jobs:
build-with-latest-ghc:
name: Build and test with Cabal (GHC latest) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Get latest supported GHC version
id: get-ghc
uses: webdevred/get-supported-ghc@v0.0.10
- name: Set up GHC latest and Cabal
id: setup-ghc
uses: haskell-actions/setup@v2.9.1
with:
ghc-version: ${{ steps.get-ghc.outputs.ghc-version }}
cabal-version: latest
cabal-update: true
- name: Log GHC and Cabal outputs
run: |
echo "GHC Version: ${{ steps.get-ghc.outputs.ghc-version }}"
echo "Cabal Store Path: ${{ steps.setup-ghc.outputs.cabal-store }}"
- name: Enable tests and benchmarks
shell: bash
run: |-
cabal configure --project-file cabal.project.ci -O1 --ghc-options="-Wwarn"
printf 'package jbeam-edit\n benchmarks: True\n ghc-options: -Wwarn'>>cabal.project.ci.local
echo "contents of cabal.project.ci.local"
cat cabal.project.ci.local
- name: Freeze and check dependencies
env:
CABAL_PROJECT: cabal.project.ci
shell: bash
run: bash ./.github/scripts/freeze_dependencies.sh
- name: Cache GHC, Cabal store, and build artifacts
uses: actions/cache@v5.0.1
with:
path: |
dist-newstyle
${{ steps.setup-ghc.outputs.cabal-store }}
key: >-
${{ runner.os }}-cabal-${{
steps.get-ghc.outputs.ghc-version
}}-${{
hashFiles('**/dist-newstyle/**/plan.json')
}}
restore-keys: |
${{ runner.os }}-cabal-${{ steps.get-ghc.outputs.ghc-version }}-
- name: Build dependencies, good to do separate for caching
run: cabal build --project-file cabal.project.ci --only-dependencies
- name: Build project (GHC latest)
run: cabal build --project-file cabal.project.ci all
- name: Run tests (GHC latest)
run: cabal test --project-file cabal.project.ci
- name: Run benchmarks (GHC ${{ steps.get-ghc.outputs.ghc-version }})
run: |-
echo "Running benchmarks for jbeam-edit"
cabal bench --project-file cabal.project.ci --benchmark-options="--verbosity=1"