forked from jonschoning/kubernetes-client-haskell
-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (99 loc) · 2.85 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
on: [push]
name: CI
jobs:
cabal:
name: Cabal / K8S ${{ matrix.k8s_release }} / GHC ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
# This full matrix at time of writing is 11 K8S versions * 6 compiler versions = 66,
# which is a little big for CI.
# Commented some older versions of each to make it manageable.
matrix:
k8s_release:
# - "1.20"
# - "1.21"
# - "1.22"
# - "1.23"
# - "1.24"
- "1.25"
- "1.26"
- "1.27"
- "1.28"
- "1.29"
- "1.30"
ghc:
# - "8.10.7"
# - "9.0.2"
# - "9.2.8"
- "9.4.8"
- "9.6.5"
- "9.8.2"
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.compiler.ghc }}
cabal-version: '3.10.3.0'
- uses: cachix/install-nix-action@v27
- run: |
nix run .#set-cabal-version -- "${{matrix.k8s_release}}" cabal.project
cabal build all --enable-tests
- run: |
cabal test all
stack:
name: Stack / K8S ${{ matrix.k8s_release }} / GHC ${{ matrix.compiler.ghc }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
# This full matrix at time of writing is 11 K8S versions * 7 compiler versions = 77,
# which is a little big for CI.
# Commented some older versions of each to make it manageable.
matrix:
k8s_release:
# - "1.20"
# - "1.21"
# - "1.22"
# - "1.23"
# - "1.24"
- "1.25"
- "1.26"
- "1.27"
- "1.28"
- "1.29"
- "1.30"
compiler:
# - ghc: "8.10.7"
# yaml: "stack-8.10.7.yaml"
# - ghc: "9.0.2"
# yaml: "stack-9.0.2-aeson1.yaml"
# - ghc: "9.0.2"
# yaml: "stack-9.0.2-aeson2.yaml"
# - ghc: "9.2.8"
# yaml: "stack-9.2.8.yaml"
- ghc: "9.4.8"
yaml: "stack-9.4.8.yaml"
- ghc: "9.6.5"
yaml: "stack-9.6.5.yaml"
- ghc: "9.8.2"
yaml: "stack.yaml"
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.compiler.ghc }}
enable-stack: true
stack-version: "latest"
- uses: cachix/install-nix-action@v27
- uses: actions/cache@v4
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.compiler.ghc }}-${{ matrix.compiler.yaml }}
- name: Build
run: |
nix run .#set-stack-version -- "${{matrix.k8s_release}}" "${{matrix.compiler.yaml}}"
stack build --stack-yaml ${{matrix.compiler.yaml}} --system-ghc --test --bench --no-run-tests --no-run-benchmarks
- name: Test
run: |
stack test --stack-yaml ${{matrix.compiler.yaml}} --system-ghc