Bump CI to GHC 9.12.1 #11
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
name: Cabal | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- '.github/workflows/cabal-mac-win.yml' | |
- 'tasty-silver.cabal' | |
- 'Setup.hs' | |
- 'Test/**.hs' | |
- 'tests/**' | |
pull_request: | |
paths: | |
- '.github/workflows/cabal-mac-win.yml' | |
- 'tasty-silver.cabal' | |
- 'Setup.hs' | |
- 'Test/**.hs' | |
- 'tests/**' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
name: Cabal ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: { os: [macos-latest, ubuntu-latest, windows-latest] } | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: haskell-actions/setup@v2 | |
id: setup-haskell | |
with: | |
ghc-version: latest | |
cabal-version: latest | |
cabal-update: true | |
- name: Configure the build plan | |
run: | | |
cabal configure -O1 --enable-tests | |
cabal build --dry-run | |
- name: Restore cached dependencies | |
uses: actions/cache/restore@v4 | |
id: cache | |
env: | |
key: ${{ runner.os }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }} | |
with: | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
# The file `plan.json` contains the build information. | |
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }} | |
restore-keys: ${{ env.key }}- | |
- name: Install dependencies | |
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | |
run: | | |
cabal build --only-dependencies | |
- name: Cache dependencies | |
uses: actions/cache/save@v4 | |
if: always() && steps.cache.outputs.cache-hit != 'true' | |
with: | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
key: ${{ steps.cache.outputs.cache-primary-key }} | |
- name: Build | |
run: | | |
cabal build | |
- name: Test non-interactive | |
run: | | |
cabal test --test-show-details=direct | |
- name: Test --interactive | |
run: | | |
cabal test --test-show-details=direct --test-options=--interactive | |
- name: Test --accept | |
run: | | |
cabal test --test-show-details=direct --test-options=--accept |