Skip to content

Commit

Permalink
WIP - Compile using cabal
Browse files Browse the repository at this point in the history
Still have to fix CI
  • Loading branch information
diogob committed Nov 11, 2023
1 parent 8482a00 commit d8237b6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 34 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ on:
branches: [main]

jobs:
stack:
name: stack / ${{ matrix.os }} / ghc ${{ matrix.ghc }}
build:
name: build / ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
stack: ["2.7.3"]
ghc: ["9.0.2"]
ghc: ["9.6.3"]

services:
postgres:
Expand All @@ -31,36 +30,35 @@ jobs:
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main'
- uses: actions/checkout@v4

- uses: haskell/actions/setup@v1
- uses: haskell-actions/setup@v2
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}

- uses: actions/[email protected]
name: Cache ~/.stack
name: Cache ~/dist-newstyle
with:
path: ~/.stack
key: ${{ matrix.os }}-${{ matrix.ghc }}-stack-v3
path: ~/dist-newstyle
key: ${{ matrix.os }}-${{ matrix.ghc }}-v3

- name: Build Dependencies
run: |
stack build --system-ghc --test --no-run-tests --only-dependencies
cabal build --only-dependencies
cabal install hspec-discover
- name: Build
run: |
stack build --system-ghc --test --no-run-tests
cabal build
- name: Test
run: |
stack test --system-ghc
cabal test
- name: ${{ matrix.os }} binaries
uses: actions/upload-artifact@v2
with:
name: Store binaries
path: |
.stack-work/dist/**/postgres-websockets
.stack-work/dist/**/postgres-websockets
7 changes: 0 additions & 7 deletions stack.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions stack.yaml.lock

This file was deleted.

0 comments on commit d8237b6

Please sign in to comment.