luvit / luv

Bare libuv bindings for lua
Apache License 2.0
822 stars 185 forks source link

specify how to run tests in the rockspec #592

Closed teto closed 2 years ago

teto commented 2 years ago

hi,

I am trying to bump the luv package in nixos https://github.com/NixOS/nixpkgs/issues/163134 to resume development on neovim. I found some issues in the nix packaging and I thought I would enable the luv testsuite. luarocks has had support for tests for a few years now, it would be nice to leverage it so that the user doesn't have to look at how to run tests but can just run luarocks test. It helps automating the maintainance of lua packages in nixos as we can default to luarocks test too.

The doc is sparse on the wiki but here is a reference https://www.lua.org/wshop18/Muhammad.pdf (page 10) or even better the luarocks package itself.

teto commented 2 years ago

one issue I've found while packaging too is that this release https://github.com/luvit/luv/releases/tag/1.43.0-0 doesn't contain the makefile but contains the CMakeLists.txt (I was trying to run make test). I am surprised since I thought github releases would contain all of the repo but looks like this action creates the release instead:

    - name: Github Release
      id: create_release
      uses: softprops/action-gh-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        files: luv-${{ steps.get_version.outputs.VERSION }}.tar.gz
        draft: false
        prerelease: false

I wonder why. I could build from source but that would break my automation (I get the source/tarball from the rockspec/luarocks.org)

squeek502 commented 2 years ago

The published release tar is mostly intended for use by Luarocks, so it only contains things that are required to build via Luarocks.

It's created here:

https://github.com/luvit/luv/blob/938b4051950b623c214048e97ca77fef9ae81d5a/.ci/make_rockspec.sh#L19-L24

teto commented 2 years ago

cool thanks !