Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 2f1f700

Browse files
author
HaoyangLiu
authored
Merge pull request #131 from binance-chain/develop
[R4R] prepare release v0.32.3-binance.1
2 parents 3d4c98c + 013336b commit 2f1f700

406 files changed

Lines changed: 26951 additions & 7504 deletions

File tree

Some content is hidden

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

.circleci/config.yml

Lines changed: 106 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,12 @@ jobs:
2626
- checkout
2727
- restore_cache:
2828
keys:
29-
- v3-pkg-cache
29+
- v4-pkg-cache
3030
- run:
3131
name: tools
3232
command: |
3333
export PATH="$GOBIN:$PATH"
3434
make get_tools
35-
- run:
36-
name: dependencies
37-
command: |
38-
export PATH="$GOBIN:$PATH"
39-
make get_vendor_deps
4035
- run:
4136
name: binaries
4237
command: |
@@ -48,7 +43,7 @@ jobs:
4843
- bin
4944
- profiles
5045
- save_cache:
51-
key: v3-pkg-cache
46+
key: v4-pkg-cache
5247
paths:
5348
- /go/pkg
5449
- save_cache:
@@ -62,7 +57,7 @@ jobs:
6257
- attach_workspace:
6358
at: /tmp/workspace
6459
- restore_cache:
65-
key: v3-pkg-cache
60+
key: v4-pkg-cache
6661
- restore_cache:
6762
key: v3-tree-{{ .Environment.CIRCLE_SHA1 }}
6863
- run:
@@ -72,35 +67,13 @@ jobs:
7267
export PATH="$GOBIN:$PATH"
7368
make build-slate
7469
75-
lint:
76-
<<: *defaults
77-
steps:
78-
- attach_workspace:
79-
at: /tmp/workspace
80-
- restore_cache:
81-
key: v3-pkg-cache
82-
- restore_cache:
83-
key: v3-tree-{{ .Environment.CIRCLE_SHA1 }}
84-
- run:
85-
name: metalinter
86-
command: |
87-
set -ex
88-
export PATH="$GOBIN:$PATH"
89-
make lint
90-
- run:
91-
name: check_dep
92-
command: |
93-
set -ex
94-
export PATH="$GOBIN:$PATH"
95-
make check_dep
96-
9770
test_abci_apps:
9871
<<: *defaults
9972
steps:
10073
- attach_workspace:
10174
at: /tmp/workspace
10275
- restore_cache:
103-
key: v3-pkg-cache
76+
key: v4-pkg-cache
10477
- restore_cache:
10578
key: v3-tree-{{ .Environment.CIRCLE_SHA1 }}
10679
- run:
@@ -109,15 +82,15 @@ jobs:
10982
export PATH="$GOBIN:$PATH"
11083
bash abci/tests/test_app/test.sh
11184
112-
# if this test fails, fix it and update the docs at:
113-
# https://github.com/tendermint/tendermint/blob/develop/docs/abci-cli.md
85+
# if this test fails, fix it and update the docs at:
86+
# https://github.com/tendermint/tendermint/blob/develop/docs/abci-cli.md
11487
test_abci_cli:
11588
<<: *defaults
11689
steps:
11790
- attach_workspace:
11891
at: /tmp/workspace
11992
- restore_cache:
120-
key: v3-pkg-cache
93+
key: v4-pkg-cache
12194
- restore_cache:
12295
key: v3-tree-{{ .Environment.CIRCLE_SHA1 }}
12396
- run:
@@ -132,7 +105,7 @@ jobs:
132105
- attach_workspace:
133106
at: /tmp/workspace
134107
- restore_cache:
135-
key: v3-pkg-cache
108+
key: v4-pkg-cache
136109
- restore_cache:
137110
key: v3-tree-{{ .Environment.CIRCLE_SHA1 }}
138111
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends bsdmainutils
@@ -147,7 +120,7 @@ jobs:
147120
- attach_workspace:
148121
at: /tmp/workspace
149122
- restore_cache:
150-
key: v3-pkg-cache
123+
key: v4-pkg-cache
151124
- restore_cache:
152125
key: v3-tree-{{ .Environment.CIRCLE_SHA1 }}
153126
- run: mkdir -p /tmp/logs
@@ -157,7 +130,7 @@ jobs:
157130
for pkg in $(go list github.com/tendermint/tendermint/... | circleci tests split --split-by=timings); do
158131
id=$(basename "$pkg")
159132
160-
go test -v -timeout 5m -race -coverprofile=/tmp/workspace/profiles/$id.out -covermode=atomic "$pkg" | tee "/tmp/logs/$id-$RANDOM.log"
133+
GO111MODULE=on go test -v -timeout 5m -mod=readonly -race -coverprofile=/tmp/workspace/profiles/$id.out -covermode=atomic "$pkg" | tee "/tmp/logs/$id-$RANDOM.log"
161134
done
162135
- persist_to_workspace:
163136
root: /tmp/workspace
@@ -172,32 +145,32 @@ jobs:
172145
- attach_workspace:
173146
at: /tmp/workspace
174147
- restore_cache:
175-
key: v3-pkg-cache
148+
key: v4-pkg-cache
176149
- restore_cache:
177150
key: v3-tree-{{ .Environment.CIRCLE_SHA1 }}
178151
- run:
179152
name: Run tests
180153
command: bash test/persist/test_failure_indices.sh
181154

