File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 1414 description : git ref
1515 required : true
1616
17+ env :
18+ GO_VERSION : 1.18.1
19+
1720jobs :
1821 release :
1922 runs-on : ubuntu-latest
@@ -29,13 +32,14 @@ jobs:
2932 - " linux"
3033 arch :
3134 - " amd64"
35+ - " arm64"
3236 env :
3337 working-directory : ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
3438 steps :
35- - name : Set up Go 1.18.1
39+ - name : Set up Go
3640 uses : actions/setup-go@v2
3741 with :
38- go-version : 1.18.1
42+ go-version : ' ${{ env.GO_VERSION }} '
3943 id : go
4044
4145 - name : Check out code into the Go module directory
7074 run : |
7175 export GOPATH=${GITHUB_WORKSPACE}/go
7276 export PATH=$PATH:$GOPATH/bin
77+ export TARGET_OS=${{ matrix.os }}
78+ export TARGET_ARCH=${{ matrix.arch }}
7379 if [ ! -z ${{ steps.check_staging.outputs.STAGING }} ]; then
7480 export REL_VER=${{ steps.check_staging.outputs.STAGING }}+staging
7581 else
Original file line number Diff line number Diff line change @@ -85,10 +85,10 @@ tools/bin/failpoint-ctl: tools/check/go.mod
8585 cd tools/check && $(GO ) build -o ../bin/failpoint-ctl github.com/pingcap/failpoint/failpoint-ctl
8686
8787build :
88- CGO_ENABLED=1 $(GO ) build -tags codes -gcflags " all=-N -l" -ldflags ' $(LDFLAGS)' -o $(BR_BIN_PATH ) cmd/br/* .go
88+ CGO_ENABLED=0 $(GO ) build -tags codes -gcflags " all=-N -l" -ldflags ' $(LDFLAGS)' -o $(BR_BIN_PATH ) cmd/br/* .go
8989
9090release :
91- CGO_ENABLED=1 $(GO ) build -tags codes -ldflags ' $(LDFLAGS)' -o $(BR_BIN_PATH ) cmd/br/* .go
91+ CGO_ENABLED=0 GOOS= $( TARGET_OS ) GOARCH= $( TARGET_ARCH ) $(GO ) build -tags codes -ldflags ' $(LDFLAGS)' -o $(BR_BIN_PATH ) cmd/br/* .go
9292
9393build/rawkv-integration-test :
9494 cd tests/rawkv && $(GO ) build -mod=mod -o ../../bin/rawkv_test * .go
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ ifeq (${CDC_ENABLE_VENDOR}, 1)
1919GOVENDORFLAG := -mod=vendor
2020endif
2121
22- GOBUILD := CGO_ENABLED=0 $(GO ) build $(BUILD_FLAG ) -trimpath $(GOVENDORFLAG )
22+ BUILD_FLAG := -buildvcs=false
23+
24+ GOBUILD := CGO_ENABLED=0 GOOS=$(TARGET_OS ) GOARCH=$(TARGET_ARCH ) $(GO ) build $(BUILD_FLAG ) -trimpath $(GOVENDORFLAG )
2325GOBUILD_DEBUG := CGO_ENABLED=0 $(GO ) build $(BUILD_FLAG ) -gcflags "all=-N -l" $(GOVENDORFLAG )
2426GOBUILDNOVENDOR := CGO_ENABLED=0 $(GO ) build $(BUILD_FLAG ) -trimpath
2527GOTEST := CGO_ENABLED=1 $(GO ) test -p $(P ) --race
@@ -43,7 +45,7 @@ FAILPOINT_DISABLE := $$(echo $(FAILPOINT_DIR) | xargs $(FAILPOINT) disable >/dev
4345
4446RELEASE_VERSION =
4547ifeq ($(RELEASE_VERSION ) ,)
46- RELEASE_VERSION := v1.0.0 -master
48+ RELEASE_VERSION := v1.0-master
4749 release_version_regex := ^cdc-v[0-9]\..*$$
4850 release_branch_regex := "^cdc-[0-9]\.[0-9].*$$|^HEAD$$|^.*/*tags/cdc-v[0-9]\.[0-9]\..*$$"
4951 ifneq ($(shell git rev-parse --abbrev-ref HEAD | egrep $(release_branch_regex)),)
You can’t perform that action at this time.
0 commit comments