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.

455 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
  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. - restore_cache:
  285. name: "Restore source code cache"
  286. keys:
  287. - go-src-v1-{{ .Revision }}
  288. - checkout
  289. - attach_workspace:
  290. at: /tmp/workspace
  291. - run:
  292. name: "Deploy to Docker Hub"
  293. command: |
  294. # Setting CIRCLE_TAG because we do not tag the release ourselves.
  295. source /tmp/workspace/release-version.source
  296. cp /tmp/workspace/tendermint_linux_amd64 DOCKER/tendermint
  297. docker build --label="tendermint" --tag="tendermint/tendermint:${CIRCLE_TAG}" --tag="tendermint/tendermint:latest" "DOCKER"
  298. docker login -u "${DOCKERHUB_USER}" --password-stdin \<<< "${DOCKERHUB_PASS}"
  299. docker push "tendermint/tendermint"
  300. docker logout
  301. reproducible_builds:
  302. executor: golang
  303. steps:
  304. - attach_workspace:
  305. at: /tmp/workspace
  306. - restore_cache:
  307. name: "Restore source code cache"
  308. keys:
  309. - go-src-v1-{{ .Revision }}
  310. - checkout
  311. - setup_remote_docker:
  312. docker_layer_caching: true
  313. - run:
  314. name: Build tendermint
  315. no_output_timeout: 20m
  316. command: |
  317. sudo apt-get install -y ruby
  318. bash -x ./scripts/gitian-build.sh all
  319. for os in darwin linux windows; do
  320. cp gitian-build-${os}/result/tendermint-${os}-res.yml .
  321. cp gitian-build-${os}/build/out/tendermint-*.tar.gz .
  322. rm -rf gitian-build-${os}/
  323. done
  324. - store_artifacts:
  325. path: /go/src/github.com/tendermint/tendermint/tendermint-darwin-res.yml
  326. - store_artifacts:
  327. path: /go/src/github.com/tendermint/tendermint/tendermint-linux-res.yml
  328. - store_artifacts:
  329. path: /go/src/github.com/tendermint/tendermint/tendermint-windows-res.yml
  330. - store_artifacts:
  331. path: /go/src/github.com/tendermint/tendermint/tendermint-*.tar.gz
  332. # Test RPC implementation against the swagger documented specs
  333. contract_tests:
  334. working_directory: /home/circleci/.go_workspace/src/github.com/tendermint/tendermint
  335. machine:
  336. image: circleci/classic:latest
  337. environment:
  338. GOBIN: /home/circleci/.go_workspace/bin
  339. GOPATH: /home/circleci/.go_workspace/
  340. GOOS: linux
  341. GOARCH: amd64
  342. parallelism: 1
  343. steps:
  344. - checkout
  345. - run:
  346. name: Test RPC endpoints against swagger documentation
  347. command: |
  348. set -x
  349. export PATH=~/.local/bin:$PATH
  350. # install node and dredd
  351. ./scripts/get_nodejs.sh
  352. # build the binaries with a proper version of Go
  353. 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
  354. # This docker image works with go 1.7, we can install here the hook handler that contract-tests is going to use
  355. go get github.com/snikch/goodman/cmd/goodman
  356. make contract-tests
  357. workflows:
  358. version: 2
  359. test-suite:
  360. jobs:
  361. - deploy_docs:
  362. context: tendermint-docs-staging
  363. filters:
  364. branches:
  365. only:
  366. - /.*/
  367. tags:
  368. ignore:
  369. - /^v.*/
  370. - deploy_docs:
  371. context: tendermint-docs
  372. filters:
  373. branches:
  374. ignore:
  375. - /.*/
  376. tags:
  377. only:
  378. - /^v.*/
  379. - setup_dependencies
  380. - test_abci_apps:
  381. requires:
  382. - setup_dependencies
  383. - test_abci_cli:
  384. requires:
  385. - setup_dependencies
  386. - test_apps:
  387. requires:
  388. - setup_dependencies
  389. - test_cover:
  390. requires:
  391. - setup_dependencies
  392. - test_persistence:
  393. requires:
  394. - setup_dependencies
  395. - localnet:
  396. requires:
  397. - setup_dependencies
  398. - test_p2p
  399. - upload_coverage:
  400. requires:
  401. - test_cover
  402. - reproducible_builds:
  403. filters:
  404. branches:
  405. only:
  406. - master
  407. - /v[0-9]+\.[0-9]+/
  408. - contract_tests:
  409. requires:
  410. - setup_dependencies
  411. release:
  412. jobs:
  413. - prepare_build
  414. - build_artifacts:
  415. requires:
  416. - prepare_build
  417. - release_artifacts:
  418. requires:
  419. - prepare_build
  420. - build_artifacts
  421. filters:
  422. branches:
  423. only:
  424. - /v[0-9]+\.[0-9]+/
  425. - release_docker:
  426. requires:
  427. - prepare_build
  428. - build_artifacts
  429. filters:
  430. branches:
  431. only:
  432. - /v[0-9]+\.[0-9]+/