From 13fb2fb2ec7581ad7c44454249a5e22573bc18f1 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 13 Jan 2024 17:00:04 +0000 Subject: [PATCH] build: update to go1.22rc1 and make go1.20 the minimum required version --- .github/workflows/build.yml | 30 +++++++++++++++--------------- fs/versioncheck.go | 8 ++++---- go.mod | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f2b3a0bd2..41dd9c41d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,12 +27,12 @@ jobs: strategy: fail-fast: false matrix: - job_name: ['linux', 'linux_386', 'mac_amd64', 'mac_arm64', 'windows', 'other_os', 'go1.19', 'go1.20'] + job_name: ['linux', 'linux_386', 'mac_amd64', 'mac_arm64', 'windows', 'other_os', 'go1.20', 'go1.21'] include: - job_name: linux os: ubuntu-latest - go: '1.21' + go: '>=1.22.0-rc.1' gotags: cmount build_flags: '-include "^linux/"' check: true @@ -43,14 +43,14 @@ jobs: - job_name: linux_386 os: ubuntu-latest - go: '1.21' + go: '>=1.22.0-rc.1' goarch: 386 gotags: cmount quicktest: true - job_name: mac_amd64 os: macos-11 - go: '1.21' + go: '>=1.22.0-rc.1' gotags: 'cmount' build_flags: '-include "^darwin/amd64" -cgo' quicktest: true @@ -59,14 +59,14 @@ jobs: - job_name: mac_arm64 os: macos-11 - go: '1.21' + go: '>=1.22.0-rc.1' gotags: 'cmount' build_flags: '-include "^darwin/arm64" -cgo -macos-arch arm64 -cgo-cflags=-I/usr/local/include -cgo-ldflags=-L/usr/local/lib' deploy: true - job_name: windows os: windows-latest - go: '1.21' + go: '>=1.22.0-rc.1' gotags: cmount cgo: '0' build_flags: '-include "^windows/"' @@ -76,23 +76,23 @@ jobs: - job_name: other_os os: ubuntu-latest - go: '1.21' + go: '>=1.22.0-rc.1' build_flags: '-exclude "^(windows/|darwin/|linux/)"' compile_all: true deploy: true - - job_name: go1.19 - os: ubuntu-latest - go: '1.19' - quicktest: true - racequicktest: true - - job_name: go1.20 os: ubuntu-latest go: '1.20' quicktest: true racequicktest: true + - job_name: go1.21 + os: ubuntu-latest + go: '1.21' + quicktest: true + racequicktest: true + name: ${{ matrix.job_name }} runs-on: ${{ matrix.os }} @@ -243,7 +243,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '>=1.22.0-rc.1' check-latest: true - name: Install govulncheck @@ -268,7 +268,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '>=1.22.0-rc.1' - name: Go module cache uses: actions/cache@v3 diff --git a/fs/versioncheck.go b/fs/versioncheck.go index afa274c92..263d31013 100644 --- a/fs/versioncheck.go +++ b/fs/versioncheck.go @@ -1,8 +1,8 @@ -//go:build !go1.19 -// +build !go1.19 +//go:build !go1.20 +// +build !go1.20 package fs -// Upgrade to Go version 1.19 to compile rclone - latest stable go +// Upgrade to Go version 1.20 to compile rclone - latest stable go // compiler recommended. -func init() { Go_version_1_19_required_for_compilation() } +func init() { Go_version_1_20_required_for_compilation() } diff --git a/go.mod b/go.mod index f2c9e7fad..51f828948 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/rclone/rclone -go 1.19 +go 1.20 require ( bazil.org/fuse v0.0.0-20230120002735-62a210ff1fd5