diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2e20a235c..a08009100 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,31 +31,31 @@ jobs: echo "${TARGET}" case "${TARGET}" in linux-amd64) - GOARCH=amd64 PASSES='build' ./scripts/test.sh + GOOS=linux GOARCH=amd64 make build ;; linux-386) - GOARCH=386 PASSES='build' ./scripts/test.sh + GOOS=linux GOARCH=386 make build ;; darwin-amd64) - GOARCH=amd64 GOOS=darwin GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh + GOOS=darwin GOARCH=amd64 make build ;; darwin-arm64) - GOARCH=arm64 GOOS=darwin GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh + GOOS=darwin GOARCH=arm64 make build ;; windows-amd64) - GOARCH=amd64 GOOS=windows GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh + GOOS=windows GOARCH=amd64 make build ;; linux-arm) - GOARCH=arm GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh + GOOS=linux GOARCH=arm make build ;; linux-arm64) - GOARCH=arm64 GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh + GOOS=linux GOARCH=arm64 make build ;; linux-ppc64le) - GOARCH=ppc64le GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh + GOOS=linux GOARCH=ppc64le make build ;; linux-s390x) - GOARCH=s390x GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh + GOOS=linux GOARCH=s390x make build ;; *) echo "Failed to find target" diff --git a/.github/workflows/e2e-arm64.yaml b/.github/workflows/e2e-arm64.yaml index 99a744fde..0076385b3 100644 --- a/.github/workflows/e2e-arm64.yaml +++ b/.github/workflows/e2e-arm64.yaml @@ -28,7 +28,7 @@ jobs: echo "${TARGET}" case "${TARGET}" in linux-arm64-e2e) - PASSES='build release e2e' CPU='4' EXPECT_DEBUG='true' COVER='false' RACE='true' ./scripts/test.sh + GOOS=linux GOARCH=arm64 CPU=4 EXPECT_DEBUG=true RACE=true make test-e2e-release ;; *) echo "Failed to find target" diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index b3414f989..9e9d645c5 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -24,10 +24,10 @@ jobs: echo "${TARGET}" case "${TARGET}" in linux-amd64-e2e) - PASSES='build release e2e' CPU='4' EXPECT_DEBUG='true' COVER='false' RACE='true' ./scripts/test.sh + GOOS=linux GOARCH=amd64 CPU=4 EXPECT_DEBUG=true RACE=true make test-e2e-release ;; linux-386-e2e) - GOARCH=386 PASSES='build e2e' CPU='4' EXPECT_DEBUG='true' COVER='false' RACE='true' ./scripts/test.sh + GOOS=linux GOARCH=386 CPU=4 EXPECT_DEBUG=true RACE=true make test-e2e ;; *) echo "Failed to find target" diff --git a/.github/workflows/grpcproxy.yaml b/.github/workflows/grpcproxy.yaml index 9a26783c5..aedbdbb1c 100644 --- a/.github/workflows/grpcproxy.yaml +++ b/.github/workflows/grpcproxy.yaml @@ -24,10 +24,10 @@ jobs: echo "${TARGET}" case "${TARGET}" in linux-amd64-grpcproxy-integration) - PASSES='build grpcproxy_integration' CPU='4' COVER='false' RACE='true' ./scripts/test.sh + GOOS=linux GOARCH=amd64 CPU=4 RACE=true make test-grpcproxy-integration ;; linux-amd64-grpcproxy-e2e) - PASSES='build grpcproxy_e2e' CPU='4' COVER='false' RACE='true' ./scripts/test.sh + GOOS=linux GOARCH=amd64 CPU=4 RACE=true make test-grpcproxy-e2e ;; *) echo "Failed to find target" diff --git a/.github/workflows/tests-arm64.yaml b/.github/workflows/tests-arm64.yaml index 4a625e4e0..8e4046454 100644 --- a/.github/workflows/tests-arm64.yaml +++ b/.github/workflows/tests-arm64.yaml @@ -31,16 +31,16 @@ jobs: export JUNIT_REPORT_DIR=$(realpath ${TARGET}) case "${TARGET}" in linux-arm64-integration-1-cpu) - GOARCH=arm64 CPU=1 PASSES='integration' RACE='false' ./scripts/test.sh + GOOS=linux GOARCH=arm64 CPU=1 make test-integration ;; linux-arm64-integration-2-cpu) - GOARCH=arm64 CPU=2 PASSES='integration' RACE='false' ./scripts/test.sh + GOOS=linux GOARCH=arm64 CPU=2 make test-integration ;; linux-arm64-integration-4-cpu) - GOARCH=arm64 CPU=4 PASSES='integration' RACE='false' ./scripts/test.sh + GOOS=linux GOARCH=arm64 CPU=4 make test-integration ;; linux-arm64-unit-4-cpu-race) - GOARCH=arm64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2 + GOOS=linux GOARCH=arm64 CPU=4 RACE=true GO_TEST_FLAGS='-p=2' make test-unit ;; *) echo "Failed to find target" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index abd41230e..bbc30a765 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -28,19 +28,19 @@ jobs: export JUNIT_REPORT_DIR=$(realpath ${TARGET}) case "${TARGET}" in linux-amd64-integration-1-cpu) - GOARCH=amd64 CPU=1 PASSES='integration' RACE='false' ./scripts/test.sh + GOOS=linux GOARCH=amd64 CPU=1 make test-integration ;; linux-amd64-integration-2-cpu) - GOARCH=amd64 CPU=2 PASSES='integration' RACE='false' ./scripts/test.sh + GOOS=linux GOARCH=amd64 CPU=2 make test-integration ;; linux-amd64-integration-4-cpu) - GOARCH=amd64 CPU=4 PASSES='integration' RACE='false' ./scripts/test.sh + GOOS=linux GOARCH=amd64 CPU=4 make test-integration ;; linux-amd64-unit-4-cpu-race) - GOARCH=amd64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2 + GOOS=linux GOARCH=amd64 CPU=4 RACE=true GO_TEST_FLAGS='-p=2' make test-unit ;; linux-386-unit-1-cpu) - GOARCH=386 PASSES='unit' RACE='false' CPU='1' ./scripts/test.sh -p=4 + GOOS=linux GOARCH=386 CPU=1 GO_TEST_FLAGS='-p=4' make test-unit ;; *) echo "Failed to find target" diff --git a/Makefile b/Makefile index cf9d51eb8..8e9611f9e 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,10 @@ .PHONY: build build: - GO_BUILD_FLAGS="${GO_BUILD_FLAGS} -v" ./scripts/build.sh - ./bin/etcd --version - ./bin/etcdctl version - ./bin/etcdutl version + GO_BUILD_FLAGS="${GO_BUILD_FLAGS} -v -mod=readonly" ./scripts/build.sh .PHONY: tools tools: - GO_BUILD_FLAGS="${GO_BUILD_FLAGS} -v" ./scripts/build_tools.sh + GO_BUILD_FLAGS="${GO_BUILD_FLAGS} -v -mod=readonly" ./scripts/build_tools.sh # Tests @@ -29,6 +26,14 @@ test-integration: test-e2e: build PASSES="e2e" ./scripts/test.sh $(GO_TEST_FLAGS) +.PHONY: test-grpcproxy-integration +test-grpcproxy-integration: + PASSES="grpcproxy_integration" ./scripts/test.sh $(GO_TEST_FLAGS) + +.PHONY: test-grpcproxy-e2e +test-grpcproxy-e2e: build + PASSES="grpcproxy_e2e" ./scripts/test.sh $(GO_TEST_FLAGS) + .PHONY: test-e2e-release test-e2e-release: build PASSES="release e2e" ./scripts/test.sh $(GO_TEST_FLAGS)