fixes development rockspec for MinGW and adds Windows / macOS to the test matrix #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR has two purposes:
lua-zlib-scm-0.rockspec) for MinGW / MinGW-w64 on Windows, and simplifies the build on Unix or MSVC on Windows;macos-14andwindows-2025to the test matrix.Changes on
lua-zlib-scm-0.rockspeclibdirs = { "$(ZLIB_LIBDIR)" }was added to the default build rule. This change allows to buildlua-zlibwith zlib installed at custom places on both Unix and Windows through the commandNote
The old setting only linked with zlib from system directories (
/usr/liband/usr/local/lib).mingwsolves the linking problem for both MinGW / MinGW-w64 on Windows. Here, I applied a clever trick: on Windows, MinGW / MinGW-w64 can link libraries by the feeding the DLL to the linker. Then, grounded on the fact that a standard zlib installation always emits a DLL namedlibzlib1.dllorzlib1.dll, the build rules of LuaRocks allows it to linklua-zlibwith zlib via the DLL.Changes on
.github/workflows/test.ymlmacos-14andwindows-2025to the test matrix;Notes
lua-zlibwith MinGW / MinGW-w64 throughlua-zlib-scm-0.rockspec, most likely it is related to a misconfiguration of LuaRocks. Also, anytime it happens, feel free to mention me through a @ , because I think I can help;lua-zlib-scm-0.rockspec.