You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

463 lines
14 KiB

[RPC] Static swagger (#3880) * manually swagging Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * three definitions with polymorphism Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * added blockchain and block Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * low quality generation, commit, block_response and validators Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * genesis and consensus states endpoints Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * fix indentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * consensus parameters Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * fix indentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add height to consensus parameters endpoint Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * unconfirmed_txs and num_unconfirmed_txs Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add missing query parameter Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add ABCI queries Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * added index document for swagger documentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add missing routes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * contract tests added on CCI Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * contract tests job should be in the test suite Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * simplify requirements to test Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * typo Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * build is a prerequisite to start localnet Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * reduce nodejs size, move goodman to get_tools, add docs, fix comments Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Update scripts/get_tools.sh That's cleaner, thanks! Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * xz not supported by cci image, let's keep it simple Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * REMOVE-indirect debug of CCI paths Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment, volume is empty but binary has been produced Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment, volume is empty but binary has been produced Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment going on Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * locally works, CCI have difficulties with second layaer containers volumes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * restore experiment, use machine instead of docker for contract tests Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * simplify a bit Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * rollback on machine golang Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Document the changes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Changelog Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * comments Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
5 years ago
[RPC] Static swagger (#3880) * manually swagging Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * three definitions with polymorphism Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * added blockchain and block Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * low quality generation, commit, block_response and validators Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * genesis and consensus states endpoints Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * fix indentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * consensus parameters Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * fix indentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add height to consensus parameters endpoint Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * unconfirmed_txs and num_unconfirmed_txs Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add missing query parameter Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add ABCI queries Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * added index document for swagger documentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add missing routes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * contract tests added on CCI Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * contract tests job should be in the test suite Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * simplify requirements to test Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * typo Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * build is a prerequisite to start localnet Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * reduce nodejs size, move goodman to get_tools, add docs, fix comments Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Update scripts/get_tools.sh That's cleaner, thanks! Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * xz not supported by cci image, let's keep it simple Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * REMOVE-indirect debug of CCI paths Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment, volume is empty but binary has been produced Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment, volume is empty but binary has been produced Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment going on Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * locally works, CCI have difficulties with second layaer containers volumes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * restore experiment, use machine instead of docker for contract tests Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * simplify a bit Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * rollback on machine golang Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Document the changes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Changelog Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * comments Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
5 years ago
[RPC] Static swagger (#3880) * manually swagging Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * three definitions with polymorphism Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * added blockchain and block Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * low quality generation, commit, block_response and validators Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * genesis and consensus states endpoints Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * fix indentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * consensus parameters Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * fix indentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add height to consensus parameters endpoint Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * unconfirmed_txs and num_unconfirmed_txs Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add missing query parameter Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add ABCI queries Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * added index document for swagger documentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add missing routes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * contract tests added on CCI Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * contract tests job should be in the test suite Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * simplify requirements to test Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * typo Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * build is a prerequisite to start localnet Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * reduce nodejs size, move goodman to get_tools, add docs, fix comments Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Update scripts/get_tools.sh That's cleaner, thanks! Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * xz not supported by cci image, let's keep it simple Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * REMOVE-indirect debug of CCI paths Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment, volume is empty but binary has been produced Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment, volume is empty but binary has been produced Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment going on Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * locally works, CCI have difficulties with second layaer containers volumes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * restore experiment, use machine instead of docker for contract tests Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * simplify a bit Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * rollback on machine golang Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Document the changes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Changelog Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * comments Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
5 years ago
[RPC] Static swagger (#3880) * manually swagging Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * three definitions with polymorphism Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * added blockchain and block Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * low quality generation, commit, block_response and validators Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * genesis and consensus states endpoints Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * fix indentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * consensus parameters Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * fix indentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add height to consensus parameters endpoint Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * unconfirmed_txs and num_unconfirmed_txs Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add missing query parameter Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add ABCI queries Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * added index document for swagger documentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add missing routes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * contract tests added on CCI Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * contract tests job should be in the test suite Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * simplify requirements to test Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * typo Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * build is a prerequisite to start localnet Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * reduce nodejs size, move goodman to get_tools, add docs, fix comments Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Update scripts/get_tools.sh That's cleaner, thanks! Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * xz not supported by cci image, let's keep it simple Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * REMOVE-indirect debug of CCI paths Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment, volume is empty but binary has been produced Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment, volume is empty but binary has been produced Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment going on Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * locally works, CCI have difficulties with second layaer containers volumes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * restore experiment, use machine instead of docker for contract tests Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * simplify a bit Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * rollback on machine golang Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Document the changes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Changelog Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * comments Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
5 years ago
[RPC] Static swagger (#3880) * manually swagging Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * three definitions with polymorphism Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * added blockchain and block Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * low quality generation, commit, block_response and validators Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * genesis and consensus states endpoints Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * fix indentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * consensus parameters Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * fix indentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add height to consensus parameters endpoint Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * unconfirmed_txs and num_unconfirmed_txs Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add missing query parameter Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add ABCI queries Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * added index document for swagger documentation Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * add missing routes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * contract tests added on CCI Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * contract tests job should be in the test suite Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * simplify requirements to test Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * typo Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * build is a prerequisite to start localnet Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * reduce nodejs size, move goodman to get_tools, add docs, fix comments Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Update scripts/get_tools.sh That's cleaner, thanks! Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> * xz not supported by cci image, let's keep it simple Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * REMOVE-indirect debug of CCI paths Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment, volume is empty but binary has been produced Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment, volume is empty but binary has been produced Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * dirty experiment going on Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * locally works, CCI have difficulties with second layaer containers volumes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * restore experiment, use machine instead of docker for contract tests Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * simplify a bit Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * rollback on machine golang Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Document the changes Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * Changelog Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com> * comments Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
5 years ago
  1. version: 2.1
  2. executors:
  3. golang:
  4. docker:
  5. - image: tendermintdev/docker-tendermint-build
  6. working_directory: /go/src/github.com/tendermint/tendermint
  7. environment:
  8. GOBIN: /tmp/bin
  9. release:
  10. machine: true
  11. docs:
  12. docker:
  13. - image: tendermintdev/docker-website-deployment
  14. environment:
  15. AWS_REGION: us-east-1
  16. protoc:
  17. docker:
  18. - image: tendermintdev/docker-protoc
  19. commands:
  20. run_test:
  21. parameters:
  22. script_path:
  23. type: string
  24. steps:
  25. - attach_workspace:
  26. at: /tmp/bin
  27. - restore_cache:
  28. name: "Restore source code cache"
  29. keys:
  30. - go-src-v1-{{ .Revision }}
  31. - checkout
  32. - restore_cache:
  33. name: "Restore go modules cache"
  34. keys:
  35. - go-mod-v1-{{ checksum "go.sum" }}
  36. - run:
  37. name: "Running test"
  38. command: |
  39. bash << parameters.script_path >>
  40. jobs:
  41. setup_dependencies:
  42. executor: golang
  43. steps:
  44. - checkout
  45. - restore_cache:
  46. name: "Restore go modules cache"
  47. keys:
  48. - go-mod-v1-{{ checksum "go.sum" }}
  49. - run:
  50. command: |
  51. mkdir -p /tmp/bin
  52. - run:
  53. name: Cache go modules
  54. command: make go-mod-cache
  55. - run:
  56. name: tools
  57. command: make tools
  58. - run:
  59. name: "Build binaries"
  60. command: make install install_abci
  61. - save_cache:
  62. name: "Save go modules cache"
  63. key: go-mod-v1-{{ checksum "go.sum" }}
  64. paths:
  65. - "/go/pkg/mod"
  66. - save_cache:
  67. name: "Save source code cache"
  68. key: go-src-v1-{{ .Revision }}
  69. paths:
  70. - ".git"
  71. - persist_to_workspace:
  72. root: "/tmp/bin"
  73. paths:
  74. - "."
  75. proto-lint:
  76. executor: protoc
  77. steps:
  78. - checkout
  79. - run:
  80. command: make proto-lint
  81. proto-breakage:
  82. executor: protoc
  83. steps:
  84. - checkout
  85. - run:
  86. command: make proto-check-breaking
  87. test_abci_apps:
  88. executor: golang
  89. steps:
  90. - run_test:
  91. script_path: abci/tests/test_app/test.sh
  92. # if this test fails, fix it and update the docs at:
  93. # https://github.com/tendermint/tendermint/blob/master/docs/abci-cli.md
  94. test_abci_cli:
  95. executor: golang
  96. steps:
  97. - run_test:
  98. script_path: abci/tests/test_cli/test.sh
  99. test_apps:
  100. executor: golang
  101. steps:
  102. - run_test:
  103. script_path: test/app/test.sh
  104. test_persistence:
  105. executor: golang
  106. steps:
  107. - run_test:
  108. script_path: test/persist/test_failure_indices.sh
  109. test_cover:
  110. executor: golang
  111. parallelism: 4
  112. steps:
  113. - restore_cache:
  114. name: "Restore source code cache"
  115. keys:
  116. - go-src-v1-{{ .Revision }}
  117. - checkout
  118. - restore_cache:
  119. name: "Restore go module cache"
  120. keys:
  121. - go-mod-v2-{{ checksum "go.sum" }}
  122. - run:
  123. name: "Run tests"
  124. command: |
  125. export VERSION="$(git describe --tags --long | sed 's/v\(.*\)/\1/')"
  126. export GO111MODULE=on
  127. mkdir -p /tmp/logs /tmp/workspace/profiles
  128. for pkg in $(go list github.com/tendermint/tendermint/... | circleci tests split --split-by=timings); do
  129. id=$(basename "$pkg")
  130. go test -v -timeout 5m -mod=readonly -race -coverprofile=/tmp/workspace/profiles/$id.out -covermode=atomic "$pkg" | tee "/tmp/logs/$id-$RANDOM.log"
  131. done
  132. - persist_to_workspace:
  133. root: /tmp/workspace
  134. paths:
  135. - "profiles/*"
  136. - store_artifacts:
  137. path: /tmp/logs
  138. localnet:
  139. working_directory: /home/circleci/.go_workspace/src/github.com/tendermint/tendermint
  140. machine:
  141. image: circleci/classic:latest
  142. environment:
  143. GOBIN: /home/circleci/.go_workspace/bin
  144. GOPATH: /home/circleci/.go_workspace/
  145. GOOS: linux
  146. GOARCH: amd64
  147. parallelism: 1
  148. steps:
  149. - checkout
  150. - run:
  151. name: run localnet and exit on failure
  152. command: |
  153. set -x
  154. docker run --rm -v "$PWD":/go/src/github.com/tendermint/tendermint -w /go/src/github.com/tendermint/tendermint golang make build-linux
  155. make localnet-start &
  156. ./scripts/localnet-blocks-test.sh 40 5 10 localhost
  157. test_p2p:
  158. environment:
  159. GOBIN: /home/circleci/.go_workspace/bin
  160. GOPATH: /home/circleci/.go_workspace
  161. machine:
  162. image: circleci/classic:latest
  163. steps:
  164. - checkout
  165. - run: mkdir -p $GOPATH/src/github.com/tendermint
  166. - run: ln -sf /home/circleci/project $GOPATH/src/github.com/tendermint/tendermint
  167. - run: bash test/p2p/circleci.sh
  168. - store_artifacts:
  169. path: /home/circleci/project/test/p2p/logs
  170. upload_coverage:
  171. executor: golang
  172. steps:
  173. - attach_workspace:
  174. at: /tmp/workspace
  175. - restore_cache:
  176. name: "Restore source code cache"
  177. keys:
  178. - go-src-v1-{{ .Revision }}
  179. - checkout
  180. - restore_cache:
  181. name: "Restore go module cache"
  182. keys:
  183. - go-mod-v2-{{ checksum "go.sum" }}
  184. - run:
  185. name: gather
  186. command: |
  187. echo "mode: atomic" > coverage.txt
  188. for prof in $(ls /tmp/workspace/profiles/); do
  189. tail -n +2 /tmp/workspace/profiles/"$prof" >> coverage.txt
  190. done
  191. - run:
  192. name: upload
  193. command: bash .circleci/codecov.sh -f coverage.txt
  194. deploy_docs:
  195. executor: docs
  196. steps:
  197. - checkout
  198. - run:
  199. name: "Build docs"
  200. command: make build-docs
  201. - run:
  202. name: "Sync to S3"
  203. command: make sync-docs
  204. prepare_build:
  205. executor: golang
  206. steps:
  207. - restore_cache:
  208. name: "Restore source code cache"
  209. keys:
  210. - go-src-v1-{{ .Revision }}
  211. - checkout
  212. - run:
  213. name: Get next release number
  214. command: |
  215. export LAST_TAG="`git describe --tags --abbrev=0 --match "${CIRCLE_BRANCH}.*"`"
  216. echo "Last tag: ${LAST_TAG}"
  217. if [ -z "${LAST_TAG}" ]; then
  218. export LAST_TAG="${CIRCLE_BRANCH}"
  219. echo "Last tag not found. Possibly fresh branch or feature branch. Setting ${LAST_TAG} as tag."
  220. fi
  221. export NEXT_TAG="`python -u scripts/release_management/bump-semver.py --version "${LAST_TAG}"`"
  222. echo "Next tag: ${NEXT_TAG}"
  223. echo "export CIRCLE_TAG=\"${NEXT_TAG}\"" > release-version.source
  224. - run:
  225. name: Build dependencies
  226. command: make tools
  227. - persist_to_workspace:
  228. root: .
  229. paths:
  230. - "release-version.source"
  231. - save_cache:
  232. key: v2-release-deps-{{ checksum "go.sum" }}
  233. paths:
  234. - "/go/pkg/mod"
  235. build_artifacts:
  236. executor: golang
  237. parallelism: 4
  238. steps:
  239. - restore_cache:
  240. name: "Restore source code cache"
  241. keys:
  242. - go-src-v1-{{ .Revision }}
  243. - checkout
  244. - restore_cache:
  245. name: "Restore release dependencies cache"
  246. keys:
  247. - v2-release-deps-{{ checksum "go.sum" }}
  248. - attach_workspace:
  249. at: /tmp/workspace
  250. - run:
  251. name: Build artifact
  252. command: |
  253. # Setting CIRCLE_TAG because we do not tag the release ourselves.
  254. source /tmp/workspace/release-version.source
  255. if test ${CIRCLE_NODE_INDEX:-0} == 0 ;then export GOOS=linux GOARCH=amd64 && export OUTPUT=build/tendermint_${GOOS}_${GOARCH} && make build && python -u scripts/release_management/zip-file.py ;fi
  256. if test ${CIRCLE_NODE_INDEX:-0} == 1 ;then export GOOS=darwin GOARCH=amd64 && export OUTPUT=build/tendermint_${GOOS}_${GOARCH} && make build && python -u scripts/release_management/zip-file.py ;fi
  257. if test ${CIRCLE_NODE_INDEX:-0} == 2 ;then export GOOS=windows GOARCH=amd64 && export OUTPUT=build/tendermint_${GOOS}_${GOARCH} && make build && python -u scripts/release_management/zip-file.py ;fi
  258. if test ${CIRCLE_NODE_INDEX:-0} == 3 ;then export GOOS=linux GOARCH=arm && export OUTPUT=build/tendermint_${GOOS}_${GOARCH} && make build && python -u scripts/release_management/zip-file.py ;fi
  259. - persist_to_workspace:
  260. root: build
  261. paths:
  262. - "*.zip"
  263. - "tendermint_linux_amd64"
  264. release_artifacts:
  265. executor: golang
  266. steps:
  267. - restore_cache:
  268. name: "Restore source code cache"
  269. keys:
  270. - go-src-v1-{{ .Revision }}
  271. - checkout
  272. - attach_workspace:
  273. at: /tmp/workspace
  274. - run:
  275. name: "Deploy to GitHub"
  276. command: |
  277. # Setting CIRCLE_TAG because we do not tag the release ourselves.
  278. source /tmp/workspace/release-version.source
  279. echo "---"
  280. ls -la /tmp/workspace/*.zip
  281. echo "---"
  282. python -u scripts/release_management/sha-files.py
  283. echo "---"
  284. cat /tmp/workspace/SHA256SUMS
  285. echo "---"
  286. export RELEASE_ID="`python -u scripts/release_management/github-draft.py`"
  287. echo "Release ID: ${RELEASE_ID}"
  288. #Todo: Parallelize uploads
  289. export GOOS=linux GOARCH=amd64 && python -u scripts/release_management/github-upload.py --id "${RELEASE_ID}"
  290. export GOOS=darwin GOARCH=amd64 && python -u scripts/release_management/github-upload.py --id "${RELEASE_ID}"
  291. export GOOS=windows GOARCH=amd64 && python -u scripts/release_management/github-upload.py --id "${RELEASE_ID}"
  292. export GOOS=linux GOARCH=arm && python -u scripts/release_management/github-upload.py --id "${RELEASE_ID}"
  293. python -u scripts/release_management/github-upload.py --file "/tmp/workspace/SHA256SUMS" --id "${RELEASE_ID}"
  294. python -u scripts/release_management/github-publish.py --id "${RELEASE_ID}"
  295. release_docker:
  296. machine:
  297. image: ubuntu-1604:201903-01
  298. steps:
  299. - checkout
  300. - attach_workspace:
  301. at: /tmp/workspace
  302. - run:
  303. name: "Deploy to Docker Hub"
  304. command: |
  305. # Setting CIRCLE_TAG because we do not tag the release ourselves.
  306. source /tmp/workspace/release-version.source
  307. cp /tmp/workspace/tendermint_linux_amd64 DOCKER/tendermint
  308. docker build --label="tendermint" --tag="tendermint/tendermint:${CIRCLE_TAG}" --tag="tendermint/tendermint:latest" "DOCKER"
  309. docker login -u "${DOCKERHUB_USER}" --password-stdin \<<< "${DOCKERHUB_PASS}"
  310. docker push "tendermint/tendermint"
  311. docker logout
  312. reproducible_builds:
  313. executor: golang
  314. steps:
  315. - attach_workspace:
  316. at: /tmp/workspace
  317. - checkout
  318. - setup_remote_docker:
  319. docker_layer_caching: true
  320. - run:
  321. name: Build tendermint
  322. no_output_timeout: 20m
  323. command: |
  324. sudo apt-get install -y ruby
  325. bash -x ./scripts/gitian-build.sh all
  326. for os in darwin linux windows; do
  327. cp gitian-build-${os}/result/tendermint-${os}-res.yml .
  328. cp gitian-build-${os}/build/out/tendermint-*.tar.gz .
  329. rm -rf gitian-build-${os}/
  330. done
  331. - store_artifacts:
  332. path: /go/src/github.com/tendermint/tendermint/tendermint-darwin-res.yml
  333. - store_artifacts:
  334. path: /go/src/github.com/tendermint/tendermint/tendermint-linux-res.yml
  335. - store_artifacts:
  336. path: /go/src/github.com/tendermint/tendermint/tendermint-windows-res.yml
  337. - store_artifacts:
  338. path: /go/src/github.com/tendermint/tendermint/tendermint-*.tar.gz
  339. # # Test RPC implementation against the swagger documented specs
  340. # contract_tests:
  341. # working_directory: /home/circleci/.go_workspace/src/github.com/tendermint/tendermint
  342. # machine:
  343. # image: circleci/classic:latest
  344. # environment:
  345. # GOBIN: /home/circleci/.go_workspace/bin
  346. # GOPATH: /home/circleci/.go_workspace/
  347. # GOOS: linux
  348. # GOARCH: amd64
  349. # parallelism: 1
  350. # steps:
  351. # - checkout
  352. # - run:
  353. # name: Test RPC endpoints against swagger documentation
  354. # command: |
  355. # set -x
  356. # export PATH=~/.local/bin:$PATH
  357. # # install node and dredd
  358. # ./scripts/get_nodejs.sh
  359. # # build the binaries with a proper version of Go
  360. # 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
  361. # # This docker image works with go 1.7, we can install here the hook handler that contract-tests is going to use
  362. # go get github.com/snikch/goodman/cmd/goodman
  363. # make contract-tests
  364. workflows:
  365. version: 2
  366. test-suite:
  367. jobs:
  368. - deploy_docs:
  369. context: tendermint-docs
  370. filters:
  371. branches:
  372. only:
  373. - master
  374. tags:
  375. only:
  376. - /^v.*/
  377. - deploy_docs:
  378. context: tendermint-docs-staging
  379. filters:
  380. branches:
  381. only:
  382. - docs-theme-latest
  383. - setup_dependencies
  384. - test_abci_apps:
  385. requires:
  386. - setup_dependencies
  387. - proto-breakage
  388. - proto-lint
  389. - test_abci_cli:
  390. requires:
  391. - setup_dependencies
  392. - test_apps:
  393. requires:
  394. - setup_dependencies
  395. - test_cover:
  396. requires:
  397. - setup_dependencies
  398. - test_persistence:
  399. requires:
  400. - setup_dependencies
  401. - localnet:
  402. requires:
  403. - setup_dependencies
  404. - test_p2p
  405. - upload_coverage:
  406. requires:
  407. - test_cover
  408. - reproducible_builds:
  409. filters:
  410. branches:
  411. only:
  412. - master
  413. - /v[0-9]+\.[0-9]+/
  414. # - contract_tests:
  415. # requires:
  416. # - setup_dependencies
  417. release:
  418. jobs:
  419. - prepare_build
  420. - build_artifacts:
  421. requires:
  422. - prepare_build
  423. - release_artifacts:
  424. requires:
  425. - prepare_build
  426. - build_artifacts
  427. filters:
  428. branches:
  429. only:
  430. - /v[0-9]+\.[0-9]+/
  431. - release_docker:
  432. requires:
  433. - prepare_build
  434. - build_artifacts
  435. filters:
  436. branches:
  437. only:
  438. - /v[0-9]+\.[0-9]+/
  439. - master