Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

CI: cross-compile and vet for Windows

未关闭 适合新手
#55 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
88/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, go
领域
ci-cd

调研方向

从 .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 内容生成。

描述

enhancement

.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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

stacklok/modelith 的其他 Issue

查看 stacklok/modelith 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。