Skip to content

Commit 85454b6

Browse files
authored
Merge branch 'master' into dependabot/cargo/shlex-1.3.0
2 parents e6a8ec6 + 85a019a commit 85454b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+41490
-14780
lines changed

.github/workflows/unit-test.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [ push,pull_request ]
44

55
jobs:
66
go:
7-
name: Test go and binlog generation
7+
name: Test go generation
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Set up Go 1.x
@@ -18,8 +18,7 @@ jobs:
1818
- name: Checkout repository
1919
uses: actions/checkout@v2
2020
- name: Test
21-
run: make go binlog && git diff --exit-code
22-
21+
run: make go && git diff --exit-code
2322
cpp:
2423
name: Test cpp generation
2524
runs-on: ubuntu-latest
@@ -47,4 +46,4 @@ jobs:
4746
with:
4847
toolchain: stable
4948
- name: Test
50-
run: make rust
49+
run: make rust

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ target
44
cpp/tipb/*.h
55
cpp/tipb/*.cc
66
cpp/build/
7+
bin

Makefile

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
1-
GOGO_PROTOBUF := `go list -f "{{.Dir}}" -m github.com/gogo/protobuf`
1+
.PHONY: all go rust c++
22

3-
.PHONY: all go rust binlog c++
3+
CURDIR := $(shell pwd)
44

5-
all: go rust binlog c++
5+
export GOBIN=$(CURDIR)/bin
6+
export PATH := $(CURDIR)/bin/:$(PATH)
7+
8+
all: go rust c++
69

710
dependence:
811
go mod download
912

10-
go: dependence
11-
GOGO_PROTOBUF=${GOGO_PROTOBUF} ./generate-go.sh
13+
check: dependence
14+
./scripts/check.sh
1215

13-
rust:
14-
cargo build
16+
go: dependence check
17+
./scripts/generate-go.sh
18+
GO111MODULE=on go mod tidy
19+
GO111MODULE=on go build ./go-tipb/...
1520

16-
binlog: dependence
17-
GOGO_PROTOBUF=${GOGO_PROTOBUF} ./generate-binlog.sh
21+
rust: check
22+
cargo check && \
23+
cargo check --no-default-features --features prost-codec
1824

1925
c++: dependence
20-
./generate-cpp.sh
26+
./scripts/generate-cpp.sh
2127

2228
tipb.a:
2329
mkdir -p cpp/build && cd cpp/build && cmake -DCMAKE_BUILD_TYPE=Release .. && make tipb

cpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ foreach (F ${PROTO_DEFS})
4646
OUTPUT "${PROTO_DEF_TMP_DIR}/${FIL_WE}.proto"
4747
WORKING_DIRECTORY ${PROTO_DEF_DIR}
4848
COMMAND cp ${ABS_FIL} ${PROTO_DEF_TMP_DIR}/${FIL_WE}.proto
49-
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/../generate-cpp.sh"
49+
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/generate-cpp.sh"
5050
ARGS clean ${PROTO_DEF_TMP_DIR}/${FIL_WE}.proto
5151
DEPENDS ${ABS_FIL}
5252
COMMENT "Generating clean proto file on ${ABS_FIL}"

generate-binlog.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

generate-go.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)