mirror of
https://github.com/CrystalSplitter/ghcitui.git
synced 2024-09-11 10:55:29 +03:00
Add basic github haskell CI
This commit is contained in:
parent
a2ab4f60bb
commit
febffee6fd
57
.github/workflows/haskell.yaml
vendored
Normal file
57
.github/workflows/haskell.yaml
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
name: Haskell CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: haskell-actions/setup@v2
|
||||
with:
|
||||
ghc-version: 9.4.7
|
||||
cabal-version: latest
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: cache-cabal
|
||||
with:
|
||||
path: ~/.cabal
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cabal update
|
||||
cabal \
|
||||
--only-dependencies \
|
||||
--enable-tests \
|
||||
--enable-benchmarks \
|
||||
--enable-optimization=1 \
|
||||
build
|
||||
- name: Build
|
||||
run: |
|
||||
cabal build \
|
||||
--enable-tests \
|
||||
--enable-benchmarks \
|
||||
--enable-optimization=1 \
|
||||
all
|
||||
- name: Run tests
|
||||
run: |
|
||||
cabal test \
|
||||
--enable-optimization=1 \
|
||||
all
|
||||
|
Loading…
Reference in New Issue
Block a user