Skip to content

Commit

Permalink
Merge pull request #342 from oasisprotocol/ZigaMr/windows-build-support
Browse files Browse the repository at this point in the history
ZigaMr/windows build support
  • Loading branch information
ZigaMr authored Jan 10, 2025
2 parents 9c0a745 + 782497c commit 0f40354
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:
run: |
make clean-examples
make examples
git diff --exit-code examples
git diff --exit-code examples
14 changes: 14 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ builds:
- darwin
goarch:
- arm64
- <<: *build-common
id: oasis-windows-amd64
binary: oasis.exe
env:
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
goos:
- windows
goarch:
- amd64

archives:
- name_template: "{{replace .ProjectName \" \" \"_\" | tolower}}_{{.Version}}_{{.Os}}_{{.Arch}}"
Expand All @@ -66,6 +76,10 @@ archives:
- oasis-linux-amd64
- oasis-linux-arm64
- oasis-darwin-universal
- oasis-windows-amd64
format_overrides:
- goos: windows
format: zip

checksum:
name_template: SHA256SUMS-{{.Version}}.txt
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ all: build

# Build.
build: oasis

build-windows: $(shell find . -name "*.go" -type f) go.sum go.mod
@$(PRINT) "$(MAGENTA)*** Building for Windows...$(OFF)\n"
GOOS=windows GOARCH=amd64 $(GO) build -v -o oasis.exe $(GOFLAGS) $(GO_EXTRA_FLAGS)

oasis: $(shell find . -name "*.go" -type f) go.sum go.mod
@$(PRINT) "$(MAGENTA)*** Building Go code...$(OFF)\n"
@$(GO) build -v -o oasis $(GOFLAGS) $(GO_EXTRA_FLAGS)
Expand Down Expand Up @@ -83,3 +88,4 @@ clean:
$(lint-targets) lint \
$(test-targets) test \
clean
windows

0 comments on commit 0f40354

Please sign in to comment.