From 6f747d29a735ee3c3088089c2efc2d6e5ac5e2f3 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Fri, 24 Jul 2020 21:54:39 +0200 Subject: [PATCH] Trim unused config from circle ci, fix makefile --- .circleci/config.yml | 119 ------------------------------------------- Makefile | 73 +------------------------- 2 files changed, 1 insertion(+), 191 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 132b18f67e..2e0a364fe6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: @@ -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: @@ -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 @@ -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: @@ -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: @@ -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 diff --git a/Makefile b/Makefile index c123cdb930..0a5d351e1a 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 @@ -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 @@ -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