Skip to content

Commit

Permalink
Remove gaia (cosmos#4347)
Browse files Browse the repository at this point in the history
Gaia is removed from cosmos-sdk repository.

Few changes were required to make sure no packages depend on gaia subpackages.

CI config is amended accordingly.

Unnecessary targets are removed from Makefile.

Simulations run through a lightweight version of gaia renamed to simapp.

Closes: cosmos#4104
  • Loading branch information
Alessio Treglia authored May 18, 2019
1 parent f0b690b commit 71d71f2
Show file tree
Hide file tree
Showing 195 changed files with 291 additions and 13,592 deletions.
234 changes: 31 additions & 203 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,6 @@ defaults: &linux_defaults
docker:
- image: circleci/golang:1.12.5


############
#
# Configure macos integration tests

macos_config: &macos_defaults
macos:
xcode: "10.1.0"
working_directory: /Users/distiller/project/src/github.com/cosmos/cosmos-sdk
environment:
GO_VERSION: "1.12.5"

set_macos_env: &macos_env
run:
name: Set environment
command: |
echo 'export PATH=$PATH:$HOME/go/bin' >> $BASH_ENV
echo 'export GOPATH=$HOME/project' >> $BASH_ENV
echo 'export PATH=$PATH:$HOME/go/bin:$GOPATH/bin' >> $BASH_ENV
echo 'export GO111MODULE=on'
############
#
# Configure docs deployment
Expand All @@ -50,17 +29,20 @@ jobs:
- run:
name: tools
command: |
make tools TOOLS_DESTDIR=/tmp/workspace/bin
make runsim tools TOOLS_DESTDIR=/tmp/workspace/bin
cp $GOPATH/bin/runsim /tmp/workspace/bin
- run:
name: binaries
name: cache go modules
command: |
export PATH=/tmp/workspace/bin:$PATH
make go-mod-cache
make install
- save_cache:
key: go-mod-v1-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
- run:
name: build
command: |
make build
- persist_to_workspace:
root: /tmp/workspace
paths:
Expand All @@ -83,22 +65,7 @@ jobs:
export PATH=/tmp/workspace/bin:$PATH
make ci-lint
integration_tests:
<<: *linux_defaults
parallelism: 1
steps:
- attach_workspace:
at: /tmp/workspace
- checkout
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test cli
command: |
make test_cli
test_sim_gaia_nondeterminism:
test_sim_app_nondeterminism:
<<: *linux_defaults
parallelism: 1
steps:
Expand All @@ -111,9 +78,9 @@ jobs:
- run:
name: Test individual module simulations
command: |
make test_sim_gaia_nondeterminism
make test_sim_app_nondeterminism
test_sim_gaia_fast:
test_sim_app_fast:
<<: *linux_defaults
parallelism: 1
steps:
Expand All @@ -124,11 +91,11 @@ jobs:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test full Gaia simulation
name: Test full application simulation
command: |
make test_sim_gaia_fast
make test_sim_app_fast
test_sim_gaia_import_export:
test_sim_app_import_export:
<<: *linux_defaults
parallelism: 1
steps:
Expand All @@ -139,13 +106,12 @@ jobs:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test Gaia import/export simulation
name: Test application import/export simulation
command: |
export GO111MODULE=on
make runsim
runsim -j 4 50 5 TestGaiaImportExport
/tmp/workspace/bin/runsim -j 4 github.com/cosmos/cosmos-sdk/simapp 50 5 TestAppImportExport
test_sim_gaia_simulation_after_import:
test_sim_app_simulation_after_import:
<<: *linux_defaults
parallelism: 1
steps:
Expand All @@ -156,13 +122,12 @@ jobs:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test Gaia import/export simulation
name: Test application import/export simulation
command: |
export GO111MODULE=on
make runsim
runsim -j 4 50 5 TestGaiaSimulationAfterImport
/tmp/workspace/bin/runsim -j 4 github.com/cosmos/cosmos-sdk/simapp 50 5 TestAppSimulationAfterImport
test_sim_gaia_multi_seed_long:
test_sim_app_multi_seed_long:
<<: *linux_defaults
parallelism: 1
steps:
Expand All @@ -173,13 +138,12 @@ jobs:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test multi-seed Gaia simulation long
name: Test multi-seed application simulation long
command: |
export GO111MODULE=on
make runsim
runsim -j 4 500 50 TestFullGaiaSimulation
/tmp/workspace/bin/runsim -j 4 github.com/cosmos/cosmos-sdk/simapp 500 50 TestFullAppSimulation
test_sim_gaia_multi_seed:
test_sim_app_multi_seed:
<<: *linux_defaults
parallelism: 1
steps:
Expand All @@ -190,11 +154,10 @@ jobs:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test multi-seed Gaia simulation short
name: Test multi-seed application simulation short
command: |
export GO111MODULE=on
make runsim
runsim -j 4 50 10 TestFullGaiaSimulation
/tmp/workspace/bin/runsim -j 4 github.com/cosmos/cosmos-sdk/simapp 50 10 TestFullAppSimulation
test_cover:
<<: *linux_defaults
Expand All @@ -212,7 +175,7 @@ jobs:
command: |
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
for pkg in $(go list ./... | grep -v '/simulation' | circleci tests split --split-by=timings); do
id=$(echo "$pkg" | sed 's|[/.]|_|g')
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
Expand Down Expand Up @@ -253,33 +216,6 @@ jobs:
name: upload
command: bash <(curl -s https://codecov.io/bash) -f coverage.txt

localnet:
working_directory: /home/circleci/.go_workspace/src/github.com/cosmos/cosmos-sdk
machine:
image: circleci/classic:latest
environment:
GOPATH: /home/circleci/.go_workspace/
GOOS: linux
GOARCH: amd64
GO_VERSION: "1.12.5"
parallelism: 1
steps:
- checkout
- run:
name: run localnet and exit on failure
command: |
pushd /tmp
wget https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz
sudo tar -xvf go$GO_VERSION.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo mv go /usr/local
popd
set -x
make tools
make build-linux
make localnet-start
./scripts/localnet-blocks-test.sh 40 5 10 localhost
deploy_docs:
<<: *docs_deploy
steps:
Expand All @@ -304,114 +240,10 @@ jobs:
echo "Website build started"
fi
macos_ci:
<<: *macos_defaults
steps:
- *macos_env
- run:
name: Install go
command: |
source $BASH_ENV
curl -L -O https://dl.google.com/go/go$GO_VERSION.darwin-amd64.tar.gz
tar -C $HOME -xzf go$GO_VERSION.darwin-amd64.tar.gz
rm go$GO_VERSION.darwin-amd64.tar.gz
go version
- checkout
- run:
name: Install SDK
command: |
source $BASH_ENV
make tools
make install
- run:
name: Integration tests
command:
source $BASH_ENV
make test_cli
- run:
name: Test full gaia simulation
command: |
source $BASH_ENV
make test_sim_gaia_fast
docker_image:
<<: *linux_defaults
steps:
- attach_workspace:
at: /tmp/workspace
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run: |
GAIAD_VERSION=''
if [ "${CIRCLE_BRANCH}" = "master" ]; then
GAIAD_VERSION="stable"
elif [ "${CIRCLE_BRANCH}" = "develop" ]; then
GAIAD_VERSION="develop"
fi
if [ -z "${GAIAD_VERSION}" ]; then
docker build .
else
docker build -t tendermint/gaia:$GAIAD_VERSION .
docker login --password-stdin -u $DOCKER_USER <<<$DOCKER_PASS
docker push tendermint/gaia:$GAIAD_VERSION
fi
docker_tagged:
<<: *linux_defaults
steps:
- attach_workspace:
at: /tmp/workspace
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run: |
docker build -t tendermint/gaia:$CIRCLE_TAG .
docker login --password-stdin -u $DOCKER_USER <<<$DOCKER_PASS
docker push tendermint/gaia:$CIRCLE_TAG
reproducible_builds:
<<: *linux_defaults
steps:
- attach_workspace:
at: /tmp/workspace
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Build gaia
no_output_timeout: 20m
command: |
sudo apt-get install -y ruby
bash -x ./cmd/gaia/contrib/gitian-build.sh all
for os in darwin linux windows; do
cp gitian-build-${os}/result/gaia-${os}-res.yml .
rm -rf gitian-build-${os}/
done
- store_artifacts:
path: /go/src/github.com/cosmos/cosmos-sdk/gaia-darwin-res.yml
- store_artifacts:
path: /go/src/github.com/cosmos/cosmos-sdk/gaia-linux-res.yml
- store_artifacts:
path: /go/src/github.com/cosmos/cosmos-sdk/gaia-windows-res.yml

workflows:
version: 2
test-suite:
jobs:
- docker_image:
requires:
- setup_dependencies
- docker_tagged:
filters:
tags:
only:
- /^v.*/
branches:
ignore:
- /.*/
requires:
- setup_dependencies
- macos_ci:
filters:
branches:
Expand All @@ -433,25 +265,22 @@ workflows:
- lint:
requires:
- setup_dependencies
- integration_tests:
requires:
- setup_dependencies
- test_sim_gaia_nondeterminism:
- test_sim_app_nondeterminism:
requires:
- setup_dependencies
- test_sim_gaia_fast:
- test_sim_app_fast:
requires:
- setup_dependencies
- test_sim_gaia_import_export:
- test_sim_app_import_export:
requires:
- setup_dependencies
- test_sim_gaia_simulation_after_import:
- test_sim_app_simulation_after_import:
requires:
- setup_dependencies
- test_sim_gaia_multi_seed:
- test_sim_app_multi_seed:
requires:
- setup_dependencies
- test_sim_gaia_multi_seed_long:
- test_sim_app_multi_seed_long:
requires:
- setup_dependencies
filters:
Expand All @@ -462,7 +291,6 @@ workflows:
- test_cover:
requires:
- setup_dependencies
- localnet
- upload_coverage:
requires:
- test_cover
Expand Down
3 changes: 0 additions & 3 deletions .clog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ sections:
bugfixes: Bugfixes

tags:
- gaia
- gaiacli
- gaiarest
- sdk
- tendermint
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ v Please also ensure that this is not a duplicate issue :)

## Version

<!-- Output from `gaiad version --long` and `gaiacli version --long` -->
<!-- git commit hash -->

## Steps to Reproduce

Expand Down
2 changes: 0 additions & 2 deletions .pending/breaking/gaia/4027-gaiad-and-gaiac

This file was deleted.

1 change: 0 additions & 1 deletion .pending/breaking/gaia/4159-use-module-patt

This file was deleted.

2 changes: 0 additions & 2 deletions .pending/breaking/gaia/4272-Merge-gaiarepla

This file was deleted.

2 changes: 0 additions & 2 deletions .pending/breaking/gaiacli/3715-query-distr-rew

This file was deleted.

2 changes: 0 additions & 2 deletions .pending/breaking/gaiacli/4142-Turn-gaiacli-tx

This file was deleted.

Loading

0 comments on commit 71d71f2

Please sign in to comment.