From d5cc9bd9239dc9572b6b264c480c3296a09afa1c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 3 Feb 2025 17:52:08 +0800 Subject: [PATCH] add GH action to build the project use enable-stack, stack-no-global --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..201cb16 --- /dev/null +++ b/.github/workflows/build.yml @@ -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