Skip to content

Commit

Permalink
Try running the expanded matrix in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Jun 14, 2024
1 parent 04fa8fb commit 3f3464a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 12 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ jobs:
- "9.4.8"
- "9.6.5"
- "9.8.2"
# k8s_release:
# # Choose a subset of these to ease the load on CI
# - "1.25"
# - "1.26"
# - "1.27"
# - "1.28"
# - "1.29"
# - "1.30"
steps:
- uses: actions/checkout@v4
- uses: haskell/actions/setup@v2
Expand Down Expand Up @@ -44,6 +52,14 @@ jobs:
yaml: "stack-9.6.5.yaml"
- ghc: "9.8.2"
yaml: "stack.yaml"
k8s_release:
# Choose a subset of these to ease the load on CI
- "1.25"
- "1.26"
- "1.27"
- "1.28"
- "1.29"
- "1.30"
steps:
- uses: actions/checkout@v4

Expand All @@ -61,6 +77,8 @@ jobs:

- name: Build
run: |
nix run .#set-stack-version -- "${matrix.k8s_release}" "${{matrix.yaml}}"
stack build --stack-yaml ${{matrix.yaml}} --system-ghc --test --bench --no-run-tests --no-run-benchmarks
- name: Test
Expand Down
22 changes: 11 additions & 11 deletions build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ cd "$SCRIPTDIR"
# This script builds kubernetes-client + kubernetes-client-core for
# all Kubernetes versions.

nix run .#set-stack-version 1.20 && stack build
nix run .#set-stack-version 1.21 && stack build
nix run .#set-stack-version 1.22 && stack build
nix run .#set-stack-version 1.23 && stack build
nix run .#set-stack-version 1.24 && stack build
nix run .#set-stack-version 1.25 && stack build
nix run .#set-stack-version 1.26 && stack build
nix run .#set-stack-version 1.27 && stack build
nix run .#set-stack-version 1.28 && stack build
nix run .#set-stack-version 1.29 && stack build
nix run .#set-stack-version 1.30 && stack build
nix run .#set-stack-version 1.20 stack.yaml && stack build
nix run .#set-stack-version 1.21 stack.yaml && stack build
nix run .#set-stack-version 1.22 stack.yaml && stack build
nix run .#set-stack-version 1.23 stack.yaml && stack build
nix run .#set-stack-version 1.24 stack.yaml && stack build
nix run .#set-stack-version 1.25 stack.yaml && stack build
nix run .#set-stack-version 1.26 stack.yaml && stack build
nix run .#set-stack-version 1.27 stack.yaml && stack build
nix run .#set-stack-version 1.28 stack.yaml && stack build
nix run .#set-stack-version 1.29 stack.yaml && stack build
nix run .#set-stack-version 1.30 stack.yaml && stack build
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@

set-stack-version = pkgs.writeShellScriptBin "build-kubernetes-client.sh" ''
export KUBERNETES_VERSION="$1"
STACK_YAML="$2"
${pkgs.gnused}/bin/sed -i "s/^- kubernetes-\(1\.\)[0-9]\+/- kubernetes-$KUBERNETES_VERSION/" stack.yaml
${pkgs.gnused}/bin/sed -i "s/^- kubernetes-\(1\.\)[0-9]\+/- kubernetes-$KUBERNETES_VERSION/" "$STACK_YAML"
'';
};
});
Expand Down

0 comments on commit 3f3464a

Please sign in to comment.