-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI bump to GHC 9.8 and latest majors; use build plan as cache key
- Loading branch information
1 parent
47a4746
commit bdc4673
Showing
3 changed files
with
33 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,59 @@ | ||
name: CI | ||
on: | ||
- push | ||
- pull_request | ||
jobs: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
cabal: | ||
name: ${{ matrix.os }} - GHC ${{ matrix.ghc }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
ghc: | ||
- 9.2.7 | ||
- 9.4.4 | ||
- 9.6.1 | ||
- 9.8 | ||
- 9.6 | ||
- 9.4 | ||
- 9.2 | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: haskell/actions/setup@v2 | ||
id: setup-haskell-cabal | ||
name: Setup Haskell | ||
- name: Setup Haskell | ||
uses: haskell-actions/setup@v2 | ||
id: setup | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
|
||
- name: Configure | ||
run: | | ||
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct | ||
cabal build all --dry-run | ||
- name: Restore cache | ||
uses: actions/cache/restore@v3 | ||
id: cache | ||
with: | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }} | ||
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- | ||
path: ${{ steps.setup.outputs.cabal-store }} | ||
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-plan-${{ hashfiles('dist-newstyle/cache/plan.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}- | ||
- name: Build | ||
run: | | ||
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct | ||
cabal build all | ||
- name: Build dependencies | ||
run: cabal build all --dependencies-only | ||
|
||
- name: Test | ||
run: | | ||
cabal test all | ||
- run: cabal build all | ||
- run: cabal test all | ||
- run: cabal haddock | ||
- run: cabal check | ||
- run: cabal sdist | ||
|
||
- name: Save cache | ||
uses: actions/cache/save@v3 | ||
if: always() | ||
if: always() | ||
with: | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }} | ||
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} | ||
key: ${{ steps.cache.outputs.cache-primary-key }} | ||
path: ${{ steps.setup.outputs.cabal-store }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.