Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/release_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
description: git ref
required: true

env:
GO_VERSION: 1.18.1

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -29,13 +32,14 @@ jobs:
- "linux"
arch:
- "amd64"
- "arm64"
env:
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
steps:
- name: Set up Go 1.18.1
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18.1
go-version: '${{ env.GO_VERSION }}'
id: go

- name: Check out code into the Go module directory
Expand Down Expand Up @@ -70,6 +74,8 @@ jobs:
run: |
export GOPATH=${GITHUB_WORKSPACE}/go
export PATH=$PATH:$GOPATH/bin
export TARGET_OS=${{ matrix.os }}
export TARGET_ARCH=${{ matrix.arch }}
if [ ! -z ${{ steps.check_staging.outputs.STAGING }} ]; then
export REL_VER=${{ steps.check_staging.outputs.STAGING }}+staging
else
Expand Down
4 changes: 2 additions & 2 deletions br/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ tools/bin/failpoint-ctl: tools/check/go.mod
cd tools/check && $(GO) build -o ../bin/failpoint-ctl github.com/pingcap/failpoint/failpoint-ctl

build:
CGO_ENABLED=1 $(GO) build -tags codes -gcflags "all=-N -l" -ldflags '$(LDFLAGS)' -o $(BR_BIN_PATH) cmd/br/*.go
CGO_ENABLED=0 $(GO) build -tags codes -gcflags "all=-N -l" -ldflags '$(LDFLAGS)' -o $(BR_BIN_PATH) cmd/br/*.go

release:
CGO_ENABLED=1 $(GO) build -tags codes -ldflags '$(LDFLAGS)' -o $(BR_BIN_PATH) cmd/br/*.go
CGO_ENABLED=0 GOOS=$(TARGET_OS) GOARCH=$(TARGET_ARCH) $(GO) build -tags codes -ldflags '$(LDFLAGS)' -o $(BR_BIN_PATH) cmd/br/*.go

build/rawkv-integration-test:
cd tests/rawkv && $(GO) build -mod=mod -o ../../bin/rawkv_test *.go
Expand Down
6 changes: 4 additions & 2 deletions cdc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ ifeq (${CDC_ENABLE_VENDOR}, 1)
GOVENDORFLAG := -mod=vendor
endif

GOBUILD := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG) -trimpath $(GOVENDORFLAG)
BUILD_FLAG := -buildvcs=false

GOBUILD := CGO_ENABLED=0 GOOS=$(TARGET_OS) GOARCH=$(TARGET_ARCH) $(GO) build $(BUILD_FLAG) -trimpath $(GOVENDORFLAG)
GOBUILD_DEBUG := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG) -gcflags "all=-N -l" $(GOVENDORFLAG)
GOBUILDNOVENDOR := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG) -trimpath
GOTEST := CGO_ENABLED=1 $(GO) test -p $(P) --race
Expand All @@ -43,7 +45,7 @@ FAILPOINT_DISABLE := $$(echo $(FAILPOINT_DIR) | xargs $(FAILPOINT) disable >/dev

RELEASE_VERSION =
ifeq ($(RELEASE_VERSION),)
RELEASE_VERSION := v1.0.0-master
RELEASE_VERSION := v1.0-master
release_version_regex := ^cdc-v[0-9]\..*$$
release_branch_regex := "^cdc-[0-9]\.[0-9].*$$|^HEAD$$|^.*/*tags/cdc-v[0-9]\.[0-9]\..*$$"
ifneq ($(shell git rev-parse --abbrev-ref HEAD | egrep $(release_branch_regex)),)
Expand Down