Skip to content

Commit d5eef61

Browse files
committed
ci: more work
1 parent ec3ee16 commit d5eef61

File tree

3 files changed

+41
-24
lines changed

3 files changed

+41
-24
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,47 @@ jobs:
88
fail-fast: false
99
matrix:
1010
ghc:
11-
- "8.10.7"
12-
- "9.0.2"
13-
- "9.2.8"
11+
# - "8.10.7"
12+
# - "9.0.2"
13+
# - "9.2.8"
1414
- "9.4.8"
1515
- "9.6.5"
1616
- "9.8.2"
17-
# k8s_release:
18-
# # Choose a subset of these to ease the load on CI
19-
# - "1.25"
20-
# - "1.26"
21-
# - "1.27"
22-
# - "1.28"
23-
# - "1.29"
24-
# - "1.30"
17+
k8s_release:
18+
# Choose a subset of these to ease the load on CI
19+
# - "1.20"
20+
# - "1.21"
21+
# - "1.22"
22+
# - "1.23"
23+
# - "1.24"
24+
- "1.25"
25+
- "1.26"
26+
- "1.27"
27+
- "1.28"
28+
- "1.29"
29+
- "1.30"
2530
steps:
2631
- uses: actions/checkout@v4
2732
- uses: haskell-actions/setup@v2
2833
with:
2934
ghc-version: ${{ matrix.compiler.ghc }}
3035
cabal-version: '3.8.1.0'
31-
- run: cabal build all --enable-tests
32-
- run: cabal test all
36+
- run: |
37+
nix run .#set-cabal-version -- "${{matrix.k8s_release}}" cabal.project
38+
cabal build all --enable-tests
39+
- run: |
40+
cabal test all
3341
3442
stack:
3543
name: Stack / Kubernetes ${{ matrix.k8s_release }} / GHC ${{ matrix.compiler.ghc }}
3644
runs-on: ubuntu-latest
3745
strategy:
3846
fail-fast: false
47+
# This full matrix at time of writing is 11 K8S versions * 7 compiler versions = 77,
48+
# which is a little big for CI.
49+
# Commented some older versions of each to make it manageable.
3950
matrix:
4051
k8s_release:
41-
# Choose a subset of these to ease the load on CI
4252
# - "1.20"
4353
# - "1.21"
4454
# - "1.22"
@@ -51,14 +61,14 @@ jobs:
5161
- "1.29"
5262
- "1.30"
5363
compiler:
54-
- ghc: "8.10.7"
55-
yaml: "stack-8.10.7.yaml"
56-
- ghc: "9.0.2"
57-
yaml: "stack-9.0.2-aeson1.yaml"
58-
- ghc: "9.0.2"
59-
yaml: "stack-9.0.2-aeson2.yaml"
60-
- ghc: "9.2.8"
61-
yaml: "stack-9.2.8.yaml"
64+
# - ghc: "8.10.7"
65+
# yaml: "stack-8.10.7.yaml"
66+
# - ghc: "9.0.2"
67+
# yaml: "stack-9.0.2-aeson1.yaml"
68+
# - ghc: "9.0.2"
69+
# yaml: "stack-9.0.2-aeson2.yaml"
70+
# - ghc: "9.2.8"
71+
# yaml: "stack-9.2.8.yaml"
6272
- ghc: "9.4.8"
6373
yaml: "stack-9.4.8.yaml"
6474
- ghc: "9.6.5"

cabal.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
packages:
2-
kubernetes
2+
kubernetes-1.20
33
kubernetes-client
4-
examples
4+
examples

flake.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838
3939
${pkgs.gnused}/bin/sed -i "s/^- kubernetes-\(1\.\)[0-9]\+/- kubernetes-$KUBERNETES_VERSION/" "$STACK_YAML"
4040
'';
41+
42+
set-cabal-version = pkgs.writeShellScriptBin "build-kubernetes-client.sh" ''
43+
export KUBERNETES_VERSION="$1"
44+
CABAL_PROJECT="$2"
45+
46+
${pkgs.gnused}/bin/sed -i "s/^ kubernetes-\(1\.\)[0-9]\+/- kubernetes-$KUBERNETES_VERSION/" "$CABAL_PROJECT"
47+
'';
4148
};
4249
});
4350
}

0 commit comments

Comments
 (0)