182155
localnet:
183-
working_directory: /home/circleci/.go_workspace/src/github.com/tendermint/tendermint
184-
machine:
185-
image: circleci/classic:latest
186-
environment:
187-
GOBIN: /home/circleci/.go_workspace/bin
188-
GOPATH: /home/circleci/.go_workspace/
189-
GOOS: linux
190-
GOARCH: amd64
191-
parallelism: 1
192-
steps:
193-
- checkout
194-
- run:
195-
name: run localnet and exit on failure
196-
command: |
197-
set -x
198-
docker run --rm -v "$PWD":/go/src/github.com/tendermint/tendermint -w /go/src/github.com/tendermint/tendermint golang make build-linux
199-
make localnet-start &
200-
./scripts/localnet-blocks-test.sh 40 5 10 localhost
156+
working_directory: /home/circleci/.go_workspace/src/github.com/tendermint/tendermint
157+
machine:
158+
image: circleci/classic:latest
159+
environment:
160+
GOBIN: /home/circleci/.go_workspace/bin
161+
GOPATH: /home/circleci/.go_workspace/
162+
GOOS: linux
163+
GOARCH: amd64
164+
parallelism: 1
165+
steps:
166+
- checkout
167+
- run:
168+
name: run localnet and exit on failure
169+
command: |
170+
set -x
171+
docker run --rm -v "$PWD":/go/src/github.com/tendermint/tendermint -w /go/src/github.com/tendermint/tendermint golang make build-linux
172+
make localnet-start &
173+
./scripts/localnet-blocks-test.sh 40 5 10 localhost
201174
202175
test_p2p:
203176
environment:
@@ -219,7 +192,7 @@ jobs:
219192
- attach_workspace:
220193
at: /tmp/workspace
221194
- restore_cache:
222-
key: v3-pkg-cache
195+
key: v4-pkg-cache
223196
- restore_cache:
224197
key: v3-tree-{{ .Environment.CIRCLE_SHA1 }}
225198
- run:
@@ -243,11 +216,11 @@ jobs:
243216
name: Trigger website build
244217
command: |
245218
curl --silent \
246-
--show-error \
247-
-X POST \
248-
--header "Content-Type: application/json" \
249-
-d "{\"branch\": \"$CIRCLE_BRANCH\"}" \
250-
"https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$WEBSITE_REPO_NAME/build?circle-token=$TENDERBOT_API_TOKEN" > response.json
219+
--show-error \
220+
-X POST \
221+
--header "Content-Type: application/json" \
222+
-d "{\"branch\": \"$CIRCLE_BRANCH\"}" \
223+
"https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$WEBSITE_REPO_NAME/build?circle-token=$TENDERBOT_API_TOKEN" > response.json
251224
252225
RESULT=`jq -r '.status' response.json`
253226
MESSAGE=`jq -r '.message' response.json`
@@ -278,15 +251,15 @@ jobs:
278251
- run:
279252
name: Build dependencies
280253
command: |
281-
make get_tools get_vendor_deps
254+
make get_tools
282255
- persist_to_workspace:
283256
root: .
284257
paths:
285258
- "release-version.source"
286259
- save_cache:
287-
key: v1-release-deps-{{ .Branch }}-{{ .Revision }}
260+
key: v2-release-deps-{{ checksum "go.sum" }}
288261
paths:
289-
- "vendor"
262+
- "/go/pkg/mod"
290263

