Skip to content

Commit

Permalink
Merge PR cosmos#4036: Release v0.34.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzampolin authored Apr 15, 2019
2 parents f6985c8 + 0f7877c commit 7cb3422
Show file tree
Hide file tree
Showing 287 changed files with 10,206 additions and 4,204 deletions.
104 changes: 77 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
defaults: &linux_defaults
working_directory: /go/src/github.com/cosmos/cosmos-sdk
docker:
- image: circleci/golang:1.11.5
- image: circleci/golang:1.12.1
environment:
GOBIN: /tmp/workspace/bin

Expand All @@ -17,7 +17,7 @@ macos_config: &macos_defaults
xcode: "10.1.0"
working_directory: /Users/distiller/project/src/github.com/cosmos/cosmos-sdk
environment:
GO_VERSION: "1.11.5"
GO_VERSION: "1.12.1"

set_macos_env: &macos_env
run:
Expand All @@ -27,6 +27,7 @@ set_macos_env: &macos_env
echo 'export GOPATH=$HOME/project' >> $BASH_ENV
echo 'export GOBIN=$GOPATH/bin' >> $BASH_ENV
echo 'export PATH=$PATH:$HOME/go/bin:$GOBIN' >> $BASH_ENV
echo 'export GO111MODULE=on'
############
#
Expand All @@ -35,7 +36,7 @@ set_macos_env: &macos_env
docs_update: &docs_deploy
working_directory: ~/repo
docker:
- image: tendermint/docs_deployment
- image: tendermintdev/jq_curl
environment:
AWS_REGION: us-east-1

