File tree 4 files changed +42
-4
lines changed
4 files changed +42
-4
lines changed Original file line number Diff line number Diff line change 23
23
with :
24
24
go-version : " ~1.21.1"
25
25
26
+ - name : Cache tools
27
+ uses : actions/cache@v4
28
+ with :
29
+ path : bin
30
+ key : ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
31
+
32
+ - name : Install tools
33
+ run : make install-tools
34
+
26
35
- name : " basic checks"
27
36
run : make ci
28
37
38
47
with :
39
48
go-version : " ~1.21.1"
40
49
50
+ - name : Install tools
51
+ run : make install-tools
52
+
53
+ - name : Cache tools
54
+ uses : actions/cache@v4
55
+ with :
56
+ path : bin
57
+ key : ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
58
+
41
59
- uses : actions/cache@v4
42
60
with :
43
61
path : |
Original file line number Diff line number Diff line change 47
47
with :
48
48
go-version : " ~1.21.3"
49
49
50
+ - name : Cache tools
51
+ uses : actions/cache@v4
52
+ with :
53
+ path : bin
54
+ key : ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
55
+
56
+ - name : Install tools
57
+ run : make install-tools
58
+
50
59
- name : " run tests"
51
60
env :
52
61
KUBE_VERSION : ${{ matrix.kube-version }}
Original file line number Diff line number Diff line change 30
30
- name : Check out code into the Go module directory
31
31
uses : actions/checkout@v4
32
32
33
+ - name : Cache tools
34
+ uses : actions/cache@v4
35
+ with :
36
+ path : bin
37
+ key : ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
38
+
39
+ - name : Install tools
40
+ run : make install-tools
41
+
33
42
- name : " start kind"
34
43
env :
35
44
KUBE_VERSION : ${{ matrix.kube-version }}
Original file line number Diff line number Diff line change @@ -368,6 +368,8 @@ GOLANGCI_LINT_VERSION ?= v1.54.0
368
368
KIND_VERSION ?= v0.20.0
369
369
KUTTL_VERSION ?= 0.15.0
370
370
371
+ .PHONY : install-tools
372
+ install-tools : kustomize golangci-lint kind controller-gen envtest crdoc kuttl kind operator-sdk
371
373
372
374
.PHONY : kustomize
373
375
kustomize : # # Download kustomize locally if necessary.
@@ -384,12 +386,12 @@ kind: ## Download kind locally if necessary.
384
386
.PHONY : controller-gen
385
387
controller-gen : $(CONTROLLER_GEN ) # # Download controller-gen locally if necessary.
386
388
$(CONTROLLER_GEN ) : $(LOCALBIN )
387
- test -s $(LOCALBIN ) /controller-gen && $(LOCALBIN ) /controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION ) || GOBIN=$(LOCALBIN ) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION )
389
+ @ test -s $(LOCALBIN ) /controller-gen && $(LOCALBIN ) /controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION ) || GOBIN=$(LOCALBIN ) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION )
388
390
389
391
.PHONY : envtest
390
392
envtest : $(ENVTEST ) # # Download envtest-setup locally if necessary.
391
393
$(ENVTEST ) : $(LOCALBIN )
392
- test -s $(LOCALBIN ) /setup-envtest || GOBIN=$(LOCALBIN ) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
394
+ @ test -s $(LOCALBIN ) /setup-envtest || GOBIN=$(LOCALBIN ) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
393
395
394
396
CRDOC = $(shell pwd) /bin/crdoc
395
397
.PHONY : crdoc
@@ -412,12 +414,12 @@ rm -rf $$TMP_DIR ;\
412
414
endef
413
415
414
416
.PHONY : kuttl
415
- kuttl :
417
+ kuttl : $( LOCALBIN )
416
418
@KUTTL=$(KUTTL ) KUTTL_VERSION=$(KUTTL_VERSION ) ./hack/install-kuttl.sh
417
419
418
420
OPERATOR_SDK = $(shell pwd) /bin/operator-sdk
419
421
.PHONY : operator-sdk
420
- operator-sdk :
422
+ operator-sdk : $( LOCALBIN )
421
423
@{ \
422
424
set -e ; \
423
425
if (` pwd` /bin/operator-sdk version | grep ${OPERATOR_SDK_VERSION} ) > /dev/null 2>&1 ; then \
You can’t perform that action at this time.
0 commit comments