Repository navigation
build: Go 1.27, go fix and CI builds for linux and darwin - #2
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the module to Go 1.27, applies
go fix, and adds CI.go 1.27.0ingo.mod. The vet thatgo testruns 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 througherrors.Newandfmt.Fprintln.go fixfor the release and the debug build (any, range over integers,os.ReadFile, promoted fields in composite literals) andgofmtfor the import order.pr.ymlvets and tests the release and debug builds and runs the builds;release.ymlattaches the builds to the release of av*tag.Builds
_build.ymlbuilds csv2sqlite on a runner per platform, because go-sqlite-lite compiles SQLite with cgo:Linux binaries are static (
netgo,osusergokeep glibc's resolver out). Each build runs--versionand ispacked as
csv2sqlite_<tag>_<os>_<arch>.tar.gz. On a tag, the release is created when it does not existyet (a tag with
-becomes a prerelease) and gets the four archives andchecksums.txt.Verification
go vetclean and the tests pass in the release and debug builds on Go 1.27.actionlintpasses; this PR is the first run of the workflows on GitHub.