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

Use new GH action to compile and test for windows #17

Open
wqferr opened this issue Jan 16, 2021 · 13 comments
Open

Use new GH action to compile and test for windows #17

wqferr opened this issue Jan 16, 2021 · 13 comments

Comments

@wqferr
Copy link

wqferr commented Jan 16, 2021

I believe you mentioned in gitter you were having problems with the leafo Lua action. I recently bumped into the same issue and found this one which claims to work for all 3 major platforms.

Maybe worth having a look?

@lenscas
Copy link
Owner

lenscas commented Jan 16, 2021

OMG! THANKS!

That looks exactly like the thing I need :)

@wqferr
Copy link
Author

wqferr commented Jan 16, 2021

Just had a look at the source code, currently it maps 5.4 to 5.3.5, so that's not reliable just yet.

Probably will be in the near future, but I'd say keep the current one for now until it fixes that.

@wqferr
Copy link
Author

wqferr commented Jan 16, 2021

I created an issue on that, let's hope it's resolved soon.

@lenscas
Copy link
Owner

lenscas commented Jan 16, 2021

I only need a lua version that can run teal and luarocks to install it so having that mapping issue shouldn't be a problem.

However, I just looked and it seems like you need another action to make use of luarocks, and the action they link has this as the only open issue leafo/gh-actions-luarocks#3 so that isn't very promising.

edit: just checked. Looks like I am already using that one, so assuming it works on windows there shouldn't be any issues.

@wqferr
Copy link
Author

wqferr commented Jan 16, 2021

I just realized we can use hererocks! I've been using it to test stuff locally, didn't even think of using it in a GH action. It's a python module, so it's probably very easy to find a platform independent action.

@wqferr
Copy link
Author

wqferr commented Jan 16, 2021

UPDATE: Hererocks works! I'm just having issues with LuaJIT on MacOS, but I'm pretty sure it's not relevant to your use case, so feel free to check how I did it in my CI setup. Note that this is not yet on master, so if you need to reference it later, be sure to follow this link or make sure you're in the 51-compat branch.

@wqferr
Copy link
Author

wqferr commented Jan 18, 2021

Did you work on this at all? If you have any questions feel free to tag me, my current CI setup is working smoothly.

lenscas added a commit that referenced this issue Jan 21, 2021
@lenscas
Copy link
Owner

lenscas commented Jan 21, 2021

I made the changes in #18 but it looks like windows is still not happy.

message: Could not run tl check. Make sure it is available in the path: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }

do I need to run something before tl becomes available in the PATH after installing it with luarocks on windows?

@wqferr
Copy link
Author

wqferr commented Jan 21, 2021

TL;DR: Try running . ./path_to_env/bin/activate before and after running luarocks install.

Hererocks works like a virtualenv in python, so you need to run . ./path_to_env/bin/activate not only to export the new environment path, but also to update the shell on which executables are available. If you only ran it before running luarocks install, any new executables might not be recognized.

I haven't looked at your current setup, so you might have already done that, so sorry in advance as I'm kind of in a hurry right now.

@lenscas
Copy link
Owner

lenscas commented Jan 21, 2021

sadly, that did not fix it.

Weirdly enough, both linux and macos managed to pass so whatever it is, it is windows specific.

@wqferr
Copy link
Author

wqferr commented Jan 21, 2021

Hm, maybe you could just use .luaenv/bin/tl instead of relying on PATH resolution?

@lenscas
Copy link
Owner

lenscas commented Jan 21, 2021

no, because tl gets executed by the code that needs to be tested.

@wqferr
Copy link
Author

wqferr commented Jan 21, 2021

Hmm, maybe it's a behavior specific to cargo on windows? It might be overshadowing PATH? I can't think of anything else...

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