Upgrade maintained Go baseline to 1.26
This commit is contained in:
@@ -3,12 +3,12 @@ when:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
validate-release:
|
validate-release:
|
||||||
image: golang:1.25.5
|
image: golang:1.26.7
|
||||||
commands:
|
commands:
|
||||||
- ./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"
|
- ./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"
|
||||||
|
|
||||||
build-release-assets:
|
build-release-assets:
|
||||||
image: golang:1.25.5
|
image: golang:1.26.7
|
||||||
depends_on:
|
depends_on:
|
||||||
- validate-release
|
- validate-release
|
||||||
commands:
|
commands:
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ when:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
shuffled-race-tests:
|
shuffled-race-tests:
|
||||||
image: golang:1.25
|
image: golang:1.26
|
||||||
commands:
|
commands:
|
||||||
- go test -race -shuffle=on -count=3 ./...
|
- go test -race -shuffle=on -count=3 ./...
|
||||||
|
|||||||
@@ -3,37 +3,37 @@ when:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
tests:
|
tests:
|
||||||
image: golang:1.25
|
image: golang:1.26
|
||||||
commands:
|
commands:
|
||||||
- go test ./...
|
- go test ./...
|
||||||
|
|
||||||
race-tests:
|
race-tests:
|
||||||
image: golang:1.25
|
image: golang:1.26
|
||||||
depends_on: tests
|
depends_on: tests
|
||||||
commands:
|
commands:
|
||||||
- go test -race ./...
|
- go test -race ./...
|
||||||
|
|
||||||
static-analysis:
|
static-analysis:
|
||||||
image: golang:1.25
|
image: golang:1.26
|
||||||
depends_on: tests
|
depends_on: tests
|
||||||
commands:
|
commands:
|
||||||
- go vet ./...
|
- go vet ./...
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: golang:1.25
|
image: golang:1.26
|
||||||
depends_on: tests
|
depends_on: tests
|
||||||
commands:
|
commands:
|
||||||
- go build ./...
|
- go build ./...
|
||||||
|
|
||||||
documentation-and-examples:
|
documentation-and-examples:
|
||||||
image: golang:1.25
|
image: golang:1.26
|
||||||
depends_on: tests
|
depends_on: tests
|
||||||
commands:
|
commands:
|
||||||
- go test ./internal/doccheck
|
- go test ./internal/doccheck
|
||||||
- go test ./internal/config -run '^TestExamplesLoadAndValidate$'
|
- go test ./internal/config -run '^TestExamplesLoadAndValidate$'
|
||||||
|
|
||||||
cross-build:
|
cross-build:
|
||||||
image: golang:1.25
|
image: golang:1.26
|
||||||
depends_on: [race-tests, static-analysis, build, documentation-and-examples]
|
depends_on: [race-tests, static-analysis, build, documentation-and-examples]
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ polished transcripts and generated artifacts. Start with the
|
|||||||
[Architecture](policy/architecture.md) for normative system boundaries, and the
|
[Architecture](policy/architecture.md) for normative system boundaries, and the
|
||||||
[Internal Overview](internal/overview.md) for implemented component ownership.
|
[Internal Overview](internal/overview.md) for implemented component ownership.
|
||||||
|
|
||||||
|
## Go Prerequisite
|
||||||
|
|
||||||
|
Maintained development and verification require Go 1.26. Use the official Go
|
||||||
|
1.26 toolchain before running repository commands.
|
||||||
|
|
||||||
## What To Read
|
## What To Read
|
||||||
|
|
||||||
| When working on | Read | Why |
|
| When working on | Read | Why |
|
||||||
|
|||||||
@@ -5,6 +5,13 @@ binary release. The synchronous release boundary is a successful push of one
|
|||||||
new tag to `origin`; Woodpecker and Gitea publication happen later and do not
|
new tag to `origin`; Woodpecker and Gitea publication happen later and do not
|
||||||
change that result.
|
change that result.
|
||||||
|
|
||||||
|
## Go prerequisite
|
||||||
|
|
||||||
|
Release preparation requires the maintained Go 1.26 baseline. Tag CI currently
|
||||||
|
uses the explicitly pinned `golang:1.26.7` image for candidate validation and
|
||||||
|
asset construction; that asynchronous work does not change the tag-push
|
||||||
|
completion boundary.
|
||||||
|
|
||||||
## Choose a version and write its note
|
## Choose a version and write its note
|
||||||
|
|
||||||
Narratio is past `v1.0.0`. Use an unused stable tag in the exact form
|
Narratio is past `v1.0.0`. Use an unused stable tag in the exact form
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ During every stage:
|
|||||||
|
|
||||||
## Stage 1 — Establish The Go 1.26 Baseline
|
## Stage 1 — Establish The Go 1.26 Baseline
|
||||||
|
|
||||||
**Status: Pending**
|
**Status: Completed**
|
||||||
|
|
||||||
### Goal
|
### Goal
|
||||||
|
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,6 +1,6 @@
|
|||||||
module gitea.maximumdirect.net/eric/narratio
|
module gitea.maximumdirect.net/eric/narratio
|
||||||
|
|
||||||
go 1.25.0
|
go 1.26.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/aws/aws-sdk-go-v2/config v1.32.17
|
github.com/aws/aws-sdk-go-v2/config v1.32.17
|
||||||
|
|||||||
@@ -64,15 +64,15 @@ func TestReleaseWorkflowRequiresValidation(t *testing.T) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
t.Fatal("release workflow must define validate-release")
|
t.Fatal("release workflow must define validate-release")
|
||||||
}
|
}
|
||||||
if validate.Image != "golang:1.25.5" || !containsWorkflowCommand(validate.Commands, `./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"`) {
|
if validate.Image != "golang:1.26.7" || !containsWorkflowCommand(validate.Commands, `./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"`) {
|
||||||
t.Fatalf("validate-release = %#v, want the shared candidate checker in golang:1.25.5", validate)
|
t.Fatalf("validate-release = %#v, want the shared candidate checker in golang:1.26.7", validate)
|
||||||
}
|
}
|
||||||
assets, ok := workflow.Steps["build-release-assets"]
|
assets, ok := workflow.Steps["build-release-assets"]
|
||||||
if !ok {
|
if !ok {
|
||||||
t.Fatal("release workflow must define build-release-assets")
|
t.Fatal("release workflow must define build-release-assets")
|
||||||
}
|
}
|
||||||
if assets.Image != "golang:1.25.5" || !workflowDependsOn(workflow.Steps, "build-release-assets", "validate-release", map[string]bool{}) {
|
if assets.Image != "golang:1.26.7" || !workflowDependsOn(workflow.Steps, "build-release-assets", "validate-release", map[string]bool{}) {
|
||||||
t.Fatalf("build-release-assets = %#v, want validated golang:1.25.5 asset construction", assets)
|
t.Fatalf("build-release-assets = %#v, want validated golang:1.26.7 asset construction", assets)
|
||||||
}
|
}
|
||||||
assetCommands := strings.Join(assets.Commands, "\n")
|
assetCommands := strings.Join(assets.Commands, "\n")
|
||||||
if !strings.Contains(assetCommands, `./scripts/build-release-assets.sh "$CI_COMMIT_TAG" "$PWD/dist"`) || strings.Contains(assetCommands, "GOOS=") || strings.Contains(assetCommands, "go build") {
|
if !strings.Contains(assetCommands, `./scripts/build-release-assets.sh "$CI_COMMIT_TAG" "$PWD/dist"`) || strings.Contains(assetCommands, "GOOS=") || strings.Contains(assetCommands, "go build") {
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ func TestCandidateCheckerRejectsRepositoryHygieneViolations(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "wrong module", want: "go.mod must declare module",
|
name: "wrong module", want: "go.mod must declare module",
|
||||||
prepare: func(t *testing.T, fixture *candidateFixture) {
|
prepare: func(t *testing.T, fixture *candidateFixture) {
|
||||||
if err := os.WriteFile(filepath.Join(fixture.root, "go.mod"), []byte("module example.invalid/release\n\ngo 1.25.0\n"), 0o644); err != nil {
|
if err := os.WriteFile(filepath.Join(fixture.root, "go.mod"), []byte("module example.invalid/release\n\ngo 1.26.0\n"), 0o644); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -192,7 +192,7 @@ func TestCandidateCheckerRejectsRepositoryHygieneViolations(t *testing.T) {
|
|||||||
name: "tracked workspace", want: "tracked workspace file is not allowed",
|
name: "tracked workspace", want: "tracked workspace file is not allowed",
|
||||||
prepare: func(t *testing.T, fixture *candidateFixture) {
|
prepare: func(t *testing.T, fixture *candidateFixture) {
|
||||||
path := filepath.Join(fixture.root, "go.work")
|
path := filepath.Join(fixture.root, "go.work")
|
||||||
if err := os.WriteFile(path, []byte("go 1.25.0\n"), 0o644); err != nil {
|
if err := os.WriteFile(path, []byte("go 1.26.0\n"), 0o644); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
fixture.git("add", "go.work")
|
fixture.git("add", "go.work")
|
||||||
@@ -364,7 +364,7 @@ func newCandidateFixture(t *testing.T) *candidateFixture {
|
|||||||
set -eu
|
set -eu
|
||||||
printf '%s build-release-assets %s\n' "${GOWORK:-}" "$1" >> "$NARRATIO_RELEASE_CHECK_LOG"
|
printf '%s build-release-assets %s\n' "${GOWORK:-}" "$1" >> "$NARRATIO_RELEASE_CHECK_LOG"
|
||||||
`, 0o755)
|
`, 0o755)
|
||||||
writeFixtureFile(t, filepath.Join(root, "go.mod"), "module gitea.maximumdirect.net/eric/narratio\n\ngo 1.25.0\n", 0o644)
|
writeFixtureFile(t, filepath.Join(root, "go.mod"), "module gitea.maximumdirect.net/eric/narratio\n\ngo 1.26.0\n", 0o644)
|
||||||
writeFixtureFile(t, filepath.Join(root, "main.go"), "package narratio\n", 0o644)
|
writeFixtureFile(t, filepath.Join(root, "main.go"), "package narratio\n", 0o644)
|
||||||
notePath := filepath.Join(root, "docs", "releases", "v1.2.3.md")
|
notePath := filepath.Join(root, "docs", "releases", "v1.2.3.md")
|
||||||
writeFixtureFile(t, notePath, "# Narratio v1.2.3\n\n## Summary\n\n## Compatibility\n\n## Upgrade\n\n## Changes\n", 0o644)
|
writeFixtureFile(t, notePath, "# Narratio v1.2.3\n\n## Summary\n\n## Compatibility\n\n## Upgrade\n\n## Changes\n", 0o644)
|
||||||
|
|||||||
Reference in New Issue
Block a user