Skip to content

Commit

Permalink
Set minimum golang version to go1.19.6 (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-ogrady authored Mar 1, 2023
1 parent 03c6f3b commit 67a5db7
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 16 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/lint-tests-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ jobs:
args: --timeout 3m

unit_test:
name: Golang Unit Tests v${{ matrix.go }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: ["1.20"]
os: [ubuntu-20.04]
name: Golang Unit Tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
go-version: "1.19"
- run: go mod download
shell: bash
- run: ./scripts/build.sh ./build/subnetevm
Expand All @@ -55,7 +51,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.19"
- name: Use Node.js
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -85,7 +81,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.19"
- name: Set up arm64 cross compiler
run: |
sudo apt-get -y update
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.20.1-buster AS builder
FROM golang:1.19.6-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.20
RUN go mod download && go mod tidy -compat=1.19

# 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.20.1 or later. Follow the instructions [here](https://golang.org/doc/install). You can verify by running `go version`.
First install Go 1.19.6 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.20")
tidier := exec.Command(gocmd, "mod", "tidy", "-compat=1.19")
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.20
go 1.19

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.20
go 1.19

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.20.1"
go_version_minimum="1.19.6"

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

0 comments on commit 67a5db7

Please sign in to comment.