mirror of
https://codeberg.org/JasterV/aoc2024-haskell.git
synced 2026-04-26 18:10:05 +00:00
Create haskell.yml
This commit is contained in:
parent
796eb829c5
commit
bb662e6a4f
1 changed files with 43 additions and 0 deletions
43
.github/workflows/haskell.yml
vendored
Normal file
43
.github/workflows/haskell.yml
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
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: actions/setup-haskell@v1
|
||||||
|
with:
|
||||||
|
ghc-version: '9.6.6'
|
||||||
|
cabal-version: '3.12'
|
||||||
|
|
||||||
|
- 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 build --only-dependencies --enable-tests --enable-benchmarks
|
||||||
|
- name: Build
|
||||||
|
run: cabal build --enable-tests --enable-benchmarks all
|
||||||
|
- name: Run tests
|
||||||
|
run: cabal test all
|
||||||
Loading…
Reference in a new issue