Skip to content

Commit f47ad69

Browse files
authored
fix(ci): build LuaJIT using system malloc for lualanes tests (lunarmodules#144)
1 parent 5a03488 commit f47ad69

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/busted.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,31 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
luaVersion: [ "5.4", "5.3", "5.2", "5.1", "luajit" ] # , "luajit-openresty"
11+
luaVersion: [ "5.4", "5.3", "5.2", "5.1", "luajit" , "luajit-openresty" ]
1212
runs-on: ubuntu-22.04
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v6
1616

1717
- name: Setup ‘lua’
18+
if: ${{ !startsWith(matrix.luaVersion, 'luajit') }}
1819
uses: luarocks/gh-actions-lua@master
1920
with:
2021
luaVersion: ${{ matrix.luaVersion }}
2122

23+
# For the multithreading tests (lanes) to work with
24+
# LuaJIT / OpenResty interpreters, we have to build LuaJIT / OpenResty
25+
# with the setting `-DLUAJIT_USE_SYSMALLOC` turned on,
26+
# because the memory allocator employed by these interpreters
27+
# does NOT work well with lanes: see
28+
# https://github.com/LuaLanes/lanes/issues/217#issuecomment-1665856470
29+
- name: Setup ‘luajit’
30+
if: ${{ startsWith(matrix.luaVersion, 'luajit') }}
31+
uses: luarocks/gh-actions-lua@master
32+
with:
33+
luaVersion: ${{ matrix.luaVersion }}
34+
luaCompileFlags: XCFLAGS=-DLUAJIT_USE_SYSMALLOC
35+
2236
- name: Setup ‘luarocks’
2337
uses: luarocks/gh-actions-luarocks@master
2438

0 commit comments

Comments
 (0)