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

ci: fix Windows tests + enable for PRs #9

Merged
merged 11 commits into from
Dec 4, 2023
Merged

Conversation

mrcjkb
Copy link
Contributor

@mrcjkb mrcjkb commented Dec 4, 2023

See #8 (comment).

It appears busted 2.2.0 doesn't work on Windows.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 4, 2023

Also, this PR enables running the tests on PR.

@swarn
Copy link
Owner

swarn commented Dec 4, 2023

Also, this PR enables running the tests on PR.

Thanks, I was going to ask that you add this.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 4, 2023

Nope, doesn't fix it. I'll try installing luaFileSystem

@mrcjkb mrcjkb changed the title ci: use busted 2.1.2 ci: fix Windows tests + enable for PRs Dec 4, 2023
@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 4, 2023

Hmm, busted test/fzy_spec.lua also fails on Windows.
@swarn can you rerun one of your previous builds to see if it's a flake caused by a recent version of busted?

@swarn
Copy link
Owner

swarn commented Dec 4, 2023

I'm not that familiar with github's CI. How do I manually rerun a previous workflow? I can see the results in the old actions, but with no failure, there's no "rerun tests" button.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 4, 2023

I'm not that familiar with github's CI. How do I manually rerun a previous workflow? I can see the results in the old actions, but with no failure, there's no "rerun tests" button.

I'll open another PR that reverts my changes and adds pull_request.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 4, 2023

I'm not that familiar with github's CI. How do I manually rerun a previous workflow? I can see the results in the old actions, but with no failure, there's no "rerun tests" button.

I'll open another PR that reverts my changes and adds pull_request.

Yup, it's a flake 😭

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 4, 2023

I'll try replacing hererocks with hishamhm/gh-actions-luarocks, which has support for Windows.

@mrcjkb mrcjkb force-pushed the luarocks-test branch 4 times, most recently from 3fb3d07 to f7a90c5 Compare December 4, 2023 18:31
@mrcjkb mrcjkb marked this pull request as draft December 4, 2023 18:31
@mrcjkb mrcjkb force-pushed the luarocks-test branch 2 times, most recently from 67b1e5a to dc7069d Compare December 4, 2023 18:33
@mrcjkb mrcjkb marked this pull request as ready for review December 4, 2023 18:34
@mrcjkb mrcjkb marked this pull request as draft December 4, 2023 18:34
@mrcjkb mrcjkb force-pushed the luarocks-test branch 6 times, most recently from 285dabf to 3e8d52c Compare December 4, 2023 18:50
@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 4, 2023

I don't get it... Why on earth has it started compaining about the strings.h include?

@mrcjkb mrcjkb force-pushed the luarocks-test branch 3 times, most recently from 1e8985b to db67ad0 Compare December 4, 2023 19:08
@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 4, 2023

Well, luarocks 3.3.0 is the oldest version that works with the GitHub action 😞

@mrcjkb mrcjkb force-pushed the luarocks-test branch 3 times, most recently from 825a8c2 to f3a22f7 Compare December 4, 2023 19:30
@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 4, 2023

@swarn at this point I'm all out of ideas.
My suggestion would be to disable tests for Windows for now and file a bug report with luarocks or busted.

Also, I'm not 100 % sure if the strings.h include is redundant or not. It seems to compile just fine without it. Keeping it might cause failures on Windows.

I seem to be hitting rate limits again, so I'll take a bit of a break.

@mrcjkb mrcjkb marked this pull request as ready for review December 4, 2023 19:34
.github/workflows/spec.yml Outdated Show resolved Hide resolved
.github/workflows/spec.yml Outdated Show resolved Hide resolved
.github/workflows/spec.yml Outdated Show resolved Hide resolved
@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 4, 2023

Current status:

  • Disable tests on Windows (build only)
  • Exclude Windows + luajit combo from matrix (this seems like a bug in the luarocks workflow, but might be fixable by symlinking luajit?)

I have the gut feeling it'll be easier to get this working without hererocks.

@swarn
Copy link
Owner

swarn commented Dec 4, 2023

Yeah, I'm noticing that hererocks is unmaintained for five years, probably time to switch.

I see you have comments on leafo/gh-actions-luarocks#14 last week about build-time paths not found. This is a runtime path error; is it related?

This was all working a year ago, I suppose I should have pinned more versions...

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 4, 2023

I see you have comments on leafo/gh-actions-luarocks#14 last week about build-time paths not found. This is a runtime path error; is it related?

It could be something similar. But I don't think it's those paths I commented on - it's working for other lua versions. And correcting those environment variables didn't help solve my problem.

@swarn
Copy link
Owner

swarn commented Dec 4, 2023

Well, thanks for the effort. I'll merge this now. The code hasn't changed in years, so I'm not too worried about skipping Windows tests for the moment.

If you don't mind, can I ask: are you using this library for something? Neovim and Roblox seem to be the main use cases.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 4, 2023

Well, thanks for the effort. I'll merge this now. The code hasn't changed in years, so I'm not too worried about skipping Windows tests for the moment.

No problem 😄

If you don't mind, can I ask: are you using this library for something? Neovim and Roblox seem to be the main use cases.

We intend to use it for rocks.nvim, a neovim package manager that uses luarocks. Right now, it has auto-completion for packages to install/prune and it would be nice to make it fuzzy 😅

@swarn swarn merged commit 4925f23 into swarn:main Dec 4, 2023
14 checks passed
@swarn
Copy link
Owner

swarn commented Dec 4, 2023

Cool!

@mrcjkb mrcjkb deleted the luarocks-test branch December 4, 2023 21:10
@swarn
Copy link
Owner

swarn commented Dec 5, 2023

@mrcjkb If you're curious, I got this working.

The problem was the compiler. The windows-latest image comes with mingw. LuaRocks finds and attempts to use mingw. Somehow, it's using the wrong flags — the lua runtime finds the DLL files, but doesn't see that they're valid modules.

Adding the MSVC install action fixes it. LuaRocks uses MSVC and the DLLs work fine. I know you added this action, so I'm not sure what else was going on.

I'm also not sure what changed between now and last January, when the workflow last ran. Either luarocks or the windows-latest changed in some way.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 5, 2023

Nice! Thanks for the update.
That's definitely useful information. Looks like the hererocks installation picks up the toolchain correctly, but the GH action doesn't...

Btw, I've added fuzzy autocompletion to rocks.nvim and it works really nicely 😄

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