diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml deleted file mode 100644 index a647c16..0000000 --- a/.github/workflows/e2e-test.yml +++ /dev/null @@ -1,136 +0,0 @@ -name: E2E Test -on: - pull_request: - branches: - - main - - release/** - push: - branches: - - release/** -permissions: read-all - -jobs: - test-e2e: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v5 - with: - go-version: '1.22' - check-latest: true - - uses: actions/checkout@v4 - - uses: technote-space/get-diff-action@v6.1.2 - with: - PATTERNS: | - go.mod - go.sum - **/*.go - *.toml - tests/e2e/* - Dockerfile - .github/workflows/e2e-test* - - name: Test E2E - run: | - make test-e2e - if: env.GIT_DIFF - test-files-matrix: - runs-on: ubuntu-latest - outputs: - test_matrix: ${{ steps.set_matrix.outputs.test_matrix }} - steps: - - uses: actions/checkout@v4 - - name: Set up test file matrix to run nix tests in parallel - id: set_matrix - run: | - cd ./tests/nix_tests || exit 1 - - # Define parallel test files - PARALLEL_TESTS=( - "test_account.py" - "test_distr_precompile.py" - "test_filters.py" - "test_fee_history.py" - "test_grpc_only.py" - "test_ibc.py" - "test_ics20_precompile.py" - "test_no_abci_resp.py" - "test_precompiles.py" - "test_str_v2.py" - "test_str_v2_token_factory.py" - "test_priority.py" - "test_pruned_node.py" - "test_rollback.py" - "test_storage_proof.py" - "test_zero_fee.py" - ) - - # Get all test files - # shellcheck disable=SC2207 - ALL_FILES=($(ls test_*.py)) - - # Determine remaining test files - # (the test files that will run all together in one process) - REMAINING_FILES=() - for file in "${ALL_FILES[@]}"; do - if [[ ! " ${PARALLEL_TESTS[*]} " =~ $file ]]; then - REMAINING_FILES+=("$file") - fi - done - - # Construct test matrix - # shellcheck disable=SC2076,SC2124,SC2048,SC2086,SC2089,SC2027 - TEST_FILES="[$(printf '"%s",' ${PARALLEL_TESTS[*]}) \"${REMAINING_FILES[*]}\"]" - echo "test_matrix=${TEST_FILES}" >> "$GITHUB_OUTPUT" - echo "Test matrix: ${TEST_FILES}" - test-nix: - needs: test-files-matrix - permissions: - contents: write - runs-on: ubuntu-latest - strategy: - matrix: - test_files: ${{fromJson(needs.test-files-matrix.outputs.test_matrix)}} - steps: - - name: Determine token - id: token_check - run: | - if [ -n "${{ secrets.E2E_PAT }}" ]; then - TOKEN=${{ secrets.E2E_PAT }} - else - TOKEN=${{ secrets.GITHUB_TOKEN }} - fi - echo "token=${TOKEN}" >> "$GITHUB_OUTPUT" - - uses: actions/checkout@v4 - with: - token: ${{ steps.token_check.outputs.token }} - - name: Install Nix - uses: cachix/install-nix-action@V27 - with: - install_url: https://releases.nixos.org/nix/nix-2.13.3/install - nix_path: nixpkgs=channel:nixos-22.11 - extra_nix_config: | - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - name: Setup Cachix - uses: cachix/cachix-action@v15 - with: - name: evmosd - authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - - uses: technote-space/get-diff-action@v6.1.2 - with: - PATTERNS: | - **/**.sol - **/**.go - go.mod - go.sum - *.toml - tests/nix_tests/** - .github/workflows/e2e-test* - - name: Run nix tests - env: - ARGS: "${{ matrix.test_files }}" - run: make run-nix-tests - if: env.GIT_DIFF - # Commit gomod2nix changes files back to the repository if necessary - - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: update gomod2nix.toml file - file_pattern: '*.toml' diff --git a/Makefile b/Makefile index bf50893..702d795 100644 --- a/Makefile +++ b/Makefile @@ -2,32 +2,11 @@ PACKAGES_NOSIMULATION=$(shell go list ./... | grep -v '/simulation') VERSION ?= $(shell echo $(shell git describe --tags --always) | sed 's/^v//') -TMVERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::') COMMIT := $(shell git log -1 --format='%H') -LEDGER_ENABLED ?= true -BINDIR ?= $(GOPATH)/bin -EVMOS_BINARY = evmosd -EVMOS_DIR = evmos BUILDDIR ?= $(CURDIR)/build -HTTPS_GIT := https://github.com/evmos/evmos.git -DOCKER := $(shell which docker) -DOCKER_BUILDKIT=1 -DOCKER_ARGS= -ifdef GITHUB_TOKEN - ifneq ($(strip $(GITHUB_TOKEN)),) - DOCKER_ARGS += --secret id=GITHUB_TOKEN - endif -endif -NAMESPACE := tharsishq -PROJECT := evmos -DOCKER_IMAGE := $(NAMESPACE)/$(PROJECT) -COMMIT_HASH := $(shell git rev-parse --short=7 HEAD) +HTTPS_GIT := https://github.com/evmos/os.git DOCKER_TAG := $(COMMIT_HASH) -# e2e env -MOUNT_PATH := $(shell pwd)/build/:/root/ -E2E_SKIP_CLEANUP := false -ROCKSDB_VERSION ?= "9.2.1" -# Deps +# Deps for Proto and Swagger generation DEPS_COSMOS_SDK_VERSION := $(shell cat go.sum | grep 'github.com/evmos/cosmos-sdk' | grep -v -e 'go.mod' | tail -n 1 | awk '{ print $$2; }') DEPS_IBC_GO_VERSION := $(shell cat go.sum | grep 'github.com/cosmos/ibc-go' | grep -v -e 'go.mod' | tail -n 1 | awk '{ print $$2; }') DEPS_COSMOS_PROTO := $(shell cat go.sum | grep 'github.com/cosmos/cosmos-proto' | grep -v -e 'go.mod' | tail -n 1 | awk '{ print $$2; }') @@ -41,99 +20,6 @@ default_target: all .PHONY: default_target -# process build tags - -build_tags = netgo -ifeq ($(LEDGER_ENABLED),true) - ifeq ($(OS),Windows_NT) - GCCEXE = $(shell where gcc.exe 2> NUL) - ifeq ($(GCCEXE),) - $(error gcc.exe not installed for ledger support, please install or set LEDGER_ENABLED=false) - else - build_tags += ledger - endif - else - UNAME_S = $(shell uname -s) - ifeq ($(UNAME_S),OpenBSD) - $(warning OpenBSD detected, disabling ledger support (https://github.com/cosmos/cosmos-sdk/issues/1988)) - else - GCC = $(shell command -v gcc 2> /dev/null) - ifeq ($(GCC),) - $(error gcc not installed for ledger support, please install or set LEDGER_ENABLED=false) - else - build_tags += ledger - endif - endif - endif -endif - -ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS))) - build_tags += gcc -endif -build_tags += $(BUILD_TAGS) -build_tags := $(strip $(build_tags)) - -# process linker flags - -ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=evmos \ - -X github.com/cosmos/cosmos-sdk/version.AppName=$(EVMOS_BINARY) \ - -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ - -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ - -X github.com/cometbft/cometbft/version.TMCoreSemVer=$(TMVERSION) - -# DB backend selection -ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS))) - ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb -endif -ifeq (badgerdb,$(findstring badgerdb,$(COSMOS_BUILD_OPTIONS))) - ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=badgerdb -endif -# handle rocksdb -ifeq (rocksdb,$(findstring rocksdb,$(COSMOS_BUILD_OPTIONS))) - CGO_ENABLED=1 - build_tags += rocksdb grocksdb_no_link - VERSION := $(VERSION)-rocksdb - ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=rocksdb -endif -# handle boltdb -ifeq (boltdb,$(findstring boltdb,$(COSMOS_BUILD_OPTIONS))) - build_tags += boltdb - ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=boltdb -endif -# handle pebbledb -ifeq (pebbledb,$(findstring pebbledb,$(COSMOS_BUILD_OPTIONS))) - build_tags += pebbledb - VERSION := $(VERSION)-pebbledb - ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb -endif - -# add build tags to linker flags -whitespace := $(subst ,, ) -comma := , -build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags)) -ldflags += -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" - -ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS))) - ldflags += -w -s -endif -ldflags += $(LDFLAGS) -ldflags := $(strip $(ldflags)) - -BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)' -# check for nostrip option -ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS))) - BUILD_FLAGS += -trimpath -endif - -# check if no optimization option is passed -# used for remote debugging -ifneq (,$(findstring nooptimization,$(COSMOS_BUILD_OPTIONS))) - BUILD_FLAGS += -gcflags "all=-N -l" -endif - -# # The below include contains the tools and runsim targets. -# include contrib/devtools/Makefile - ############################################################################### ### Tools & Dependencies ### ############################################################################### @@ -147,14 +33,6 @@ vulncheck: $(BUILDDIR)/ GOBIN=$(BUILDDIR) go install golang.org/x/vuln/cmd/govulncheck@latest $(BUILDDIR)/govulncheck ./... -############################################################################### -### Documentation ### -############################################################################### - -godocs: - @echo "--> Wait a few seconds and visit http://localhost:6060/pkg/github.com/evmos/os" - godoc -http=:6060 - ############################################################################### ### Tests & Simulation ### ###############################################################################