Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump minimum golang version to v1.20.1 #548

Merged
merged 2 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/lint-tests-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: ["1.18"]
go: ["1.20"]
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
Expand All @@ -55,7 +55,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: "1.20"
- name: Use Node.js
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: "1.20"
- name: Set up arm64 cross compiler
run: |
sudo apt-get -y update
Expand All @@ -108,7 +108,7 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean --debug
aaronbuchwald marked this conversation as resolved.
Show resolved Hide resolved
workdir: ./subnet-evm/
env:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
ARG AVALANCHE_VERSION

# ============= Compilation Stage ================
FROM golang:1.18.5-buster AS builder
FROM golang:1.20.1-buster AS builder
RUN apt-get update && apt-get install -y --no-install-recommends bash=5.0-4 git=1:2.20.1-2+deb10u3 make=4.2.1-1.2 gcc=4:8.3.0-1 musl-dev=1.1.21-2 ca-certificates=20200601~deb10u2 linux-headers-amd64

WORKDIR /build
Expand All @@ -15,7 +15,7 @@ WORKDIR /build
COPY go.mod go.sum avalanchego* ./

# Download avalanche dependencies using go mod
RUN go mod download && go mod tidy -compat=1.18
RUN go mod download && go mod tidy -compat=1.20

# Copy the code into the container
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ To support these changes, there have been a number of changes to the SubnetEVM b

### Clone Subnet-evm

First install Go 1.18.1 or later. Follow the instructions [here](https://golang.org/doc/install). You can verify by running `go version`.
First install Go 1.20.1 or later. Follow the instructions [here](https://golang.org/doc/install). You can verify by running `go version`.

Set `$GOPATH` environment variable properly for Go to look for Go Workspaces. Please read [this](https://go.dev/doc/gopath_code) for details. You can verify by running `echo $GOPATH`.

Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/bind/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2136,7 +2136,7 @@ func golangBindings(t *testing.T, overload bool) {
if out, err := replacer.CombinedOutput(); err != nil {
t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out)
}
tidier := exec.Command(gocmd, "mod", "tidy", "-compat=1.18")
tidier := exec.Command(gocmd, "mod", "tidy", "-compat=1.20")
tidier.Dir = pkg
if out, err := tidier.CombinedOutput(); err != nil {
t.Fatalf("failed to tidy Go module file: %v\n%s", err, out)
Expand Down
2 changes: 1 addition & 1 deletion cmd/simulator/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ava-labs/subnet-evm/cmd/simulator

go 1.18
go 1.20

require (
github.com/ethereum/go-ethereum v1.10.26
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ava-labs/subnet-evm

go 1.18
go 1.20

require (
github.com/VictoriaMetrics/fastcache v1.10.0
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -o errexit
set -o nounset
set -o pipefail

go_version_minimum="1.18.1"
go_version_minimum="1.20.1"

go_version() {
go version | sed -nE -e 's/[^0-9.]+([0-9.]+).+/\1/p'
Expand Down