Skip to content

Commit a856e7a

Browse files
committed
Cache tool binaries in CI
1 parent f5eda87 commit a856e7a

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.github/workflows/continuous-integration.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ jobs:
2323
with:
2424
go-version: "~1.21.1"
2525

26+
- name: Cache tools
27+
uses: actions/cache@v4
28+
with:
29+
path: bin
30+
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
31+
2632
- name: "basic checks"
2733
run: make ci
2834

@@ -38,6 +44,12 @@ jobs:
3844
with:
3945
go-version: "~1.21.1"
4046

47+
- name: Cache tools
48+
uses: actions/cache@v4
49+
with:
50+
path: bin
51+
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
52+
4153
- uses: actions/cache@v4
4254
with:
4355
path: |

.github/workflows/e2e.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ jobs:
4747
with:
4848
go-version: "~1.21.3"
4949

50+
- name: Cache tools
51+
uses: actions/cache@v4
52+
with:
53+
path: bin
54+
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
55+
5056
- name: "run tests"
5157
env:
5258
KUBE_VERSION: ${{ matrix.kube-version }}

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,12 @@ rm -rf $$TMP_DIR ;\
412412
endef
413413

414414
.PHONY: kuttl
415-
kuttl:
415+
kuttl: $(LOCALBIN)
416416
@KUTTL=$(KUTTL) KUTTL_VERSION=$(KUTTL_VERSION) ./hack/install-kuttl.sh
417417

418418
OPERATOR_SDK = $(shell pwd)/bin/operator-sdk
419419
.PHONY: operator-sdk
420-
operator-sdk:
420+
operator-sdk: $(LOCALBIN)
421421
@{ \
422422
set -e ;\
423423
if (`pwd`/bin/operator-sdk version | grep ${OPERATOR_SDK_VERSION}) > /dev/null 2>&1 ; then \

0 commit comments

Comments
 (0)