From 40da936c5904f6353e37ea33be151cb490b11cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 14 Aug 2024 10:12:19 +0100 Subject: [PATCH] internal/ci: test and release with Go 1.23.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that the stable version is out. Also drop the TODO mention of tool version tracking support in Go 1.22; it hasn't even happened yet in master for 1.24. Signed-off-by: Daniel Martí Change-Id: Icb528e9996d48aa7d5524a0b8fa4468afc0a7be3 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1199477 Unity-Result: CUE porcuepine Reviewed-by: Matthew Sackman TryBot-Result: CUEcueckoo --- .github/workflows/release.yml | 2 +- .github/workflows/trybot.yml | 18 +++++++++--------- internal/_e2e/script_test.go | 2 +- internal/ci/repo/repo.cue | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13736700c78..843fc8a96bb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,7 +57,7 @@ jobs: uses: actions/setup-go@v5 with: cache: false - go-version: 1.22.5 + go-version: 1.23.0 - name: Setup qemu uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx diff --git a/.github/workflows/trybot.yml b/.github/workflows/trybot.yml index cba2a466b6d..2bc0a365331 100644 --- a/.github/workflows/trybot.yml +++ b/.github/workflows/trybot.yml @@ -18,7 +18,7 @@ jobs: matrix: go-version: - 1.22.x - - 1.23.0-rc.2 + - 1.23.x runner: - ubuntu-22.04 - macos-14 @@ -101,18 +101,18 @@ jobs: github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, ' Dispatch-Trailer: {"type":"')))) || github.ref == 'refs/heads/ci/test') run: go clean -testcache - - if: (matrix.go-version == '1.23.0-rc.2' && matrix.runner == 'ubuntu-22.04') + - if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04') name: Early git and code sanity checks run: go run ./internal/ci/checks - - if: (matrix.go-version == '1.23.0-rc.2' && matrix.runner == 'ubuntu-22.04') + - if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04') name: Generate run: go generate ./... - if: |- ((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, ' - Dispatch-Trailer: {"type":"')))) || !(matrix.go-version == '1.23.0-rc.2' && matrix.runner == 'ubuntu-22.04') + Dispatch-Trailer: {"type":"')))) || !(matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04') name: Test run: go test ./... - - if: (matrix.go-version == '1.23.0-rc.2' && matrix.runner == 'ubuntu-22.04') + - if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04') name: Test with -race run: go test -race ./... env: @@ -123,25 +123,25 @@ jobs: id: auth if: |- github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, ' - Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.0-rc.2' && matrix.runner == 'ubuntu-22.04') + Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04') uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.E2E_GCLOUD_KEY }} - if: |- github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, ' - Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.0-rc.2' && matrix.runner == 'ubuntu-22.04') + Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04') name: gcloud setup for end-to-end tests uses: google-github-actions/setup-gcloud@v2 - if: |- github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, ' - Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.0-rc.2' && matrix.runner == 'ubuntu-22.04') + Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04') name: End-to-end test env: CUE_TEST_LOGINS: ${{ secrets.E2E_CUE_LOGINS }} run: |- cd internal/_e2e go test -race - - if: (matrix.go-version == '1.23.0-rc.2' && matrix.runner == 'ubuntu-22.04') + - if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04') name: Check run: |- go vet ./... diff --git a/internal/_e2e/script_test.go b/internal/_e2e/script_test.go index 86d18a3b737..07105cf80c4 100644 --- a/internal/_e2e/script_test.go +++ b/internal/_e2e/script_test.go @@ -34,7 +34,7 @@ func TestMain(m *testing.M) { cachedGobin := os.Getenv("CUE_CACHED_GOBIN") if cachedGobin == "" { // Install the cmd/cue version into a cached GOBIN so we can reuse it. - // TODO: use "go tool cue" once we can rely on Go 1.22's tool dependency tracking in go.mod. + // TODO: use "go tool cue" once we can rely on Go's tool dependency tracking in go.mod. // See: https://go.dev/issue/48429 cacheDir, err := os.UserCacheDir() if err != nil { diff --git a/internal/ci/repo/repo.cue b/internal/ci/repo/repo.cue index 9095b714df2..310fab0ef45 100644 --- a/internal/ci/repo/repo.cue +++ b/internal/ci/repo/repo.cue @@ -31,7 +31,7 @@ windowsMachine: "windows-2022" // Use the latest Go version for extra checks, // such as running tests with the data race detector. // This may be a release candidate if we are late into a Go release cycle. -latestGo: "1.23.0-rc.2" +latestGo: "1.23.x" // The list of all Go versions that we run our tests on. // This typically goes back one major Go version, as we support two at a time. @@ -40,7 +40,7 @@ matrixGo: ["1.22.x", latestGo] // Use a specific latest version for release builds. // Note that we don't want ".x" for the sake of reproducibility, // so we instead pin a specific Go release. -pinnedReleaseGo: "1.22.5" +pinnedReleaseGo: "1.23.0" goreleaserVersion: "v2.0.1"