Skip to content

Commit b2067f3

Browse files
committed
[feat] add initial ci
- add tested-with stanze - add get-tested cabal build
1 parent d7a6762 commit b2067f3

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.github/workflows/haskell.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: haskell ci
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
generate-matrix:
13+
name: "Generate matrix from cabal"
14+
outputs:
15+
matrix: ${{ steps.set-matrix.outputs.matrix }}
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Extract the tested GHC versions
19+
id: set-matrix
20+
uses: kleidukos/[email protected]
21+
with:
22+
cabal-file: HaskellNet-SSL.cabal
23+
ubuntu-version: "latest"
24+
macos-version: "latest"
25+
windows-version: "latest"
26+
version: 0.1.7.0
27+
tests:
28+
name: ${{ matrix.ghc }} on ${{ matrix.os }}
29+
needs: generate-matrix
30+
runs-on: ${{ matrix.os }}
31+
strategy:
32+
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
33+
steps:
34+
- name: Checkout repo
35+
uses: actions/checkout@v4
36+
- name: Set up Haskell
37+
id: setup-haskell
38+
uses: haskell-actions/setup@v2
39+
with:
40+
ghc-version: ${{ matrix.ghc }}
41+
cabal-version: 'latest'
42+
- name: Update
43+
run: cabal update
44+
- name: Freeze
45+
run: cabal freeze
46+
- name: Cache
47+
uses: actions/[email protected]
48+
with:
49+
path: ${{ steps.setup-haskell.outputs.cabal-store }}
50+
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
51+
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
52+
- name: Build
53+
run: cabal build

HaskellNet-SSL.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: This package ties together the HaskellNet and connection
55
packages to make it easy to open IMAP and SMTP connections
66
over SSL.
77
homepage: https://github.com/dpwright/HaskellNet-SSL
8+
tested-with: GHC ==9.4.8 || ==9.6.5 || ==9.8.2
89
license: BSD3
910
license-file: LICENSE
1011
author: Daniel P. Wright

0 commit comments

Comments
 (0)