From 09154c5be052fc0a6aac80d82e902fcaec9d09a6 Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Thu, 23 Mar 2023 10:19:07 +0700 Subject: [PATCH] Go 1.18 drop (#7159) --- .github/workflows/ci.yml | 49 +++++++++++++--------------------------- Makefile | 4 ++-- README.md | 4 ++-- go.mod | 4 ++-- go.sum | 4 ++-- wmake.ps1 | 2 +- 6 files changed, 25 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ab2ed2dc..db128823c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,25 +28,16 @@ jobs: os: [ ubuntu-20.04, macos-11 ] # list of os: https://github.com/actions/virtual-environments runs-on: ${{ matrix.os }} - steps: + steps: - uses: actions/checkout@v3 - run: git submodule update --init --recursive --force - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: 1.19.x + go-version: '1.19' - name: Install dependencies on Linux if: runner.os == 'Linux' run: sudo apt update && sudo apt install build-essential - - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/Library/Caches/go-build - ~/go/pkg/mod - key: go-${{ matrix.os }}-${{ hashFiles('**/go.sum') }} - restore-keys: go-${{ matrix.os }}- - - name: Build run: make all @@ -69,8 +60,8 @@ jobs: - name: Test run: make test -# - name: Test HistoryV3 -# run: make test3 + # - name: Test HistoryV3 + # run: make test3 tests-windows: if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} @@ -79,12 +70,12 @@ jobs: os: [ windows-2022 ] runs-on: ${{ matrix.os }} - steps: + steps: - uses: actions/checkout@v3 - run: git submodule update --init --recursive --force - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: 1.19.x + go-version: '1.19' - uses: actions/cache@v3 with: @@ -97,14 +88,6 @@ jobs: choco upgrade mingw -y --no-progress --version 11.2.0.07112021 choco install cmake -y --no-progress --version 3.23.1 - - uses: actions/cache@v3 - with: - path: | - ~\AppData\Local\go-build - ~\go\pkg\mod - key: go-${{ matrix.os }}-${{ hashFiles('**/go.sum') }} - restore-keys: go-${{ matrix.os }}- - - name: Build run: .\wmake.ps1 all @@ -129,11 +112,11 @@ jobs: run: sudo DOCKER_TAG=thorax/erigon:ci-$GITHUB_SHA DOCKER_UID=$(id -u) DOCKER_GID=$(id -g) make docker automated-tests: - runs-on: - ubuntu-20.04 - if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} - steps: - - uses: actions/checkout@v3 - - - name: run automated testing - run: BUILD_ERIGON=1 ./tests/automated-testing/run.sh + runs-on: + ubuntu-20.04 + if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} + steps: + - uses: actions/checkout@v3 + + - name: run automated testing + run: BUILD_ERIGON=1 ./tests/automated-testing/run.sh diff --git a/Makefile b/Makefile index 3b7f3aa0a..b7312e0e3 100644 --- a/Makefile +++ b/Makefile @@ -42,8 +42,8 @@ default: all ## go-version: print and verify go version go-version: - @if [ $(shell $(GO) version | cut -c 16-17) -lt 18 ]; then \ - echo "minimum required Golang version is 1.18"; \ + @if [ $(shell $(GO) version | cut -c 16-17) -lt 19 ]; then \ + echo "minimum required Golang version is 1.19"; \ exit 1 ;\ fi diff --git a/README.md b/README.md index 0b2f698b8..8ce99254b 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Bear in mind that SSD performance deteriorates when close to capacity. RAM: >=16GB, 64-bit architecture. -[Golang version >= 1.18](https://golang.org/doc/install); GCC 10+ or Clang; On Linux: kernel > v4 +[Golang version >= 1.19](https://golang.org/doc/install); GCC 10+ or Clang; On Linux: kernel > v4 🔬 more details on disk storage [here](https://erigon.substack.com/p/disk-footprint-changes-in-new-erigon?s=r) and [here](https://ledgerwatch.github.io/turbo_geth_release.html#Disk-space). @@ -202,7 +202,7 @@ Windows users may run erigon in 3 possible ways: build on windows : * [Git](https://git-scm.com/downloads) for Windows must be installed. If you're cloning this repository is very likely you already have it - * [GO Programming Language](https://golang.org/dl/) must be installed. Minimum required version is 1.18 + * [GO Programming Language](https://golang.org/dl/) must be installed. Minimum required version is 1.19 * GNU CC Compiler at least version 10 (is highly suggested that you install `chocolatey` package manager - see following point) * If you need to build MDBX tools (i.e. `.\wmake.ps1 db-tools`) diff --git a/go.mod b/go.mod index b2a7f454b..b89ed2bd0 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/ledgerwatch/erigon -go 1.18 +go 1.19 require ( - github.com/ledgerwatch/erigon-lib v0.0.0-20230322070724-03ec6600f1e3 + github.com/ledgerwatch/erigon-lib v0.0.0-20230322093023-a96278eab6af github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230306083105-1391330d62a3 github.com/ledgerwatch/log/v3 v3.7.0 github.com/ledgerwatch/secp256k1 v1.0.0 diff --git a/go.sum b/go.sum index 1e9a1dd61..7030ebbf2 100644 --- a/go.sum +++ b/go.sum @@ -519,8 +519,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758 h1:0D5M2HQSGD3PYPwICLl+/9oulQauOuETfgFvhBDffs0= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/ledgerwatch/erigon-lib v0.0.0-20230322070724-03ec6600f1e3 h1:lYaUIn8v3LeV85Z0QUJuyJZZvMbmbud7ERwiC9NQDp8= -github.com/ledgerwatch/erigon-lib v0.0.0-20230322070724-03ec6600f1e3/go.mod h1:I+1Oys00tH9C8Ow1u5atjh3XasMPE4VoAG5lq8Bi1Zs= +github.com/ledgerwatch/erigon-lib v0.0.0-20230322093023-a96278eab6af h1:uZlF8RSPFcT1zlT15k8+7bCiz4HxETNWslQCc7gC5ws= +github.com/ledgerwatch/erigon-lib v0.0.0-20230322093023-a96278eab6af/go.mod h1:y8BVxpDgTzPDyodwGtXfBA4l7h3GOoivdSMHWBDoChw= github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230306083105-1391330d62a3 h1:tfzawK1gIIgRjVZeANXOr0Ziu+kqCIBuKMe0TXfl5Aw= github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230306083105-1391330d62a3/go.mod h1:3AuPxZc85jkehh/HA9h8gabv5MSi3kb/ddtzBsTVJFo= github.com/ledgerwatch/log/v3 v3.7.0 h1:aFPEZdwZx4jzA3+/Pf8wNDN5tCI0cIolq/kfvgcM+og= diff --git a/wmake.ps1 b/wmake.ps1 index 6724d4ed6..7034dc122 100644 --- a/wmake.ps1 +++ b/wmake.ps1 @@ -405,7 +405,7 @@ if (!Test-Path -Path [string](Join-Path $MyContext.Directory "\.git") -PathType if(!(Test-Git-Installed)) { exit 1 } ## Test GO language is installed AND min version -if(!(Test-GO-Installed "1.18")) { exit 1 } +if(!(Test-GO-Installed "1.19")) { exit 1 } # Build erigon binaries Set-Variable -Name "Erigon" -Value ([hashtable]::Synchronized(@{})) -Scope Script