Skip to content

Commit

Permalink
Create haskell.yml for Github Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tonicebrian authored Nov 14, 2024
1 parent 1e9ded9 commit 65a2026
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Haskell CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build-haskell:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ["9.6"]

name: Haskell GHC ${{ matrix.ghc }} build
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
stack-version: 'latest'

- name: Cache
uses: actions/cache@v1
env:
cache-name: cache-cabal
with:
path: ~/.cabal
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/stack-*.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: |
stack build --stack-yaml stack-${{ matrix.ghx}}.yaml --only-dependencies
- name: Build
run: stack build --stack-yaml stack-${{ matrix.ghx}}.yaml
- name: Run tests
run: stack test --stack-yaml stack-${{ matrix.ghx}}.yaml

0 comments on commit 65a2026

Please sign in to comment.