Skip to content

Support LuaJit.

Support LuaJit. #21

Workflow file for this run

name: unit_test
on:
push:
paths:
- 'scripts/phrase.lua'
- 'scripts/phrase/*.lua'
- 'test/*'
pull_request:
paths:
- 'scripts/phrase.lua'
- 'scripts/phrase/*.lua'
- 'test/*'
jobs:
unit_test:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
version: [5.1, 5.2, 5.3, 5.4, jit]
env:
LUATYPE: ${{ matrix.version }}
LUALIB: ${{ matrix.version == 'jit' && 'jit-5.1' || matrix.version }}
LUAROCKVER: ${{ matrix.version == 'jit' && '5.1' || matrix.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Lua
run: sudo apt-get install lua${{ env.LUATYPE }} liblua${{ env.LUALIB }}-dev luarocks
- name: Configure Luarocks
run: luarocks config lua_version ${{ env.LUAROCKVER }}
- name: Install lua-utf8
run: luarocks --local install luautf8
- name: Run Test
working-directory: test
run: ./test_all ${{ env.LUATYPE }}