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

Add Release for x86 Architectures #254

Closed
erinf-wolf opened this issue Jun 10, 2022 · 5 comments
Closed

Add Release for x86 Architectures #254

erinf-wolf opened this issue Jun 10, 2022 · 5 comments

Comments

@erinf-wolf
Copy link

Hi there, I want to be able to build gotestsum to be used on older Windows systems (7 32 bit, 10 32 bit) for my CI tooling 😄. I don't find any instructions on compiling on the README though, so I just download the latest release by curling from https://github.com/gotestyourself/gotestsum/releases/latest

Right now only arm64, arm 32 bit and amd64 architectures available .. Could the goreleaser be modified to add 386 as a target architecture to add to future releases?

Better yet, is there a way I can compile the code myself easily that I'm missing? I know I can install a local version but want to be able to compile for other platforms and architectures

Similar solutions from previous issues maybe:

@dnephin
Copy link
Member

dnephin commented Jun 13, 2022

Ya, you should definitely be able to build for other platforms.

One way to do that is to install from source on the target platform with:

go install gotest.tools/gotestsum@latest

or

go install gotest.tools/gotestsum@v1.8.1

From another platform you can cross compile with:

$ GOARCH=386 GOOS=windows go build -o gotestsum.exe .
$ file gotestsum.exe
gotestsum.exe: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows

I tried that and it seems to build fine for windows/386. Let me know if you run into any problems and I'll do my best to help out!

@erinf-wolf
Copy link
Author

Amazing 😄 and I assume I can build with the input . by navigating to the parent directory of my cloned version? gotestsum/ @dnephin

@erinf-wolf
Copy link
Author

erinf-wolf commented Jun 13, 2022

That may be obvious for people more seasoned with GoLang haha. If it's less clear I can make PR to add it to the readme though. Also if I don't run into problem soon then I'll close issue, thanks again for prompt help!

@dnephin
Copy link
Member

dnephin commented Jun 13, 2022

Good question, those instructions assume the working directory is the directory that contains the git clone. The go.mod file should be in the working directory for go to know the name of the module.

@erinf-wolf
Copy link
Author

It looks to work great :) thanks so much for the help!

Closing issue

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

No branches or pull requests

2 participants