add GH action to build the project

use enable-stack, stack-no-global
This commit is contained in:
Jens Petersen 2025-02-03 17:52:08 +08:00
parent baddf10194
commit d5cc9bd923

27
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
name: Haskell GHC
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- uses: actions/cache@v4
with:
path: |
~/.stack
.stack-work
key: ${{ runner.os }}-${{ hashFiles('**/*.cabal','**/stack.yaml') }}
restore-keys: |
${{ runner.os }}-
- run: stack build