Skip to content
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

ZigaMr/windows build support #342

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

ZigaMr
Copy link

@ZigaMr ZigaMr commented Jan 7, 2025

This PR adds PowerShell scripts as an alternative to the Makefile. The scripts maintain feature parity with the Makefile and accept the same command-line parameters, allowing Windows users to run identical commands.

Workflows: Updated ci-test.yml with windows image.

Copy link

netlify bot commented Jan 7, 2025

Deploy Preview for oasisprotocol-cli canceled.

Name Link
🔨 Latest commit 7d6929a
🔍 Latest deploy log https://app.netlify.com/sites/oasisprotocol-cli/deploys/677eaf17b2e8a800088c3718

.github/workflows/ci-tests.yml Outdated Show resolved Hide resolved
- name: Build code
shell: pwsh
run: |
.\win_setup.ps1 build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Back slashes in YAML are considered escape characters. I would prefer ./win_setup.psi. Same below.

win_setup.ps1 Outdated Show resolved Hide resolved
Copy link
Member

@matevz matevz Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gen_example script generates docs snippets and can be just executed on Linux. But we can keep it here for running the tests I suppose.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed gen_example and win_setup, goreleaser now contains Windows build. Added option to cross-compile in Makefile.

@ZigaMr ZigaMr changed the title Ziga mr/windows build support ZigaMr/windows build support Jan 8, 2025
@ZigaMr ZigaMr force-pushed the ZigaMr/windows-build-support branch from d5fd673 to 7d6929a Compare January 8, 2025 17:00
@@ -48,3 +48,4 @@ jobs:
make clean-examples
make examples
git diff --exit-code examples

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@@ -74,6 +74,10 @@ clean:
rm -f oasis
$(GO) clean -testcache

windows-build:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this up next to oasis. I hope find works under WSL.

Suggested change
windows-build:
oasis.exe: $(shell find . -name "*.go" -type f) go.sum go.mod

Also add

build-windows: oasis.exe

below build.

@@ -83,3 +87,4 @@ clean:
$(lint-targets) lint \
$(test-targets) test \
clean
windows
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's call this build-windows and move it up next to build.

@matevz
Copy link
Member

matevz commented Jan 9, 2025

Please update the description of this PR to reflect the updated version and don't forget to squash the commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants