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

New test suite for all verions of Lua using GitHub actions #50

Merged
merged 16 commits into from
Apr 25, 2020

Conversation

leafo
Copy link

@leafo leafo commented Sep 22, 2019

As I was writing #49 I wanted to update the test suite to reflect all versions of Lua. I think GitHub actions is probably the future of all CI on GitHub so I opted to go that direction. Sadly it's currently in beta. That means if this pull request is merged, the tests may not actually run until the OpenResty account gets whitelisted for the beta, or the feature is publicly launched (I think that's going to happen soon).

If you're an owner of the OpenResty org go here (you may get granted access immediately): https://github.com/features/actions/signup/

You can see a build here on my account: https://github.com/leafo/lua-cjson/commit/68e2a4a17026e826a661bb001cb86fce27771dc1/checks

The build matrix tests:

  • Lua 5.1, 5.2, 5.3, LuaJIT compiled from luajit.org, LuaJIT compiled from the OpenResty fork
  • clang and gcc (like current test)

The following test are run:

  • original runtests.sh
  • new tests added by agentzh using perl (+ run with valgrind)
  • cppcheck

I tried to make my changes to the existing test suites as conservative as possible, since I don't know if anyone else is depending on them in other build pipelines. I think the entire setup is a huge mess though, and someone probably needs to maintain all the tests in one place for a future patch.

  • Any changes to the test suites are done via environment variables, so they'll run the same by default
  • I didn't see a way to make cmake detect luajit, so I disabled the cmake build test in runtests.sh for luajit
  • Hash tables are unordered in Lua, so I added some helper functions to allow testing output despite ordering so the tests are not dependent on a specific implementation of Lua
  • ccpcheck is currently broken in Travis, but it wasn't failing the build: The command "cppcheck -i ./luajit2 -i --force --error-exitcode=1 --enable=warning . > build.log 2>&1 || (cat build.log && exit 1)" exited with 1.. I fixed the issue on the github actions build
  • This pull request also includes my other patch in Support Lua 5.2 plus #49, so that should be merged first

@leafo leafo mentioned this pull request Oct 9, 2019
@leafo leafo force-pushed the leafo/github-actions-tests branch from de4475e to 55e3b9f Compare April 25, 2020 21:20
@leafo
Copy link
Author

leafo commented Apr 25, 2020

Github actions is now generally available so I'm merging this. (I also merged #49)

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.

1 participant