Skip to content

Top-level CONTRIBUTING.md file #25

Top-level CONTRIBUTING.md file

Top-level CONTRIBUTING.md file #25

Workflow file for this run

name: Continuous integration with cabal
on:
push:
paths-ignore:
- 'website/*/**'
- 'README.md'
pull_request:
jobs:
continuous-integration:
strategy:
fail-fast: false
matrix:
ghc-version:
- "8.10.7"
- "9.0.2"
- "9.2.8"
- "9.4.5"
- "9.6.4"
- "9.8.2"
- "9.10.1"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cabal/ghc
uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc-version }}
cabal-version: '3.12.1.0'
- name: Generate freeze file
run: |
cabal update
cabal configure --enable-tests --test-show-details=direct
cabal freeze --minimize-conflict-set
# 'cabal freeze' will use the nearest index state which might not be exactly equal
# to the index state specified in 'cabal.project'
sed '/^index-state: /d' cabal.project.freeze > dependencies-versions
- name: Cache cabal work
uses: actions/cache@v4
with:
path: |
dist-newstyle
${{ steps.setup-haskell.outputs.cabal-store }}
# We are using the hash of 'cabal.project.local' so that different levels
# of optimizations are cached separately
key: ${{ runner.os }}-${{ hashFiles('dependencies-versions', 'cabal.project', 'cabal.project.local') }}-cabal-install
- name: Build dependencies only
run: cabal build all --only-dependencies
- name: Build all packages
run: cabal build all
- name: Run all tests
run: cabal test all