Skip to content

build: Go 1.27, go fix and CI builds for linux and darwin - #2

Merged
terwey merged 3 commits into
masterfrom
chore/go-1.27
Nov 6, 2026
Merged

terwey merged 3 commits into
masterfrom
chore/go-1.27

Conversation

@terwey

@terwey terwey commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Moves the module to Go 1.27, applies go fix, and adds CI.

Commit Change
15b0147 go 1.27.0 in go.mod. The vet that go test runs rejects non-constant format strings since Go 1.24; the comparison messages carried column names and diffs as the format, so a % in them garbled the output. They now go through errors.New and fmt.Fprintln.
515dbdb go fix for the release and the debug build (any, range over integers, os.ReadFile, promoted fields in composite literals) and gofmt for the import order.
c4a67ca CI: pr.yml vets and tests the release and debug builds and runs the builds; release.yml attaches the builds to the release of a v* tag.

Builds

_build.yml builds csv2sqlite on a runner per platform, because go-sqlite-lite compiles SQLite with cgo:

Target Runner
linux/amd64 ubuntu-24.04
linux/arm64 ubuntu-24.04-arm
darwin/amd64 macos-15-intel
darwin/arm64 macos-15

Linux binaries are static (netgo,osusergo keep glibc's resolver out). Each build runs --version and is
packed as csv2sqlite_<tag>_<os>_<arch>.tar.gz. On a tag, the release is created when it does not exist
yet (a tag with - becomes a prerelease) and gets the four archives and checksums.txt.

Verification

  • go vet clean and the tests pass in the release and debug builds on Go 1.27.
  • A static linux/amd64 build with the release flags runs and converts a file.
  • actionlint passes; this PR is the first run of the workflows on GitHub.

From go 1.24 on, the vet check that go test runs rejects non-constant format
strings. The comparison messages carried column names and diffs as the format,
so a % in them garbled the output; they now go through errors.New and
fmt.Fprintln.

Signed-off-by: Claude Opus 5.5 <agent@terwey.me>
go fix with Go 1.27, for the release and the debug build: any instead of
interface{}, range over integers, os.ReadFile instead of ioutil.ReadFile, and
promoted fields set directly in composite literals. gofmt sorts the imports
left out of order since the module moved to github.com/terwey.

Signed-off-by: Claude Opus 5.5 <agent@terwey.me>
_build.yml builds csv2sqlite for linux and darwin on amd64 and arm64, each on
a runner of its own platform because go-sqlite-lite compiles SQLite with cgo.
Linux binaries are static. pr.yml vets, tests the release and debug builds,
and runs the four builds. release.yml runs the builds for a v* tag, creates
the release when it does not exist yet, and attaches the archives with a
checksums file.

Signed-off-by: Claude Opus 5.5 <agent@terwey.me>
@terwey
terwey merged commit 74bc9c8 into master Nov 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants