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.

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