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.

346 lines
12 KiB

proto: update proto generation to use buf (#7975) * Hard-code go_package option for .proto files Signed-off-by: Thane Thomson <connect@thanethomson.com> * Automatically relocate generated ABCI types after proto-gen Signed-off-by: Thane Thomson <connect@thanethomson.com> * Skip building gogoproto (i.e. only build our types) Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unnecessary proto generation scripts Signed-off-by: Thane Thomson <connect@thanethomson.com> * Upgrade buf config from v1beta1 to v1 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add simple proto generation script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace buf-based protobuf generation with simple protoc-based approach Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove custom buf-based Docker image generation config and Dockerfile Signed-off-by: Thane Thomson <connect@thanethomson.com> * Adopt Cosmos SDK's approach to Protobuf linting and breakage checking in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Suppress command echo when running proto checks Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto-check workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore proto-format target Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace custom BASH script with make equivalent Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove proto linting/breaking changes CI checks after discussion today Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove dangling reference to CI workflow that no longer exists Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines relating to protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Use buf instead for generating protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unused buf config for gogoprotobuf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add reminder for if we migrate fully to buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore protopackage script for #8065 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix permissions on protopackage script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines to show building of protos using buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix breaking changes check and add disclaimer Signed-off-by: Thane Thomson <connect@thanethomson.com> * Expand on contributing guidelines for clarity Signed-off-by: Thane Thomson <connect@thanethomson.com> * Re-remove old proto workflows Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add buf-based proto linting workflow in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Superficially reorder proto targets Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto lints Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix GA workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily use forked version of mlc Use forked version of markdown-link-check until https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/126 lands. Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily disable markdown link checker Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove gogo protos - superseded by version from buf registry Signed-off-by: Thane Thomson <connect@thanethomson.com>
3 years ago
proto: update proto generation to use buf (#7975) * Hard-code go_package option for .proto files Signed-off-by: Thane Thomson <connect@thanethomson.com> * Automatically relocate generated ABCI types after proto-gen Signed-off-by: Thane Thomson <connect@thanethomson.com> * Skip building gogoproto (i.e. only build our types) Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unnecessary proto generation scripts Signed-off-by: Thane Thomson <connect@thanethomson.com> * Upgrade buf config from v1beta1 to v1 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add simple proto generation script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace buf-based protobuf generation with simple protoc-based approach Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove custom buf-based Docker image generation config and Dockerfile Signed-off-by: Thane Thomson <connect@thanethomson.com> * Adopt Cosmos SDK's approach to Protobuf linting and breakage checking in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Suppress command echo when running proto checks Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto-check workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore proto-format target Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace custom BASH script with make equivalent Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove proto linting/breaking changes CI checks after discussion today Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove dangling reference to CI workflow that no longer exists Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines relating to protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Use buf instead for generating protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unused buf config for gogoprotobuf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add reminder for if we migrate fully to buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore protopackage script for #8065 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix permissions on protopackage script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines to show building of protos using buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix breaking changes check and add disclaimer Signed-off-by: Thane Thomson <connect@thanethomson.com> * Expand on contributing guidelines for clarity Signed-off-by: Thane Thomson <connect@thanethomson.com> * Re-remove old proto workflows Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add buf-based proto linting workflow in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Superficially reorder proto targets Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto lints Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix GA workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily use forked version of mlc Use forked version of markdown-link-check until https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/126 lands. Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily disable markdown link checker Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove gogo protos - superseded by version from buf registry Signed-off-by: Thane Thomson <connect@thanethomson.com>
3 years ago
proto: update proto generation to use buf (#7975) * Hard-code go_package option for .proto files Signed-off-by: Thane Thomson <connect@thanethomson.com> * Automatically relocate generated ABCI types after proto-gen Signed-off-by: Thane Thomson <connect@thanethomson.com> * Skip building gogoproto (i.e. only build our types) Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unnecessary proto generation scripts Signed-off-by: Thane Thomson <connect@thanethomson.com> * Upgrade buf config from v1beta1 to v1 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add simple proto generation script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace buf-based protobuf generation with simple protoc-based approach Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove custom buf-based Docker image generation config and Dockerfile Signed-off-by: Thane Thomson <connect@thanethomson.com> * Adopt Cosmos SDK's approach to Protobuf linting and breakage checking in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Suppress command echo when running proto checks Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto-check workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore proto-format target Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace custom BASH script with make equivalent Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove proto linting/breaking changes CI checks after discussion today Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove dangling reference to CI workflow that no longer exists Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines relating to protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Use buf instead for generating protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unused buf config for gogoprotobuf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add reminder for if we migrate fully to buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore protopackage script for #8065 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix permissions on protopackage script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines to show building of protos using buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix breaking changes check and add disclaimer Signed-off-by: Thane Thomson <connect@thanethomson.com> * Expand on contributing guidelines for clarity Signed-off-by: Thane Thomson <connect@thanethomson.com> * Re-remove old proto workflows Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add buf-based proto linting workflow in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Superficially reorder proto targets Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto lints Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix GA workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily use forked version of mlc Use forked version of markdown-link-check until https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/126 lands. Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily disable markdown link checker Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove gogo protos - superseded by version from buf registry Signed-off-by: Thane Thomson <connect@thanethomson.com>
3 years ago
proto: update proto generation to use buf (#7975) * Hard-code go_package option for .proto files Signed-off-by: Thane Thomson <connect@thanethomson.com> * Automatically relocate generated ABCI types after proto-gen Signed-off-by: Thane Thomson <connect@thanethomson.com> * Skip building gogoproto (i.e. only build our types) Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unnecessary proto generation scripts Signed-off-by: Thane Thomson <connect@thanethomson.com> * Upgrade buf config from v1beta1 to v1 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add simple proto generation script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace buf-based protobuf generation with simple protoc-based approach Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove custom buf-based Docker image generation config and Dockerfile Signed-off-by: Thane Thomson <connect@thanethomson.com> * Adopt Cosmos SDK's approach to Protobuf linting and breakage checking in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Suppress command echo when running proto checks Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto-check workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore proto-format target Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace custom BASH script with make equivalent Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove proto linting/breaking changes CI checks after discussion today Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove dangling reference to CI workflow that no longer exists Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines relating to protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Use buf instead for generating protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unused buf config for gogoprotobuf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add reminder for if we migrate fully to buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore protopackage script for #8065 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix permissions on protopackage script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines to show building of protos using buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix breaking changes check and add disclaimer Signed-off-by: Thane Thomson <connect@thanethomson.com> * Expand on contributing guidelines for clarity Signed-off-by: Thane Thomson <connect@thanethomson.com> * Re-remove old proto workflows Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add buf-based proto linting workflow in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Superficially reorder proto targets Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto lints Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix GA workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily use forked version of mlc Use forked version of markdown-link-check until https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/126 lands. Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily disable markdown link checker Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove gogo protos - superseded by version from buf registry Signed-off-by: Thane Thomson <connect@thanethomson.com>
3 years ago
proto: update proto generation to use buf (#7975) * Hard-code go_package option for .proto files Signed-off-by: Thane Thomson <connect@thanethomson.com> * Automatically relocate generated ABCI types after proto-gen Signed-off-by: Thane Thomson <connect@thanethomson.com> * Skip building gogoproto (i.e. only build our types) Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unnecessary proto generation scripts Signed-off-by: Thane Thomson <connect@thanethomson.com> * Upgrade buf config from v1beta1 to v1 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add simple proto generation script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace buf-based protobuf generation with simple protoc-based approach Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove custom buf-based Docker image generation config and Dockerfile Signed-off-by: Thane Thomson <connect@thanethomson.com> * Adopt Cosmos SDK's approach to Protobuf linting and breakage checking in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Suppress command echo when running proto checks Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto-check workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore proto-format target Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace custom BASH script with make equivalent Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove proto linting/breaking changes CI checks after discussion today Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove dangling reference to CI workflow that no longer exists Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines relating to protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Use buf instead for generating protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unused buf config for gogoprotobuf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add reminder for if we migrate fully to buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore protopackage script for #8065 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix permissions on protopackage script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines to show building of protos using buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix breaking changes check and add disclaimer Signed-off-by: Thane Thomson <connect@thanethomson.com> * Expand on contributing guidelines for clarity Signed-off-by: Thane Thomson <connect@thanethomson.com> * Re-remove old proto workflows Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add buf-based proto linting workflow in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Superficially reorder proto targets Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto lints Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix GA workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily use forked version of mlc Use forked version of markdown-link-check until https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/126 lands. Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily disable markdown link checker Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove gogo protos - superseded by version from buf registry Signed-off-by: Thane Thomson <connect@thanethomson.com>
3 years ago
proto: update proto generation to use buf (#7975) * Hard-code go_package option for .proto files Signed-off-by: Thane Thomson <connect@thanethomson.com> * Automatically relocate generated ABCI types after proto-gen Signed-off-by: Thane Thomson <connect@thanethomson.com> * Skip building gogoproto (i.e. only build our types) Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unnecessary proto generation scripts Signed-off-by: Thane Thomson <connect@thanethomson.com> * Upgrade buf config from v1beta1 to v1 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add simple proto generation script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace buf-based protobuf generation with simple protoc-based approach Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove custom buf-based Docker image generation config and Dockerfile Signed-off-by: Thane Thomson <connect@thanethomson.com> * Adopt Cosmos SDK's approach to Protobuf linting and breakage checking in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Suppress command echo when running proto checks Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto-check workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore proto-format target Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace custom BASH script with make equivalent Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove proto linting/breaking changes CI checks after discussion today Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove dangling reference to CI workflow that no longer exists Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines relating to protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Use buf instead for generating protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unused buf config for gogoprotobuf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add reminder for if we migrate fully to buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore protopackage script for #8065 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix permissions on protopackage script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines to show building of protos using buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix breaking changes check and add disclaimer Signed-off-by: Thane Thomson <connect@thanethomson.com> * Expand on contributing guidelines for clarity Signed-off-by: Thane Thomson <connect@thanethomson.com> * Re-remove old proto workflows Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add buf-based proto linting workflow in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Superficially reorder proto targets Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto lints Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix GA workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily use forked version of mlc Use forked version of markdown-link-check until https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/126 lands. Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily disable markdown link checker Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove gogo protos - superseded by version from buf registry Signed-off-by: Thane Thomson <connect@thanethomson.com>
3 years ago
proto: update proto generation to use buf (#7975) * Hard-code go_package option for .proto files Signed-off-by: Thane Thomson <connect@thanethomson.com> * Automatically relocate generated ABCI types after proto-gen Signed-off-by: Thane Thomson <connect@thanethomson.com> * Skip building gogoproto (i.e. only build our types) Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unnecessary proto generation scripts Signed-off-by: Thane Thomson <connect@thanethomson.com> * Upgrade buf config from v1beta1 to v1 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add simple proto generation script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace buf-based protobuf generation with simple protoc-based approach Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove custom buf-based Docker image generation config and Dockerfile Signed-off-by: Thane Thomson <connect@thanethomson.com> * Adopt Cosmos SDK's approach to Protobuf linting and breakage checking in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Suppress command echo when running proto checks Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto-check workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore proto-format target Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace custom BASH script with make equivalent Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove proto linting/breaking changes CI checks after discussion today Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove dangling reference to CI workflow that no longer exists Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines relating to protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Use buf instead for generating protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unused buf config for gogoprotobuf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add reminder for if we migrate fully to buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore protopackage script for #8065 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix permissions on protopackage script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines to show building of protos using buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix breaking changes check and add disclaimer Signed-off-by: Thane Thomson <connect@thanethomson.com> * Expand on contributing guidelines for clarity Signed-off-by: Thane Thomson <connect@thanethomson.com> * Re-remove old proto workflows Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add buf-based proto linting workflow in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Superficially reorder proto targets Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto lints Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix GA workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily use forked version of mlc Use forked version of markdown-link-check until https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/126 lands. Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily disable markdown link checker Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove gogo protos - superseded by version from buf registry Signed-off-by: Thane Thomson <connect@thanethomson.com>
3 years ago
proto: update proto generation to use buf (#7975) * Hard-code go_package option for .proto files Signed-off-by: Thane Thomson <connect@thanethomson.com> * Automatically relocate generated ABCI types after proto-gen Signed-off-by: Thane Thomson <connect@thanethomson.com> * Skip building gogoproto (i.e. only build our types) Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unnecessary proto generation scripts Signed-off-by: Thane Thomson <connect@thanethomson.com> * Upgrade buf config from v1beta1 to v1 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add simple proto generation script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace buf-based protobuf generation with simple protoc-based approach Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove custom buf-based Docker image generation config and Dockerfile Signed-off-by: Thane Thomson <connect@thanethomson.com> * Adopt Cosmos SDK's approach to Protobuf linting and breakage checking in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Suppress command echo when running proto checks Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto-check workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore proto-format target Signed-off-by: Thane Thomson <connect@thanethomson.com> * Replace custom BASH script with make equivalent Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove proto linting/breaking changes CI checks after discussion today Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove dangling reference to CI workflow that no longer exists Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines relating to protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Use buf instead for generating protos Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove unused buf config for gogoprotobuf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add reminder for if we migrate fully to buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Restore protopackage script for #8065 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix permissions on protopackage script Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update contributing guidelines to show building of protos using buf Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix breaking changes check and add disclaimer Signed-off-by: Thane Thomson <connect@thanethomson.com> * Expand on contributing guidelines for clarity Signed-off-by: Thane Thomson <connect@thanethomson.com> * Re-remove old proto workflows Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add buf-based proto linting workflow in CI Signed-off-by: Thane Thomson <connect@thanethomson.com> * Superficially reorder proto targets Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix proto lints Signed-off-by: Thane Thomson <connect@thanethomson.com> * Fix GA workflow YAML indentation Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily use forked version of mlc Use forked version of markdown-link-check until https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/126 lands. Signed-off-by: Thane Thomson <connect@thanethomson.com> * Temporarily disable markdown link checker Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove gogo protos - superseded by version from buf registry Signed-off-by: Thane Thomson <connect@thanethomson.com>
3 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
build: Make sure to test packages with external tests (#7608) The test filter was looking for "TestGoFiles", which does not include tests in a separate package (e.g., "package foo_test" for "package foo"). This caused several packages not to be tested in CI, including: github.com/tendermint/tendermint/abci/client github.com/tendermint/tendermint/crypto github.com/tendermint/tendermint/crypto/tmhash github.com/tendermint/tendermint/internal/eventbus github.com/tendermint/tendermint/internal/evidence github.com/tendermint/tendermint/internal/inspect github.com/tendermint/tendermint/internal/jsontypes github.com/tendermint/tendermint/internal/libs/protoio github.com/tendermint/tendermint/internal/libs/sync github.com/tendermint/tendermint/internal/p2p/pex github.com/tendermint/tendermint/internal/pubsub github.com/tendermint/tendermint/internal/pubsub/query github.com/tendermint/tendermint/internal/pubsub/query/syntax github.com/tendermint/tendermint/internal/state/indexer github.com/tendermint/tendermint/internal/state/indexer/block/kv github.com/tendermint/tendermint/libs/json github.com/tendermint/tendermint/libs/log github.com/tendermint/tendermint/libs/os github.com/tendermint/tendermint/light github.com/tendermint/tendermint/light/provider/http github.com/tendermint/tendermint/privval/grpc github.com/tendermint/tendermint/proto/tendermint/blocksync github.com/tendermint/tendermint/proto/tendermint/consensus github.com/tendermint/tendermint/proto/tendermint/statesync github.com/tendermint/tendermint/rpc/client github.com/tendermint/tendermint/rpc/client/mock github.com/tendermint/tendermint/test/e2e/tests github.com/tendermint/tendermint/test/fuzz/mempool github.com/tendermint/tendermint/test/fuzz/p2p/secretconnection github.com/tendermint/tendermint/test/fuzz/rpc/jsonrpc/server Updates #7626 and #7634.
3 years ago
build: Make sure to test packages with external tests (#7608) The test filter was looking for "TestGoFiles", which does not include tests in a separate package (e.g., "package foo_test" for "package foo"). This caused several packages not to be tested in CI, including: github.com/tendermint/tendermint/abci/client github.com/tendermint/tendermint/crypto github.com/tendermint/tendermint/crypto/tmhash github.com/tendermint/tendermint/internal/eventbus github.com/tendermint/tendermint/internal/evidence github.com/tendermint/tendermint/internal/inspect github.com/tendermint/tendermint/internal/jsontypes github.com/tendermint/tendermint/internal/libs/protoio github.com/tendermint/tendermint/internal/libs/sync github.com/tendermint/tendermint/internal/p2p/pex github.com/tendermint/tendermint/internal/pubsub github.com/tendermint/tendermint/internal/pubsub/query github.com/tendermint/tendermint/internal/pubsub/query/syntax github.com/tendermint/tendermint/internal/state/indexer github.com/tendermint/tendermint/internal/state/indexer/block/kv github.com/tendermint/tendermint/libs/json github.com/tendermint/tendermint/libs/log github.com/tendermint/tendermint/libs/os github.com/tendermint/tendermint/light github.com/tendermint/tendermint/light/provider/http github.com/tendermint/tendermint/privval/grpc github.com/tendermint/tendermint/proto/tendermint/blocksync github.com/tendermint/tendermint/proto/tendermint/consensus github.com/tendermint/tendermint/proto/tendermint/statesync github.com/tendermint/tendermint/rpc/client github.com/tendermint/tendermint/rpc/client/mock github.com/tendermint/tendermint/test/e2e/tests github.com/tendermint/tendermint/test/fuzz/mempool github.com/tendermint/tendermint/test/fuzz/p2p/secretconnection github.com/tendermint/tendermint/test/fuzz/rpc/jsonrpc/server Updates #7626 and #7634.
3 years ago
  1. #!/usr/bin/make -f
  2. BUILDDIR ?= $(CURDIR)/build
  3. BUILD_TAGS?=tendermint
  4. # If building a release, please checkout the version tag to get the correct version setting
  5. ifneq ($(shell git symbolic-ref -q --short HEAD),)
  6. VERSION := unreleased-$(shell git symbolic-ref -q --short HEAD)-$(shell git rev-parse HEAD)
  7. else
  8. VERSION := $(shell git describe)
  9. endif
  10. LD_FLAGS = -X github.com/tendermint/tendermint/version.TMVersion=$(VERSION)
  11. BUILD_FLAGS = -mod=readonly -ldflags "$(LD_FLAGS)"
  12. CGO_ENABLED ?= 0
  13. # handle nostrip
  14. ifeq (,$(findstring nostrip,$(TENDERMINT_BUILD_OPTIONS)))
  15. BUILD_FLAGS += -trimpath
  16. LD_FLAGS += -s -w
  17. endif
  18. # handle race
  19. ifeq (race,$(findstring race,$(TENDERMINT_BUILD_OPTIONS)))
  20. CGO_ENABLED=1
  21. BUILD_FLAGS += -race
  22. endif
  23. # handle cleveldb
  24. ifeq (cleveldb,$(findstring cleveldb,$(TENDERMINT_BUILD_OPTIONS)))
  25. CGO_ENABLED=1
  26. BUILD_TAGS += cleveldb
  27. endif
  28. # handle badgerdb
  29. ifeq (badgerdb,$(findstring badgerdb,$(TENDERMINT_BUILD_OPTIONS)))
  30. BUILD_TAGS += badgerdb
  31. endif
  32. # handle rocksdb
  33. ifeq (rocksdb,$(findstring rocksdb,$(TENDERMINT_BUILD_OPTIONS)))
  34. CGO_ENABLED=1
  35. BUILD_TAGS += rocksdb
  36. endif
  37. # handle boltdb
  38. ifeq (boltdb,$(findstring boltdb,$(TENDERMINT_BUILD_OPTIONS)))
  39. BUILD_TAGS += boltdb
  40. endif
  41. # allow users to pass additional flags via the conventional LDFLAGS variable
  42. LD_FLAGS += $(LDFLAGS)
  43. all: check build test install
  44. .PHONY: all
  45. include test/Makefile
  46. ###############################################################################
  47. ### Build Tendermint ###
  48. ###############################################################################
  49. build: $(BUILDDIR)/
  50. CGO_ENABLED=$(CGO_ENABLED) go build $(BUILD_FLAGS) -tags '$(BUILD_TAGS)' -o $(BUILDDIR)/ ./cmd/tendermint/
  51. .PHONY: build
  52. install:
  53. CGO_ENABLED=$(CGO_ENABLED) go install $(BUILD_FLAGS) -tags $(BUILD_TAGS) ./cmd/tendermint
  54. .PHONY: install
  55. $(BUILDDIR)/:
  56. mkdir -p $@
  57. ###############################################################################
  58. ### Protobuf ###
  59. ###############################################################################
  60. check-proto-deps:
  61. ifeq (,$(shell which buf))
  62. $(error "buf is required for Protobuf building, linting and breakage checking. See https://docs.buf.build/installation for installation instructions.")
  63. endif
  64. ifeq (,$(shell which protoc-gen-gogofaster))
  65. $(error "gogofaster plugin for protoc is required. Run 'go install github.com/gogo/protobuf/protoc-gen-gogofaster@latest' to install")
  66. endif
  67. .PHONY: check-proto-deps
  68. check-proto-format-deps:
  69. ifeq (,$(shell which clang-format))
  70. $(error "clang-format is required for Protobuf formatting. See instructions for your platform on how to install it.")
  71. endif
  72. .PHONY: check-proto-format-deps
  73. proto-gen: check-proto-deps
  74. @echo "Generating Protobuf files"
  75. @buf generate
  76. @mv ./proto/tendermint/abci/types.pb.go ./abci/types/
  77. .PHONY: proto-gen
  78. # These targets are provided for convenience and are intended for local
  79. # execution only.
  80. proto-lint: check-proto-deps
  81. @echo "Linting Protobuf files"
  82. @buf lint
  83. .PHONY: proto-lint
  84. proto-format: check-proto-format-deps
  85. @echo "Formatting Protobuf files"
  86. @find . -name '*.proto' -path "./proto/*" -exec clang-format -i {} \;
  87. .PHONY: proto-format
  88. proto-check-breaking: check-proto-deps
  89. @echo "Checking for breaking changes in Protobuf files against local branch"
  90. @echo "Note: This is only useful if your changes have not yet been committed."
  91. @echo " Otherwise read up on buf's \"breaking\" command usage:"
  92. @echo " https://docs.buf.build/breaking/usage"
  93. @buf breaking --against ".git"
  94. .PHONY: proto-check-breaking
  95. # TODO: Should be removed when work on ABCI++ is complete.
  96. # For more information, see https://github.com/tendermint/tendermint/issues/8066
  97. abci-proto-gen:
  98. ./scripts/abci-gen.sh
  99. .PHONY: abci-proto-gen
  100. ###############################################################################
  101. ### Build ABCI ###
  102. ###############################################################################
  103. build_abci:
  104. @go build -mod=readonly -i ./abci/cmd/...
  105. .PHONY: build_abci
  106. install_abci:
  107. @go install -mod=readonly ./abci/cmd/...
  108. .PHONY: install_abci
  109. ###############################################################################
  110. ### Privval Server ###
  111. ###############################################################################
  112. build_privval_server:
  113. @go build -mod=readonly -o $(BUILDDIR)/ -i ./cmd/priv_val_server/...
  114. .PHONY: build_privval_server
  115. generate_test_cert:
  116. # generate self signing ceritificate authority
  117. @certstrap init --common-name "root CA" --expires "20 years"
  118. # generate server cerificate
  119. @certstrap request-cert -cn server -ip 127.0.0.1
  120. # self-sign server cerificate with rootCA
  121. @certstrap sign server --CA "root CA"
  122. # generate client cerificate
  123. @certstrap request-cert -cn client -ip 127.0.0.1
  124. # self-sign client cerificate with rootCA
  125. @certstrap sign client --CA "root CA"
  126. .PHONY: generate_test_cert
  127. ###############################################################################
  128. ### Distribution ###
  129. ###############################################################################
  130. # dist builds binaries for all platforms and packages them for distribution
  131. # TODO add abci to these scripts
  132. dist:
  133. @BUILD_TAGS=$(BUILD_TAGS) sh -c "'$(CURDIR)/scripts/dist.sh'"
  134. .PHONY: dist
  135. go-mod-cache: go.sum
  136. @echo "--> Download go modules to local cache"
  137. @go mod download
  138. .PHONY: go-mod-cache
  139. go.sum: go.mod
  140. @echo "--> Ensure dependencies have not been modified"
  141. @go mod verify
  142. @go mod tidy
  143. draw_deps:
  144. @# requires brew install graphviz or apt-get install graphviz
  145. go get github.com/RobotsAndPencils/goviz
  146. @goviz -i github.com/tendermint/tendermint/cmd/tendermint -d 3 | dot -Tpng -o dependency-graph.png
  147. .PHONY: draw_deps
  148. get_deps_bin_size:
  149. @# Copy of build recipe with additional flags to perform binary size analysis
  150. $(eval $(shell go build -work -a $(BUILD_FLAGS) -tags $(BUILD_TAGS) -o $(BUILDDIR)/ ./cmd/tendermint/ 2>&1))
  151. @find $(WORK) -type f -name "*.a" | xargs -I{} du -hxs "{}" | sort -rh | sed -e s:${WORK}/::g > deps_bin_size.log
  152. @echo "Results can be found here: $(CURDIR)/deps_bin_size.log"
  153. .PHONY: get_deps_bin_size
  154. ###############################################################################
  155. ### Libs ###
  156. ###############################################################################
  157. # generates certificates for TLS testing in remotedb and RPC server
  158. gen_certs: clean_certs
  159. certstrap init --common-name "tendermint.com" --passphrase ""
  160. certstrap request-cert --common-name "server" -ip "127.0.0.1" --passphrase ""
  161. certstrap sign "server" --CA "tendermint.com" --passphrase ""
  162. mv out/server.crt rpc/jsonrpc/server/test.crt
  163. mv out/server.key rpc/jsonrpc/server/test.key
  164. rm -rf out
  165. .PHONY: gen_certs
  166. # deletes generated certificates
  167. clean_certs:
  168. rm -f rpc/jsonrpc/server/test.crt
  169. rm -f rpc/jsonrpc/server/test.key
  170. .PHONY: clean_certs
  171. ###############################################################################
  172. ### Formatting, linting, and vetting ###
  173. ###############################################################################
  174. format:
  175. find . -name '*.go' -type f -not -path "*.git*" -not -name '*.pb.go' -not -name '*pb_test.go' | xargs gofmt -w -s
  176. find . -name '*.go' -type f -not -path "*.git*" -not -name '*.pb.go' -not -name '*pb_test.go' | xargs goimports -w -local github.com/tendermint/tendermint
  177. .PHONY: format
  178. lint:
  179. @echo "--> Running linter"
  180. go run github.com/golangci/golangci-lint/cmd/golangci-lint run
  181. .PHONY: lint
  182. DESTINATION = ./index.html.md
  183. ###############################################################################
  184. ### Documentation ###
  185. ###############################################################################
  186. # todo remove once tendermint.com DNS is solved
  187. build-docs:
  188. @cd docs && \
  189. while read -r branch path_prefix; do \
  190. (git checkout $${branch} && npm ci && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \
  191. mkdir -p ~/output/$${path_prefix} ; \
  192. cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
  193. cp ~/output/$${path_prefix}/index.html ~/output ; \
  194. done < versions ;
  195. .PHONY: build-docs
  196. ###############################################################################
  197. ### Docker image ###
  198. ###############################################################################
  199. build-docker: build-linux
  200. cp $(BUILDDIR)/tendermint DOCKER/tendermint
  201. docker build --label=tendermint --tag="tendermint/tendermint" -f DOCKER/Dockerfile .
  202. rm -rf DOCKER/tendermint
  203. .PHONY: build-docker
  204. ###############################################################################
  205. ### Mocks ###
  206. ###############################################################################
  207. mockery:
  208. go generate -run="./scripts/mockery_generate.sh" ./...
  209. .PHONY: mockery
  210. ###############################################################################
  211. ### Local testnet using docker ###
  212. ###############################################################################
  213. # Build linux binary on other platforms
  214. build-linux:
  215. GOOS=linux GOARCH=amd64 $(MAKE) build
  216. .PHONY: build-linux
  217. build-docker-localnode:
  218. @cd networks/local && make
  219. .PHONY: build-docker-localnode
  220. # Runs `make build TENDERMINT_BUILD_OPTIONS=cleveldb` from within an Amazon
  221. # Linux (v2)-based Docker build container in order to build an Amazon
  222. # Linux-compatible binary. Produces a compatible binary at ./build/tendermint
  223. build_c-amazonlinux:
  224. $(MAKE) -C ./DOCKER build_amazonlinux_buildimage
  225. docker run --rm -it -v `pwd`:/tendermint tendermint/tendermint:build_c-amazonlinux
  226. .PHONY: build_c-amazonlinux
  227. # Run a 4-node testnet locally
  228. localnet-start: localnet-stop build-docker-localnode
  229. @if ! [ -f build/node0/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/tendermint:Z tendermint/localnode testnet --config /etc/tendermint/config-template.toml --o . --starting-ip-address 192.167.10.2; fi
  230. docker-compose up
  231. .PHONY: localnet-start
  232. # Stop testnet
  233. localnet-stop:
  234. docker-compose down
  235. .PHONY: localnet-stop
  236. # Build hooks for dredd, to skip or add information on some steps
  237. build-contract-tests-hooks:
  238. ifeq ($(OS),Windows_NT)
  239. go build -mod=readonly $(BUILD_FLAGS) -o build/contract_tests.exe ./cmd/contract_tests
  240. else
  241. go build -mod=readonly $(BUILD_FLAGS) -o build/contract_tests ./cmd/contract_tests
  242. endif
  243. .PHONY: build-contract-tests-hooks
  244. # Run a nodejs tool to test endpoints against a localnet
  245. # The command takes care of starting and stopping the network
  246. # prerequisits: build-contract-tests-hooks build-linux
  247. # the two build commands were not added to let this command run from generic containers or machines.
  248. # The binaries should be built beforehand
  249. contract-tests:
  250. dredd
  251. .PHONY: contract-tests
  252. clean:
  253. rm -rf $(CURDIR)/artifacts/ $(BUILDDIR)/
  254. build-reproducible:
  255. docker rm latest-build || true
  256. docker run --volume=$(CURDIR):/sources:ro \
  257. --env TARGET_PLATFORMS='linux/amd64 linux/arm64 darwin/amd64 windows/amd64' \
  258. --env APP=tendermint \
  259. --env COMMIT=$(shell git rev-parse --short=8 HEAD) \
  260. --env VERSION=$(shell git describe --tags) \
  261. --name latest-build cosmossdk/rbuilder:latest
  262. docker cp -a latest-build:/home/builder/artifacts/ $(CURDIR)/
  263. .PHONY: build-reproducible
  264. # Implements test splitting and running. This is pulled directly from
  265. # the github action workflows for better local reproducibility.
  266. GO_TEST_FILES != find $(CURDIR) -name "*_test.go"
  267. # default to four splits by default
  268. NUM_SPLIT ?= 4
  269. $(BUILDDIR):
  270. mkdir -p $@
  271. # The format statement filters out all packages that don't have tests.
  272. # Note we need to check for both in-package tests (.TestGoFiles) and
  273. # out-of-package tests (.XTestGoFiles).
  274. $(BUILDDIR)/packages.txt:$(GO_TEST_FILES) $(BUILDDIR)
  275. go list -f "{{ if (or .TestGoFiles .XTestGoFiles) }}{{ .ImportPath }}{{ end }}" ./... | sort > $@
  276. split-test-packages:$(BUILDDIR)/packages.txt
  277. split -d -n l/$(NUM_SPLIT) $< $<.
  278. test-group-%:split-test-packages
  279. cat $(BUILDDIR)/packages.txt.$* | xargs go test -mod=readonly -timeout=5m -race -coverprofile=$(BUILDDIR)/$*.profile.out