-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for oasisprotocol-cli canceled.
|
.github/workflows/ci-tests.yml
Outdated
- name: Build code | ||
shell: pwsh | ||
run: | | ||
.\win_setup.ps1 build |
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.
Back slashes in YAML are considered escape characters. I would prefer ./win_setup.psi
. Same below.
scripts/gen_example.ps1
Outdated
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.
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.
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.
Removed gen_example and win_setup, goreleaser now contains Windows build. Added option to cross-compile in Makefile.
Co-authored-by: Matevž Jekovec <[email protected]>
d5fd673
to
7d6929a
Compare
@@ -48,3 +48,4 @@ jobs: | |||
make clean-examples | |||
make examples | |||
git diff --exit-code examples | |||
|
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.
@@ -74,6 +74,10 @@ clean: | |||
rm -f oasis | |||
$(GO) clean -testcache | |||
|
|||
windows-build: |
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.
Move this up next to oasis
. I hope find
works under WSL.
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 |
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.
Let's call this build-windows
and move it up next to build
.
Please update the description of this PR to reflect the updated version and don't forget to squash the commits. |
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.