-
Notifications
You must be signed in to change notification settings - Fork 14
feat: add Windows build support #215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -54,8 +54,10 @@ build: | |||||||||||||||||||||||
| $(MAKE) build.macos; \ | ||||||||||||||||||||||||
| elif [ "$$(uname -s)" = "Linux" ]; then \ | ||||||||||||||||||||||||
| $(MAKE) build.linux; \ | ||||||||||||||||||||||||
| elif echo "$$(uname -s)" | grep -q -E "^(MINGW|MSYS|Windows)"; then \ | ||||||||||||||||||||||||
| $(MAKE) build.windows; \ | ||||||||||||||||||||||||
| else \ | ||||||||||||||||||||||||
| echo "Error: Unsupported operating system. Please use 'make build.macos' or 'make build.linux' directly."; \ | ||||||||||||||||||||||||
| echo "Error: Unsupported operating system. Please use 'make build.macos', 'make build.linux', or 'make build.windows' directly."; \ | ||||||||||||||||||||||||
| exit 1; \ | ||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
@@ -67,6 +69,10 @@ build.macos: bin | |||||||||||||||||||||||
| build.linux: bin | ||||||||||||||||||||||||
| GOOS=linux GOARCH=amd64 go build -o bin/mass-linux-amd64 -ldflags=${LD_FLAGS} | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| .PHONY: build.windows | ||||||||||||||||||||||||
| build.windows: bin | ||||||||||||||||||||||||
| GOOS=windows GOARCH=amd64 go build -o bin/mass-windows-amd64.exe -ldflags=${LD_FLAGS} | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
Comment on lines
+72
to
+75
|
||||||||||||||||||||||||
| .PHONY: build.windows | |
| build.windows: bin | |
| GOOS=windows GOARCH=amd64 go build -o bin/mass-windows-amd64.exe -ldflags=${LD_FLAGS} | |
| .PHONY: build.windows build.windows.amd64 build.windows.arm64 | |
| build.windows: build.windows.amd64 build.windows.arm64 | |
| build.windows.amd64: bin | |
| GOOS=windows GOARCH=amd64 go build -o bin/mass-windows-amd64.exe -ldflags=${LD_FLAGS} | |
| build.windows.arm64: bin | |
| GOOS=windows GOARCH=arm64 go build -o bin/mass-windows-arm64.exe -ldflags=${LD_FLAGS} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows artifacts are now part of the release configuration, but the CI workflows only build/test on
ubuntu-latest. To avoid shipping broken Windows binaries, add a CI check that at least compiles (and ideally tests) withGOOS=windows/ a Windows runner as part of PR validation.