291264
build_artifacts:
292265
<<: *defaults
@@ -295,7 +268,7 @@ jobs:
295268
- checkout
296269
- restore_cache:
297270
keys:
298-
- v1-release-deps-{{ .Branch }}-{{ .Revision }}
271+
- v2-release-deps-{{ checksum "go.sum" }}
299272
- attach_workspace:
300273
at: /tmp/workspace
301274
- run:
@@ -358,6 +331,63 @@ jobs:
358331
docker push "tendermint/tendermint"
359332
docker logout
360333
334+
reproducible_builds:
335+
<<: *defaults
336+
steps:
337+
- attach_workspace:
338+
at: /tmp/workspace
339+
- checkout
340+
- setup_remote_docker:
341+
docker_layer_caching: true
342+
- run:
343+
name: Build tendermint
344+
no_output_timeout: 20m
345+
command: |
346+
sudo apt-get install -y ruby
347+
bash -x ./scripts/gitian-build.sh all
348+
for os in darwin linux windows; do
349+
cp gitian-build-${os}/result/tendermint-${os}-res.yml .
350+
cp gitian-build-${os}/build/out/tendermint-*.tar.gz .
351+
rm -rf gitian-build-${os}/
352+
done
353+
- store_artifacts:
354+
path: /go/src/github.com/tendermint/tendermint/tendermint-darwin-res.yml
355+
- store_artifacts:
356+
path: /go/src/github.com/tendermint/tendermint/tendermint-linux-res.yml
357+
- store_artifacts:
358+
path: /go/src/github.com/tendermint/tendermint/tendermint-windows-res.yml
359+
- store_artifacts:
360+
path: /go/src/github.com/tendermint/tendermint/tendermint-*.tar.gz
361+
362+
# Test RPC implementation against the swagger documented specs
363+
contract_tests:
364+
working_directory: /home/circleci/.go_workspace/src/github.com/tendermint/tendermint
365+
machine:
366+
image: circleci/classic:latest
367+
environment:
368+
GOBIN: /home/circleci/.go_workspace/bin
369+
GOPATH: /home/circleci/.go_workspace/
370+
GOOS: linux
371+
GOARCH: amd64
372+
parallelism: 1
373+
steps:
374+
- checkout
375+
- run:
376+
name: Test RPC endpoints against swagger documentation
377+
command: |
378+
set -x
379+
export PATH=~/.local/bin:$PATH
380+
381+
# install node and dredd
382+
./scripts/get_nodejs.sh
383+
384+
# build the binaries with a proper version of Go
385+
docker run --rm -v "$PWD":/go/src/github.com/tendermint/tendermint -w /go/src/github.com/tendermint/tendermint golang make build-linux build-contract-tests-hooks
386+
387+
# This docker image works with go 1.7, we can install here the hook handler that contract-tests is going to use
388+
go get github.com/snikch/goodman/cmd/goodman
389+
make contract-tests
390+
361391
workflows:
362392
version: 2
363393
test-suite:
@@ -367,11 +397,7 @@ workflows:
367397
branches:
368398
only:
369399
- master
370-
- develop
371400
- setup_dependencies
372-
- lint:
373-
requires:
374-
- setup_dependencies
375401
- test_abci_apps:
376402
requires:
377403
- setup_dependencies
@@ -394,6 +420,16 @@ workflows:
394420
- upload_coverage:
395421
requires:
396422
- test_cover
423+
- reproducible_builds:
424+
filters:
425+
branches:
426+
only:
427+
- master
428+
- /v[0-9]+\.[0-9]+/
429+
- contract_tests:
430+
requires:
431+
- setup_dependencies
432+
397433
release:
398434
jobs:
399435
- prepare_build

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
<!-- Thanks for filing a PR! Before hitting the button, please check the following items.-->
1+
<!--
22
3+
Thanks for filing a PR! Before hitting the button, please check the following items.
4+
Please note that every non-trivial PR must reference an issue that explains the
5+
changes in the PR.
6+
7+
-->
8+
9+
* [ ] Referenced an issue explaining the need for the change
310
* [ ] Updated all relevant documentation in docs
411
* [ ] Updated all code comments where relevant
512
* [ ] Wrote tests

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ terraform.tfstate.backup
4343
terraform.tfstate.d
4444

4545
.vscode
46+
47+
profile\.out

.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,16 @@ linters:
88
- golint
99
- maligned
1010
- errcheck
11-
- staticcheck
1211
- interfacer
1312
- unconvert
1413
- goconst
1514
- unparam
1615
- nakedret
1716
- lll
1817
- gochecknoglobals
19-
- gocritic
2018
- gochecknoinits
2119
- scopelint
2220
- stylecheck
23-
2421
# linters-settings:
2522
# govet:
2623
# check-shadowing: true

0 commit comments

Comments
 (0)