Skip to content

Commit 787c4e1

Browse files
committed
Add github CI
1 parent be031e3 commit 787c4e1

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/haskell.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: github-action
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
matrix:
9+
ghc: ['8.6', '8.8', '8.10', '9.0', '9.2', '9.4', '9.6', '9.8', '9.10']
10+
os: ['ubuntu-latest', 'macos-13'] # https://github.com/haskell-actions/setup/issues/77
11+
runs-on: ${{ matrix.os }}
12+
13+
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: haskell-actions/setup@v2
17+
with:
18+
ghc-version: ${{ matrix.ghc }}
19+
- name: Cache
20+
uses: actions/cache@v3
21+
env:
22+
cache-name: cache-cabal
23+
with:
24+
path: ~/.cabal
25+
key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
26+
restore-keys: |
27+
${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-
28+
${{ runner.os }}-${{ matrix.ghc }}-build-
29+
${{ runner.os }}-${{ matrix.ghc }}-
30+
${{ runner.os }}
31+
32+
- name: Install dependencies
33+
run: |
34+
cabal update
35+
cd lib && cabal build --only-dependencies --enable-tests --enable-benchmarks all
36+
- name: Build obelisk libraries
37+
run: cd lib && cabal build --enable-tests --enable-benchmarks all
38+
- name: Run tests
39+
run: cd lib && cabal test all

0 commit comments

Comments
 (0)