lua.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. name: lua_lint
  2. # Lint on lua changes on builtin or if workflow changed
  3. on:
  4. push:
  5. paths:
  6. - 'builtin/**.lua'
  7. - 'games/devtest/**.lua'
  8. - '.github/workflows/**.yml'
  9. pull_request:
  10. paths:
  11. - 'builtin/**.lua'
  12. - 'games/devtest/**.lua'
  13. - '.github/workflows/**.yml'
  14. jobs:
  15. # Note that the integration tests are also run in build.yml, but only when C++ code is changed.
  16. integration_tests:
  17. name: "Compile and run multiplayer tests"
  18. runs-on: ubuntu-24.04
  19. steps:
  20. - uses: actions/checkout@v4
  21. - name: Install deps
  22. run: |
  23. source ./util/ci/common.sh
  24. install_linux_deps clang gdb libluajit-5.1-dev
  25. - name: Build
  26. run: |
  27. ./util/ci/build.sh
  28. env:
  29. CC: clang
  30. CXX: clang++
  31. CMAKE_FLAGS: "-DENABLE_GETTEXT=0 -DBUILD_SERVER=0 -DBUILD_UNITTESTS=0"
  32. - name: Integration test + devtest
  33. run: |
  34. serverconf="profiler.load=true" ./util/test_multiplayer.sh
  35. luacheck:
  36. name: "Builtin Luacheck and Unit Tests"
  37. runs-on: ubuntu-latest
  38. steps:
  39. - uses: actions/checkout@v4
  40. - uses: leafo/gh-actions-lua@v10
  41. with:
  42. luaVersion: "5.1.5"
  43. - uses: leafo/gh-actions-luarocks@v4.3.0
  44. - name: Install LuaJIT
  45. run: ./util/ci/build_luajit.sh
  46. - name: Install luarocks tools
  47. run: |
  48. luarocks install --local luacheck
  49. luarocks install --local busted
  50. - name: Run checks (builtin)
  51. run: |
  52. $HOME/.luarocks/bin/luacheck builtin
  53. $HOME/.luarocks/bin/busted builtin
  54. $HOME/.luarocks/bin/busted builtin --lua=$HOME/LuaJIT/src/luajit
  55. - name: Run checks (devtest)
  56. run: |
  57. $HOME/.luarocks/bin/luacheck --config=games/devtest/.luacheckrc games/devtest