CI: cross-compile and vet for Windows
还没有人认领这个 Issue。
评估
调研方向
从 .github/workflows/ci.yml 中的 build-test job 开始,检查现有的 .goreleaser.yaml targets。添加 Windows amd64 和 arm64 的交叉编译以及 GOOS=windows go vet ./...,然后验证 workflow 能捕获 internal/deps/exec_windows.go 和 deps_test.go 等仅限 Windows 的代码,而不运行 Windows 测试。
由索引模型根据 Issue 内容生成。
描述
.goreleaser.yaml ships windows/amd64 and windows/arm64, but CI (.github/workflows/ci.yml, build-test) only builds and vets on ubuntu-latest for the host platform. #52 splits the process-kill code into internal/deps/exec_unix.go (!windows) and exec_windows.go (windows), so code that only compiles on Windows is now in the tree. If it breaks, CI won't catch it; the first sign would be a failed release.
Proposal
Add cross-compile steps to build-test:
- name: Cross-compile (windows)
run: |
GOOS=windows GOARCH=amd64 go build ./...
GOOS=windows GOARCH=arm64 go build ./...
- name: Vet (windows)
run: GOOS=windows go vet ./...
go vet type-checks _test.go files too, so it also catches Windows-only breaks in the tests (deps_test.go already has runtime.GOOS == "windows" skips). The same command passes locally at 52a5544.
Consider also adding darwin builds, since goreleaser ships those too and the !windows file covers darwin and linux.
Out of scope: actually running the tests on Windows (tracked separately if we do it).
- 主要语言
- Go
- 星标
- 34
- 派生
- 5
- 平均合并
- 5 小时 7 分钟
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
stacklok/modelith 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
-
documentation
难度 2/5 1-3 小时 新手友好度 92/100
-
enhancement
难度 2/5 半天 新手友好度 68/100
-
难度 5/5 一周以上 新手友好度 20/100
-
难度 5/5 一周以上 新手友好度 20/100
查看 stacklok/modelith 的全部 Issue
相似的 Issue
-
bug needs triage
难度 2/5 1-3 小时 新手友好度 78/100
netdata/netdata#24062 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
meshery/meshery#22119 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
automation documentation
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复