Skip to content

Commit

Permalink
break CI into three stages: build, test, and haddock.
Browse files Browse the repository at this point in the history
  • Loading branch information
julialongtin committed Jan 28, 2024
1 parent 77b3227 commit c129748
Showing 1 changed file with 86 additions and 3 deletions.
89 changes: 86 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
name: Haskell CI
on:
- push

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -26,6 +30,10 @@ jobs:
run: cabal build all --enable-tests --enable-benchmarks --only-dependencies
- name: build all
run: cabal build all --enable-tests --enable-benchmarks
- uses: "actions/cache@v2"
with:
key: "${{ runner.os }}-${{ matrix.ghc }}-build-cabal-${{ hashFiles('cabal.project.freeze') }}"
path: "${{ steps.setup-haskell-cabal.outputs.cabal-store }} dist-newstyle"
- name: test all
run: cabal test test-hslice --enable-tests
- name: haddock all
Expand All @@ -39,6 +47,81 @@ jobs:
- '9.2.8'
- '9.0.2'
- '8.10.7'
name: Haskell CI
on:
- push
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v3"
- id: setup-haskell-cabal
uses: "haskell-actions/setup@v2"
with:
cabal-version: "${{ matrix.cabal }}"
enable-stack: false
ghc-version: "${{ matrix.ghc }}"
- name: Update Hackage repository
run: cabal update
- name: cabal.project.local.ci
run: |
if [ -e cabal.project.local.ci ]; then
cp cabal.project.local.ci cabal.project.local
fi
- name: freeze
run: cabal freeze
- name: Install dependencies
run: cabal build all --enable-tests --enable-benchmarks --only-dependencies
- name: build all
run: cabal build all --enable-tests --enable-benchmarks
- uses: "actions/cache@v2"
with:
key: "${{ runner.os }}-${{ matrix.ghc }}-build-cabal-${{ hashFiles('cabal.project.freeze') }}"
path: "${{ steps.setup-haskell-cabal.outputs.cabal-store }} dist-newstyle"
- name: test all
run: cabal test test-hslice --enable-tests
strategy:
matrix:
cabal:
- '3.10'
ghc:
- '9.4.6'
- '9.2.8'
- '9.0.2'
- '8.10.7'
haddock:
needs: build
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v3"
- id: setup-haskell-cabal
uses: "haskell-actions/setup@v2"
with:
cabal-version: "${{ matrix.cabal }}"
enable-stack: false
ghc-version: "${{ matrix.ghc }}"
- name: Update Hackage repository
run: cabal update
- name: cabal.project.local.ci
run: |
if [ -e cabal.project.local.ci ]; then
cp cabal.project.local.ci cabal.project.local
fi
- name: freeze
run: cabal freeze
- name: Install dependencies
run: cabal build all --enable-tests --enable-benchmarks --only-dependencies
- name: build all
run: cabal build all --enable-tests --enable-benchmarks
- uses: "actions/cache@v2"
with:
key: "${{ runner.os }}-${{ matrix.ghc }}-build-cabal-${{ hashFiles('cabal.project.freeze') }}"
path: "${{ steps.setup-haskell-cabal.outputs.cabal-store }} dist-newstyle"
- name: haddock all
run: cabal haddock all
strategy:
matrix:
cabal:
- '3.10'
ghc:
- '9.4.6'
- '9.2.8'
- '9.0.2'
- '8.10.7'

0 comments on commit c129748

Please sign in to comment.