Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

CI: cross-compile and vet for Windows

Đang mở Phù hợp với người mới
#55 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, go
Lĩnh vực
ci-cd

Hướng nghiên cứu

Bắt đầu trong .github/workflows/ci.yml tại job build-test và xem xét các targets hiện có trong .goreleaser.yaml. Thêm biên dịch chéo cho Windows amd64 và arm64 cùng với GOOS=windows go vet ./..., sau đó xác minh rằng workflow phát hiện mã chỉ dành cho Windows như internal/deps/exec_windows.go và deps_test.go mà không chạy các bài kiểm thử Windows.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
Go
Star
34
Fork
5
Merge trung bình
5 giờ 7 phút
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của stacklok/modelith

Tất cả issue của stacklok/modelith

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.