Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Test macOS, Windows builds on pull-requests #1124

Closed
arbourd opened this issue Dec 19, 2020 · 5 comments · Fixed by fishworks/gofish#184
Closed

Test macOS, Windows builds on pull-requests #1124

arbourd opened this issue Dec 19, 2020 · 5 comments · Fixed by fishworks/gofish#184

Comments

@arbourd
Copy link
Contributor

arbourd commented Dec 19, 2020

Right now the Github Actions CI only tests against a Linux install. This allows PRs that work for Linux to pass, but maybe issues like #1122 to arise with other platforms.

Should we tests against the other platforms? Future CI could look like:

  1. step: gofish lint
  2. if 1. passes, matrix gofish install on all platforms

This would make all builds longer, and requires the downloading of assets twice (once for the lint step, again for the install step -- this could be fixed with asset caching), but would ensure that all platforms have installable binaries.

@arbourd arbourd changed the title Test macOS, Windows builds Test macOS, Windows builds on pull-requests Dec 19, 2020
@arbourd
Copy link
Contributor Author

arbourd commented Dec 30, 2020

Is something you would be interested in entertaining @bacongobbler? If not I can close it. nbd. i can PR the changes if you're cool with it.

@bacongobbler
Copy link
Contributor

Please feel free to look into this. I’m on holiday break.

@arbourd
Copy link
Contributor Author

arbourd commented Jan 4, 2021

Like most things I under estimated how much work this could be. Couple of issues I've experienced:

  1. Obvious differences between pwsh and bash. Should we use pwsh for Windows or just bash on all platforms? There are some issues with getting gofish tank working in the Linux subsystem because it's not evalable.
  2. We need a way to determine if the Food supports the current architecture/platform. gofish will return 1 if you try to gofish install vagrant on Darwin for example. Easiest way to handle this is regex for os = "darwin". Any good alternatives?

@bacongobbler
Copy link
Contributor

bacongobbler commented Jan 4, 2021

There are some issues with getting gofish tank working in the Linux subsystem because it's not evalable.

huh? It was designed to be eval-able.eval is the primary use case for gofish tank.

Easiest way to handle this is regex for os = "darwin". Any good alternatives?

You could try catching that error message and exit if another error message is found.

@arbourd
Copy link
Contributor Author

arbourd commented Jan 4, 2021

huh? It was designed to be eval-able.eval is the primary use case for gofish tank.

Ya, but in Windows' Linux Subsystem and with bash, eval $env.GOFISH_HOME won't work as gofish tank throws out pwsh, not sh. Would need export style script.

If the Windows tests are to be completely in pwsh (and not using bash/subsystem), gofish.exe tank | iex works juuuust fine 🙂 If we want to use bash in Windows we'll need some sort of alternative to export the env vars.

As an aside, perhaps gofish tank should be shell aware and throw out export in bash on Windows?

You could try catching that error message and exit if another error message is found.

trap?

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

Successfully merging a pull request may close this issue.

2 participants