ci: add golangci-lint, cross-platform build, and actionlint - #6
Open
AskAlexSharov wants to merge 1 commit into
Open
ci: add golangci-lint, cross-platform build, and actionlint#6AskAlexSharov wants to merge 1 commit into
AskAlexSharov wants to merge 1 commit into
Conversation
The repo had no CI. Both Go files are cgo wrappers over the vendored evmone/intx C++ sources, so the checks build with CGO_ENABLED=1 and a current toolchain -- go.mod declares go 1.17 only as the module minimum, which is too old to run golangci-lint v2. - lint: golangci-lint v2.12.2 (standard set + misspell, unconvert, usestdlibvars, and govet's unsafeptr, since the package is entirely unsafe.Pointer conversions into C++). gofmt/goimports run as v2 formatters, so `run` fails on unformatted files too. - build: go build/vet/test on ubuntu-latest and macos-latest. cgo with -std=c++20 resolves differently under gcc and clang, so both matter. - actionlint: lints these workflows. Verified locally on macOS: golangci-lint reports 0 issues, and actionlint accepts the workflow. The Linux leg runs here for the first time.
AskAlexSharov
marked this pull request as ready for review
August 13, 2026 03:36
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.
The repo had no CI at all. This adds three checks.
Both Go files are cgo wrappers over the vendored
evmone/intxC++ sources, which shapes every choice here: the jobs run withCGO_ENABLED=1, and they pin a current Go toolchain rather than usinggo-version-file, becausego.moddeclaresgo 1.17as the module minimum and that is too old to run golangci-lint v2.lintbuildgo build/go vet/go testonubuntu-latestandmacos-latestactionlintLint config. Standard linter set plus
misspell,unconvert,usestdlibvars, and govet'sunsafeptr— the package is entirelyunsafe.Pointerconversions into C++, so that one is the most relevant check in the repo.gofmtandgoimportsare declared as v2 formatters;golangci-lint runfails on unformatted files too, so no separate gofmt step is needed.Why both platforms. cgo with
-std=c++20resolves differently under gcc and clang, and this is a header-only include of vendored C++. A build that passes on one says little about the other.No dependency cache. The module has no dependencies and no
go.sum, sosetup-gohas nothing to key a cache on;cache: falseavoids a spurious warning.Verified
All four checks pass on this PR:
lint,build (ubuntu-latest),build (macos-latest),actionlint— 32s total. That includes the Linux cgo/C++20 leg, which I could not run locally (no Docker), so the vendored headers do resolve from the-Ipaths already in the#cgo CXXFLAGSunder gcc as well as clang.golangci-lint reports
0 issuesagainst the current tree.Not included
No
go testcoverage gate, since the repo has no Go tests yet — the step is wired so it starts counting the moment one lands. The C++ side (CMake, theevmonesubmodule tree) is untouched; this covers the Go binding only.