Skip to content

Commit

Permalink
fix: statically link windows executable using zig cc
Browse files Browse the repository at this point in the history
  • Loading branch information
nedpals committed Mar 20, 2024
1 parent f587e86 commit bf550ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/server-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@ jobs:
GOOS: windows
steps:
- uses: actions/checkout@v3
- uses: goto-bus-stop/setup-zig@v2
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- working-directory: ./server
env:
GOARCH: amd64
CC: zig cc
CXX: zig c++
run: |
go version
go mod download
go build -o cmd/bugbuddy_windows_amd64.exe ${{ env.ENTRYPOINT }}
go build -ldflags="-extldflags=-static" -o cmd/bugbuddy_windows_amd64.exe ${{ env.ENTRYPOINT }}
- name: Create binary only artifact
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit bf550ba

Please sign in to comment.