Skip to content

Bump actions/upload-artifact from 4.1.0 to 4.2.0 (#82) #146

Bump actions/upload-artifact from 4.1.0 to 4.2.0 (#82)

Bump actions/upload-artifact from 4.1.0 to 4.2.0 (#82) #146

name: Haskell Cabal
on:
push:
branches: [master]
pull_request:
branches: [master]
types: [opened, synchronize]
permissions: {}
jobs:
test:
name: CI
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # don't cancel other jobs if one fails
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ghc: [8.10.7, 9.0.2, 9.2.8, 9.4.7, 9.6.3, 9.8.1]
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false
- name: Setup Haskell Compiler (cabal)
id: setup-haskell
uses: haskell-actions/setup@b1dc5f1786a382e9a2532d039e8c53cf56f21392 # v2.6.1
with:
ghc-version: ${{ matrix.ghc }}
- name: Cache dist-newstyle
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
with:
path: dist-newstyle
key: dist-newstyle-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('src*') }}
restore-keys: |
dist-newstyle-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal') }}-
dist-newstyle-${{ matrix.os }}-${{ matrix.ghc }}-
- name: Cache ~/.cabal/store
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: cabal-store-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal') }}
restore-keys: cabal-store-${{ matrix.os }}-${{ matrix.ghc }}-
- name: Configure to run tests and benchmarks
run: cabal configure --enable-tests --enable-benchmarks
- name: Build code
run: cabal build
- name: Test code
run: cabal test
- name: Benchmark code
run: cabal bench
- name: Generate documentation
run: cabal haddock all