Skip to content

Commit

Permalink
Create haskell.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-abrar committed Jan 29, 2024
1 parent ace70df commit 7549705
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: github-action

on: [push, pull_request]

jobs:
build:
strategy:
matrix:
ghc: ['8.6.5', '8.10.7', '9.8.1']
os: ['ubuntu-latest', 'macos-latest']
runs-on: ${{ matrix.os }}

name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
- name: Cache
uses: actions/cache@v1
env:
cache-name: cache-cabal
with:
path: ~/.cabal
key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.ghc }}-build-
${{ runner.os }}-${{ matrix.ghc }}-
${{ runner.os }}
- name: Install dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests --enable-benchmarks
- name: Build
run: cabal build --enable-tests --enable-benchmarks all
- name: Run tests
run: cabal test all

0 comments on commit 7549705

Please sign in to comment.