Expand All @@ -44,7 +45,6 @@ deps: &dependencies
name: dependencies
command: |
export PATH="$GOBIN:$PATH"
make vendor-deps
jobs:
setup_dependencies:
Expand All @@ -53,6 +53,9 @@ jobs:
- run: mkdir -p /tmp/workspace/bin
- run: mkdir -p /tmp/workspace/profiles
- checkout
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: tools
command: |
Expand All @@ -63,7 +66,12 @@ jobs:
name: binaries
command: |
export PATH="$GOBIN:$PATH"
make go-mod-cache
make install
- save_cache:
key: go-mod-v1-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
- persist_to_workspace:
root: /tmp/workspace
paths:
Expand All @@ -78,17 +86,14 @@ jobs:
at: /tmp/workspace
- checkout
- *dependencies
- run:
name: Get metalinter
command: |
export PATH="$GOBIN:$PATH"
make devtools-clean
make devtools
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Lint source
command: |
export PATH="$GOBIN:$PATH"
make test_lint
make ci-lint
integration_tests:
<<: *linux_defaults
Expand All @@ -98,6 +103,9 @@ jobs:
at: /tmp/workspace
- checkout
- *dependencies
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test cli
command: |
Expand All @@ -112,6 +120,9 @@ jobs:
at: /tmp/workspace
- checkout
- *dependencies
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test individual module simulations
command: |
Expand All @@ -126,6 +137,9 @@ jobs:
at: /tmp/workspace
- checkout
- *dependencies
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test full Gaia simulation
command: |
Expand All @@ -140,6 +154,9 @@ jobs:
at: /tmp/workspace
- checkout
- *dependencies
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test Gaia import/export simulation
command: |
Expand All @@ -154,6 +171,9 @@ jobs:
at: /tmp/workspace
- checkout
- *dependencies
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test Gaia import/export simulation
command: |
Expand All @@ -168,10 +188,14 @@ jobs:
at: /tmp/workspace
- checkout
- *dependencies
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test multi-seed Gaia simulation long
command: |
export PATH="$GOBIN:$PATH"
export GO111MODULE=on
scripts/multisim.sh 500 50 TestFullGaiaSimulation
test_sim_gaia_multi_seed:
Expand All @@ -182,10 +206,14 @@ jobs:
at: /tmp/workspace
- checkout
- *dependencies
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test multi-seed Gaia simulation short
command: |
export PATH="$GOBIN:$PATH"
export GO111MODULE=on
scripts/multisim.sh 50 10 TestFullGaiaSimulation
test_cover:
Expand All @@ -197,14 +225,18 @@ jobs:
- checkout
- *dependencies
- run: mkdir -p /tmp/logs
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Run tests
command: |
export PATH="$GOBIN:$PATH"
export VERSION="$(git describe --tags --long | sed 's/v\(.*\)/\1/')"
export GO111MODULE=on
for pkg in $(go list ./... | grep -v github.com/cosmos/cosmos-sdk/cmd/gaia/cli_test | grep -v '/simulation' | circleci tests split --split-by=timings); do
id=$(echo "$pkg" | sed 's|[/.]|_|g')
GOCACHE=off go test -timeout 8m -race -coverprofile=/tmp/workspace/profiles/$id.out -covermode=atomic -tags='ledger test_ledger_mock' "$pkg" | tee "/tmp/logs/$id-$RANDOM.log"
go test -mod=readonly -timeout 8m -race -coverprofile=/tmp/workspace/profiles/$id.out -covermode=atomic -tags='ledger test_ledger_mock' "$pkg" | tee "/tmp/logs/$id-$RANDOM.log"
done
- persist_to_workspace:
root: /tmp/workspace
Expand Down Expand Up @@ -253,7 +285,7 @@ jobs:
GOPATH: /home/circleci/.go_workspace/
GOOS: linux
GOARCH: amd64
GO_VERSION: "1.11.5"
GO_VERSION: "1.12.1"
parallelism: 1
steps:
- checkout
Expand All @@ -268,7 +300,6 @@ jobs:
popd
set -x
make tools
make vendor-deps
make build-linux
make localnet-start
./scripts/localnet-blocks-test.sh 40 5 10 localhost
Expand All @@ -280,7 +311,22 @@ jobs:
- run:
name: Trigger website build
command: |
chamber exec cosmos-sdk -- start_website_build
curl --silent \
--show-error \
-X POST \
--header "Content-Type: application/json" \
-d "{\"branch\": \"$CIRCLE_BRANCH\"}" \
"https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$WEBSITE_REPO_NAME/build?circle-token=$TENDERBOT_API_TOKEN" > response.json
RESULT=`jq -r '.status' response.json`
MESSAGE=`jq -r '.message' response.json`
if [[ ${RESULT} == "null" ]] || [[ ${RESULT} -ne "200" ]]; then
echo "CircleCI API call failed: $MESSAGE"
exit 1
else
echo "Website build started"
fi
macos_ci:
<<: *macos_defaults
Expand All @@ -300,7 +346,6 @@ jobs:
command: |
source $BASH_ENV
make tools
make vendor-deps
make install
- run:
name: Integration tests
Expand All @@ -322,14 +367,19 @@ jobs:
- setup_remote_docker:
docker_layer_caching: true
- run: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
GAIAD_VERSION=''
if [ "${CIRCLE_BRANCH}" = "master" ]; then
GAIAD_VERSION="stable"
elif [ "${CIRCLE_BRANCH}" == "develop" ]; then
elif [ "${CIRCLE_BRANCH}" = "develop" ]; then
GAIAD_VERSION="develop"
fi
docker build -t tendermint/gaia:$GAIAD_VERSION .
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push tendermint/gaia:$GAIAD_VERSION
if [ -z "${GAIAD_VERSION}" ]; then
docker build .
else
docker build -t tendermint/gaia:$GAIAD_VERSION .
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker push tendermint/gaia:$GAIAD_VERSION
fi
docker_tagged:
<<: *linux_defaults
Expand All @@ -349,11 +399,6 @@ workflows:
test-suite:
jobs:
- docker_image:
filters:
branches:
only:
- master
- develop
requires:
- setup_dependencies
- docker_tagged:
Expand All @@ -378,7 +423,12 @@ workflows:
only:
- master
- develop
- setup_dependencies
- setup_dependencies:
# filters here are needed to enable this job also for tags
filters:
tags:
only:
- /^v.*/
- lint:
requires:
- setup_dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ v If a checkbox is n/a - please still include it but + a little note why
- [ ] Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Wrote tests
- [ ] Updated relevant documentation (`docs/`)
- [ ] Added entries in `PENDING.md` with issue #
- [ ] Added a relevant changelog entry: `sdkch add [section] [stanza] [message]`
- [ ] rereviewed `Files changed` in the github PR explorer

______
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@
*.swn
.vscode
.idea
*.pyc

# Build
vendor
vendor-deps
.vendor-new
build
tools/bin/*
examples/build/*
docs/_build
docs/tutorial
dist
devtools-stamp
tools-stamp

# Data - ideally these don't exist
baseapp/data/*
Expand Down
17 changes: 17 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
linters:
disable-all: true
enable:
- errcheck
- golint
- ineffassign
- unconvert
- misspell
linters-settings:
gocyclo:
min-complexity: 11
errcheck:
ignore: fmt:.*,io/ioutil:^Read.*,github.com/spf13/cobra:MarkFlagRequired,github.com/spf13/viper:BindPFlag
golint:
min-confidence: 1.1
run:
tests: false
Loading

0 comments on commit 7cb3422

Please sign in to comment.