Skip to content

Commit 92cd21c

Browse files
committed
fix github actions
Chechout code in GOPATH Always run "make build_go" on github actions Always run "make -C lib/go" by making it a .PHONY target. It will skip up-to-date targets by itself.
1 parent bb252c1 commit 92cd21c

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

.github/workflows/build.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,3 @@ jobs:
2323
- name: Build Test
2424
run: |
2525
make
26-
make -C lib/go protoc
27-
make -C lib/go protoc-gen-go
28-
make build_go

Makefile

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ CSI_SPEC := spec.md
44
CSI_PROTO := csi.proto
55
## Build go language bindings
66
CSI_A := csi.a
7-
CSI_GO := lib/go/csi/csi.pb.go
87
CSI_PKG := lib/go/csi
98

109
# This is the target for building the temporary CSI protobuf file.
@@ -31,23 +30,15 @@ else
3130
diff "$@" "$?" > /dev/null 2>&1 || cp -f "$?" "$@"
3231
endif
3332

34-
build: check
35-
36-
# If this is not running on GitHub Actions then for sake of convenience
37-
# go ahead and update the language bindings as well.
38-
ifneq (true,$(GITHUB_ACTIONS))
39-
build: build_cpp build_go
40-
endif
41-
33+
build: check build_cpp build_go
4234

4335
build_cpp:
4436
$(MAKE) -C lib/cxx
4537

46-
# The file exists, but could be out-of-date.
47-
$(CSI_GO): $(CSI_PROTO)
48-
$(MAKE) -C lib/go csi/csi.pb.go
38+
csi_go:
39+
$(MAKE) -C lib/go
4940

50-
$(CSI_A): $(CSI_GO)
41+
$(CSI_A): csi_go
5142
go mod download
5243
go install ./$(CSI_PKG)
5344
go build -o "$@" ./$(CSI_PKG)
@@ -66,4 +57,4 @@ clobber: clean
6657
check: $(CSI_PROTO)
6758
awk '{ if (length > 72) print NR, $$0 }' $? | diff - /dev/null
6859

69-
.PHONY: clean clobber check
60+
.PHONY: clean clobber check csi_go build_go build_cpp

0 commit comments

Comments
 (0)