Skip to content

Commit

Permalink
Trim unused config from circle ci, fix makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed Jul 24, 2020
1 parent 078c8e5 commit 6f747d2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 191 deletions.
119 changes: 0 additions & 119 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@ executors:
docker:
- image: circleci/golang:1.13
working_directory: /go/src/github.com/cosmwasm/wasmd
mac:
macos:
xcode: "10.3.0"
working_directory: /Users/distiller/project/src/github.com/cosmwasm/wasmd
environment:
GO_VERSION: "1.13"
docs:
docker:
- image: tendermintdev/jq_curl
environment:
AWS_REGION: us-east-1


commands:
make:
Expand All @@ -42,15 +30,6 @@ commands:
command: |
export BINDIR=/tmp/bin
make << parameters.target >>
mac_set_env:
steps:
- 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'
jobs:
setup-dependencies:
Expand Down Expand Up @@ -93,19 +72,6 @@ jobs:
paths:
- "."

integration-tests:
executor: golang
steps:
- checkout
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: Test CLI integration
command: |
export BUILDDIR=`pwd`/build
make test-build
test-cover:
executor: golang
parallelism: 4
Expand Down Expand Up @@ -161,33 +127,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/cosmwasm/wasmd
machine:
image: circleci/classic:latest
environment:
GOPATH: /home/circleci/.go_workspace/
GOOS: linux
GOARCH: amd64
GO_VERSION: "1.13"
parallelism: 1
steps:
- checkout
- run:
name: Run a localnet and test liveness
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 clean localnet-start
./contrib/localnet-blocks-test.sh 40 5 10 localhost
docker-image:
executor: golang
steps:
Expand Down Expand Up @@ -225,51 +164,6 @@ jobs:
docker push "cosmwasm/wasmd:${CIRCLE_TAG}"
docker logout
reproducible-builds:
executor: golang
steps:
- attach_workspace:
at: /tmp/workspace
- checkout
- setup_remote_docker
- run:
name: Build gaia
no_output_timeout: 20m
command: |
sudo apt-get install -y ruby
bash -x ./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/cosmwasm/wasmd/gaia-darwin-res.yml
- store_artifacts:
path: /go/src/github.com/cosmwasm/wasmd/gaia-linux-res.yml
- store_artifacts:
path: /go/src/github.com/cosmwasm/wasmd/gaia-windows-res.yml

# FIXME: The `setup-contract-tests-data` make target is broken as it completely
# overrides the .wasmd directory.
#
# contract_tests:
# executor: golang
# steps:
# - attach_workspace:
# at: /tmp/workspace
# - checkout
# - setup_remote_docker:
# docker_layer_caching: true
# - run:
# name: Get Node.js and test REST implementation against swagger documentation at https://cosmos.network/rpc/
# command: |
# go get github.com/snikch/goodman/cmd/goodman
# make build
# make build-contract-tests-hooks
# make setup-contract-tests-data
# export PATH=~/.local/bin:$PATH
# ./contrib/get_node.sh && make contract-tests

workflows:
version: 2
test-suite:
Expand Down Expand Up @@ -298,22 +192,9 @@ workflows:
tags:
only:
- /^v.*/
# - integration-tests:
# requires:
# - setup-dependencies
- test-cover:
requires:
- setup-dependencies
- upload-coverage:
requires:
- test-cover
# - reproducible-builds:
# filters:
# branches:
# only:
# - master
# requires:
# - setup-dependencies
# - contract_tests:
# requires:
# - setup-dependencies
73 changes: 1 addition & 72 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ ldflags := $(strip $(ldflags))

BUILD_FLAGS := -tags $(build_tags_comma_sep) -ldflags '$(ldflags)' -trimpath

# The below include contains the tools target.
include contrib/devtools/Makefile

all: install lint test

build: go.sum
Expand Down Expand Up @@ -92,26 +89,6 @@ install: go.sum
go install -mod=readonly $(BUILD_FLAGS) ./cmd/wasmd
go install -mod=readonly $(BUILD_FLAGS) ./cmd/wasmcli

########################################
### Documentation

build-docs:
@cd docs && \
while read p; do \
(git checkout $${p} && npm install && VUEPRESS_BASE="/$${p}/" npm run build) ; \
mkdir -p ~/output/$${p} ; \
cp -r .vuepress/dist/* ~/output/$${p}/ ; \
cp ~/output/$${p}/index.html ~/output ; \
done < versions ;

sync-docs:
cd ~/output && \
echo "role_arn = ${DEPLOYMENT_ROLE_ARN}" >> /root/.aws/config ; \
echo "CI job = ${CIRCLE_BUILD_URL}" >> version.html ; \
aws s3 sync . s3://${WEBSITE_BUCKET} --profile terraform --delete ; \
aws cloudfront create-invalidation --distribution-id ${CF_DISTRIBUTION_ID} --profile terraform --path "/*" ;
.PHONY: sync-docs

########################################
### Tools & dependencies

Expand Down Expand Up @@ -153,12 +130,6 @@ test-cover:
test-build: build
@go test -mod=readonly -p 4 `go list ./cli_test/...` -tags=cli_test -v


lint: golangci-lint
golangci-lint run
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -d -s
go mod verify

format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gofmt -w -s
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs misspell -w
Expand All @@ -168,48 +139,6 @@ benchmark:
@go test -mod=readonly -bench=. ./...


########################################
### Local validator nodes using docker and docker-compose

build-docker-wasmdnode:
$(MAKE) -C networks/local

# Run a 4-node testnet locally
localnet-start: build-linux localnet-stop
@if ! [ -f build/node0/wasmd/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/wasmd:Z tendermint/wasmdnode testnet --v 4 -o . --starting-ip-address 192.168.10.2 ; fi
docker-compose up -d

# Stop testnet
localnet-stop:
docker-compose down

setup-contract-tests-data:
echo 'Prepare data for the contract tests'
rm -rf /tmp/contract_tests ; \
mkdir /tmp/contract_tests ; \
cp "${GOPATH}/pkg/mod/${SDK_PACK}/client/lcd/swagger-ui/swagger.yaml" /tmp/contract_tests/swagger.yaml ; \
./build/wasmd init --home /tmp/contract_tests/.wasmd --chain-id lcd contract-tests ; \
tar -xzf lcd_test/testdata/state.tar.gz -C /tmp/contract_tests/

start-gaia: setup-contract-tests-data
./build/wasmd --home /tmp/contract_tests/.wasmd start &
@sleep 2s

setup-transactions: start-gaia
@bash ./lcd_test/testdata/setup.sh

run-lcd-contract-tests:
@echo "Running Gaia LCD for contract tests"
./build/wasmcli rest-server --laddr tcp://0.0.0.0:8080 --home /tmp/contract_tests/.wasmcli --node http://localhost:26657 --chain-id lcd --trust-node true

contract-tests: setup-transactions
@echo "Running Gaia LCD for contract tests"
dredd && pkill wasmd

# include simulations
include sims.mk

.PHONY: all build-linux install install-debug \
go-mod-cache draw-deps clean build \
setup-transactions setup-contract-tests-data start-gaia run-lcd-contract-tests contract-tests \
go-mod-cache draw-deps clean build format \
test test-all test-build test-cover test-unit test-race

0 comments on commit 6f747d2

Please sign in to comment.