Skip to content

Commit 1595ce9

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

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/haskell.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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: install llvm on macos
43+
if: matrix.os == 'macos-latest'
44+
run: brew install llvm@12
45+
- name: Update
46+
run: cabal update
47+
- name: Freeze
48+
run: cabal freeze
49+
- name: Cache
50+
uses: actions/[email protected]
51+
with:
52+
path: ${{ steps.setup-haskell.outputs.cabal-store }}
53+
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
54+
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
55+
- name: Build
56+
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 ==8.10.7 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2 || ==9.10.1 || ==9.12.1
89
license: BSD3
910
license-file: LICENSE
1011
author: Daniel P. Wright

0 commit comments

Comments
 (0)