From f98885ca9eb9af802fd8073a9852f14ed633fb41 Mon Sep 17 00:00:00 2001 From: Ceyhun Onur Date: Fri, 9 Aug 2024 19:03:52 +0300 Subject: [PATCH 1/3] update min golang --- .github/workflows/ci.yml | 120 +++++++++++++++++++-------------------- Dockerfile | 2 +- RELEASES.md | 2 +- 3 files changed, 62 insertions(+), 62 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a74e2020aa..fbf1601ee1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,13 +7,13 @@ on: workflow_dispatch: inputs: avalanchegoRepo: - description: 'avalanchego github repository' + description: "avalanchego github repository" required: true - default: 'ava-labs/avalanchego' + default: "ava-labs/avalanchego" avalanchegoBranch: - description: 'avalanchego branch' + description: "avalanchego branch" required: true - default: 'master' + default: "master" jobs: lint: @@ -31,7 +31,7 @@ jobs: token: ${{ secrets.AVALANCHE_PAT }} - uses: actions/setup-go@v5 with: - go-version: '~1.21.11' + go-version: "~1.21.12" check-latest: true - name: change avalanchego dep if: ${{ github.event_name == 'workflow_dispatch' }} @@ -62,64 +62,64 @@ jobs: matrix: os: [macos-latest, ubuntu-20.04, ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v4 - - name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} - if: ${{ github.event_name == 'workflow_dispatch' }} - uses: actions/checkout@v4 - with: - repository: ${{ github.event.inputs.avalanchegoRepo }} - ref: ${{ github.event.inputs.avalanchegoBranch }} - path: avalanchego - token: ${{ secrets.AVALANCHE_PAT }} - - uses: actions/setup-go@v5 - with: - go-version: '~1.21.11' - check-latest: true - - name: change avalanchego dep - if: ${{ github.event_name == 'workflow_dispatch' }} - run: | - go mod edit -replace github.com/ava-labs/avalanchego=./avalanchego - go mod tidy - - name: Set timeout on Windows # Windows UT run slower and need a longer timeout - shell: bash - if: matrix.os == 'windows-latest' - run: echo "TIMEOUT=1200s" >> "$GITHUB_ENV" - - run: go mod download - shell: bash - - run: ./scripts/build.sh evm - shell: bash - - run: ./scripts/build_test.sh - shell: bash - env: - TIMEOUT: ${{ env.TIMEOUT }} - - run: ./scripts/coverage.sh - shell: bash + - uses: actions/checkout@v4 + - name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} + if: ${{ github.event_name == 'workflow_dispatch' }} + uses: actions/checkout@v4 + with: + repository: ${{ github.event.inputs.avalanchegoRepo }} + ref: ${{ github.event.inputs.avalanchegoBranch }} + path: avalanchego + token: ${{ secrets.AVALANCHE_PAT }} + - uses: actions/setup-go@v5 + with: + go-version: "~1.21.12" + check-latest: true + - name: change avalanchego dep + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + go mod edit -replace github.com/ava-labs/avalanchego=./avalanchego + go mod tidy + - name: Set timeout on Windows # Windows UT run slower and need a longer timeout + shell: bash + if: matrix.os == 'windows-latest' + run: echo "TIMEOUT=1200s" >> "$GITHUB_ENV" + - run: go mod download + shell: bash + - run: ./scripts/build.sh evm + shell: bash + - run: ./scripts/build_test.sh + shell: bash + env: + TIMEOUT: ${{ env.TIMEOUT }} + - run: ./scripts/coverage.sh + shell: bash avalanchego_e2e: name: AvalancheGo E2E Tests (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-20.04 ] + os: [ubuntu-20.04] steps: - - uses: actions/checkout@v4 - - name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} - if: ${{ github.event_name == 'workflow_dispatch' }} - uses: actions/checkout@v4 - with: - repository: ${{ github.event.inputs.avalanchegoRepo }} - ref: ${{ github.event.inputs.avalanchegoBranch }} - path: avalanchego - token: ${{ secrets.AVALANCHE_PAT }} - - uses: actions/setup-go@v5 - with: - go-version: '~1.21.11' - check-latest: true - - name: Run e2e tests - run: E2E_SERIAL=1 ./scripts/tests.e2e.sh - shell: bash - - name: Upload tmpnet network dir - uses: actions/upload-artifact@v4 - if: always() - with: - name: tmpnet-data - path: ~/.tmpnet/networks/1000 + - uses: actions/checkout@v4 + - name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} + if: ${{ github.event_name == 'workflow_dispatch' }} + uses: actions/checkout@v4 + with: + repository: ${{ github.event.inputs.avalanchegoRepo }} + ref: ${{ github.event.inputs.avalanchegoBranch }} + path: avalanchego + token: ${{ secrets.AVALANCHE_PAT }} + - uses: actions/setup-go@v5 + with: + go-version: "~1.21.12" + check-latest: true + - name: Run e2e tests + run: E2E_SERIAL=1 ./scripts/tests.e2e.sh + shell: bash + - name: Upload tmpnet network dir + uses: actions/upload-artifact@v4 + if: always() + with: + name: tmpnet-data + path: ~/.tmpnet/networks/1000 diff --git a/Dockerfile b/Dockerfile index 128839934d..1807b17666 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # ============= Compilation Stage ================ -FROM golang:1.21.11-bullseye AS builder +FROM golang:1.21.12-bullseye AS builder ARG AVALANCHE_VERSION diff --git a/RELEASES.md b/RELEASES.md index 87d912d3f5..6bab83520a 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -14,7 +14,7 @@ ## [v0.13.5](https://github.com/ava-labs/coreth/releases/tag/v0.13.5) - Bump AvalancheGo to v1.11.7 -- Bump golang version requirement to 1.21.11 +- Bump golang version requirement to 1.21.12 - Switches timestamp log back to "timestamp" (as was before v0.13.4) - Add missing fields to "toCallArg" - Fix state sync ETA overflow From f2a9693305a1c1791bad2c872c55c53ee4c6cf1e Mon Sep 17 00:00:00 2001 From: Ceyhun Onur Date: Fri, 9 Aug 2024 19:05:27 +0300 Subject: [PATCH 2/3] remove build test tag --- core/state/test_statedb.go | 3 --- core/test_blockchain.go | 2 -- internal/blocktest/test_hash.go | 2 -- plugin/evm/test_tx.go | 2 -- precompile/testutils/test_config.go | 2 -- precompile/testutils/test_precompile.go | 2 -- precompile/testutils/test_predicate.go | 2 -- sync/handlers/test_providers.go | 2 -- sync/statesync/test_sync.go | 2 -- sync/syncutils/test_trie.go | 2 -- tests/rlp_test_util.go | 2 -- tests/state_test_util.go | 2 -- warp/warptest/block_client.go | 2 -- 13 files changed, 27 deletions(-) diff --git a/core/state/test_statedb.go b/core/state/test_statedb.go index 41c6345594..dc4d0e582d 100644 --- a/core/state/test_statedb.go +++ b/core/state/test_statedb.go @@ -1,8 +1,5 @@ // (c) 2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. - -//go:build test - package state import ( diff --git a/core/test_blockchain.go b/core/test_blockchain.go index 8d47358361..7c0807b829 100644 --- a/core/test_blockchain.go +++ b/core/test_blockchain.go @@ -1,8 +1,6 @@ // (c) 2020-2021, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -//go:build test - package core import ( diff --git a/internal/blocktest/test_hash.go b/internal/blocktest/test_hash.go index 03abe694cb..014e9ff4b0 100644 --- a/internal/blocktest/test_hash.go +++ b/internal/blocktest/test_hash.go @@ -30,8 +30,6 @@ // standalone go program. It provides an API that mirrors the standard library // testing API. -//go:build test - package blocktest import ( diff --git a/plugin/evm/test_tx.go b/plugin/evm/test_tx.go index 766c97ef0b..c057c874ad 100644 --- a/plugin/evm/test_tx.go +++ b/plugin/evm/test_tx.go @@ -1,8 +1,6 @@ // (c) 2020-2021, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -//go:build test - package evm import ( diff --git a/precompile/testutils/test_config.go b/precompile/testutils/test_config.go index 47787337d0..aee07c4a51 100644 --- a/precompile/testutils/test_config.go +++ b/precompile/testutils/test_config.go @@ -1,8 +1,6 @@ // (c) 2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -//go:build test - package testutils import ( diff --git a/precompile/testutils/test_precompile.go b/precompile/testutils/test_precompile.go index e58e6c691b..a0bc279ff9 100644 --- a/precompile/testutils/test_precompile.go +++ b/precompile/testutils/test_precompile.go @@ -1,8 +1,6 @@ // (c) 2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -//go:build test - package testutils import ( diff --git a/precompile/testutils/test_predicate.go b/precompile/testutils/test_predicate.go index 6e8fdad432..0b28075984 100644 --- a/precompile/testutils/test_predicate.go +++ b/precompile/testutils/test_predicate.go @@ -1,8 +1,6 @@ // (c) 2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -//go:build test - package testutils import ( diff --git a/sync/handlers/test_providers.go b/sync/handlers/test_providers.go index 594bd6a6c8..81dafbfd00 100644 --- a/sync/handlers/test_providers.go +++ b/sync/handlers/test_providers.go @@ -1,8 +1,6 @@ // (c) 2021-2022, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -//go:build test - package handlers import ( diff --git a/sync/statesync/test_sync.go b/sync/statesync/test_sync.go index a9d0dd2ac8..418eb675fd 100644 --- a/sync/statesync/test_sync.go +++ b/sync/statesync/test_sync.go @@ -1,8 +1,6 @@ // (c) 2021-2022, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -//go:build test - package statesync import ( diff --git a/sync/syncutils/test_trie.go b/sync/syncutils/test_trie.go index 47347e36f8..ea1b7eff04 100644 --- a/sync/syncutils/test_trie.go +++ b/sync/syncutils/test_trie.go @@ -1,8 +1,6 @@ // (c) 2021-2022, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -//go:build test - package syncutils import ( diff --git a/tests/rlp_test_util.go b/tests/rlp_test_util.go index 0b229610c6..5af235bc5a 100644 --- a/tests/rlp_test_util.go +++ b/tests/rlp_test_util.go @@ -24,8 +24,6 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -//go:build test - package tests import ( diff --git a/tests/state_test_util.go b/tests/state_test_util.go index cefb55fd80..29e934efe5 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -24,8 +24,6 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -//go:build test - package tests import ( diff --git a/warp/warptest/block_client.go b/warp/warptest/block_client.go index c21dd702d6..6b7354d7fb 100644 --- a/warp/warptest/block_client.go +++ b/warp/warptest/block_client.go @@ -1,8 +1,6 @@ // (c) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -//go:build test - // warptest exposes common functionality for testing the warp package. package warptest From 863b78eb7cf0b42241ccdd566c21e835a29e7b4d Mon Sep 17 00:00:00 2001 From: Ceyhun Onur Date: Fri, 9 Aug 2024 19:06:42 +0300 Subject: [PATCH 3/3] remove test build tag --- scripts/build_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_test.sh b/scripts/build_test.sh index 07d35dd45b..c62dc95789 100755 --- a/scripts/build_test.sh +++ b/scripts/build_test.sh @@ -15,4 +15,4 @@ source "$CORETH_PATH"/scripts/constants.sh # We pass in the arguments to this script directly to enable easily passing parameters such as enabling race detection, # parallelism, and test coverage. -go test -tags test -shuffle=on -race -timeout="${TIMEOUT:-600s}" -coverprofile=coverage.out -covermode=atomic ./... "$@" +go test -shuffle=on -race -timeout="${TIMEOUT:-600s}" -coverprofile=coverage.out -covermode=atomic ./... "$@"