go.mod: update to Go 1.22+

This also changes workflows to test 1.22 and 1.23 only (refs. https://github.com/nspcc-dev/.github/issues/30).
Fixes #3310.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
Roman Khimov 2024-08-30 15:04:05 +03:00
parent ff979e7ad2
commit dfcff64acb
21 changed files with 21 additions and 27 deletions

View file

@ -156,19 +156,13 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-22.04, windows-2022, macos-12, macos-14] os: [ubuntu-22.04, windows-2022, macos-12, macos-14]
go_versions: [ '1.21', '1.22', '1.23' ] go_versions: [ '1.22', '1.23' ]
exclude: exclude:
# Only latest Go version for Windows and MacOS. # Only latest Go version for Windows and MacOS.
- os: windows-2022
go_versions: '1.21'
- os: windows-2022 - os: windows-2022
go_versions: '1.22' go_versions: '1.22'
- os: macos-12
go_versions: '1.21'
- os: macos-12 - os: macos-12
go_versions: '1.22' go_versions: '1.22'
- os: macos-14
go_versions: '1.21'
- os: macos-14 - os: macos-14
go_versions: '1.22' go_versions: '1.22'
# Exclude latest Go version for Ubuntu as Coverage uses it. # Exclude latest Go version for Ubuntu as Coverage uses it.

View file

@ -51,7 +51,7 @@ NeoGo, `:latest` points to the latest release) or build yourself.
### Building ### Building
Building NeoGo requires Go 1.21+ and `make`: Building NeoGo requires Go 1.22+ and `make`:
``` ```
make make

View file

@ -417,7 +417,7 @@ func initSmartContract(ctx *cli.Context) error {
gm := []byte("module " + contractName + ` gm := []byte("module " + contractName + `
go 1.21 go 1.22
require ( require (
github.com/nspcc-dev/neo-go/pkg/interop ` + ver + ` github.com/nspcc-dev/neo-go/pkg/interop ` + ver + `

View file

@ -353,7 +353,7 @@ require (
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0 github.com/nspcc-dev/neo-go/pkg/interop v0.0.0
) )
replace github.com/nspcc-dev/neo-go/pkg/interop => ` + filepath.Join(wd, "../../pkg/interop") + ` replace github.com/nspcc-dev/neo-go/pkg/interop => ` + filepath.Join(wd, "../../pkg/interop") + `
go 1.21`) go 1.22`)
require.NoError(t, os.WriteFile(filepath.Join(tmpDir, "go.mod"), goMod, os.ModePerm)) require.NoError(t, os.WriteFile(filepath.Join(tmpDir, "go.mod"), goMod, os.ModePerm))
return filename return filename
} }

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/engine module github.com/nspcc-dev/neo-go/examples/engine
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/events module github.com/nspcc-dev/neo-go/examples/events
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/iterator module github.com/nspcc-dev/neo-go/examples/iterator
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/nft module github.com/nspcc-dev/neo-go/examples/nft
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec

View file

@ -1,6 +1,6 @@
module github.com/nspcc-dev/neo-go/examples/nft-nd-nns module github.com/nspcc-dev/neo-go/examples/nft-nd-nns
go 1.21 go 1.22
require ( require (
github.com/nspcc-dev/neo-go v0.102.1-0.20231020181554-d89c8801d689 github.com/nspcc-dev/neo-go v0.102.1-0.20231020181554-d89c8801d689

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/nft-nd module github.com/nspcc-dev/neo-go/examples/nft-nd
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/oracle module github.com/nspcc-dev/neo-go/examples/oracle
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/runtime module github.com/nspcc-dev/neo-go/examples/runtime
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/storage module github.com/nspcc-dev/neo-go/examples/storage
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/timer module github.com/nspcc-dev/neo-go/examples/timer
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/token module github.com/nspcc-dev/neo-go/examples/token
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec

View file

@ -1,6 +1,6 @@
module github.com/nspcc-dev/neo-go/examples/zkp/cubic module github.com/nspcc-dev/neo-go/examples/zkp/cubic
go 1.21 go 1.22
require ( require (
github.com/consensys/gnark v0.10.0 github.com/consensys/gnark v0.10.0

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/zkp/xor module github.com/nspcc-dev/neo-go/examples/zkp/xor
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec

2
go.mod
View file

@ -1,6 +1,6 @@
module github.com/nspcc-dev/neo-go module github.com/nspcc-dev/neo-go
go 1.21 go 1.22
require ( require (
github.com/chzyer/readline v1.5.1 github.com/chzyer/readline v1.5.1

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/internal/examples/oracle module github.com/nspcc-dev/neo-go/internal/examples/oracle
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec

View file

@ -1,3 +1,3 @@
module github.com/nspcc-dev/neo-go/pkg/interop module github.com/nspcc-dev/neo-go/pkg/interop
go 1.21 go 1.22

View file

@ -165,7 +165,7 @@ supportedstandards: []`
// and dependency packages version needed for smart contract compilation. // and dependency packages version needed for smart contract compilation.
verifyGomod = `module verify verifyGomod = `module verify
go 1.21 go 1.22
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231004150345-8849ccde2524 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231004150345-8849ccde2524
` `