Skip to content

Commit b12d2f2

Browse files
author
Robert Masen
committed
move luajit tests to their own task
1 parent 249b29e commit b12d2f2

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
test:
77
strategy:
88
matrix:
9-
luaVersion: ["5.1.5", "5.2.4", "5.3.5", "luajit-2.0.5", "luajit-2.1.0-beta3"]
9+
luaVersion: ["5.1.5", "5.2.4", "5.3.5"]
1010
os: [macOs-latest, ubuntu-latest]
1111

1212
runs-on: ${{ matrix.os }}
@@ -36,4 +36,21 @@ jobs:
3636
- name: test lua
3737
run: |
3838
which lua
39-
lua -e "print(_VERSION)"
39+
lua -e "print(_VERSION)"
40+
lua-jit:
41+
strategy:
42+
matrix:
43+
luaVersion: ["luajit-2.0.5", "luajit-2.1.0-beta3"]
44+
os: [macOs-latest, ubuntu-latest]
45+
runs-on: ${{ matrix.os }}
46+
47+
steps:
48+
- uses: actions/checkout@master
49+
- uses: ./
50+
with:
51+
lua-version: ${{ matrix.luaVersion }}
52+
53+
- name: test lua
54+
run: |
55+
which luajit
56+
luajit -e "print(_VERSION)"

main.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,14 @@ async function buildAndInstallLuaJIT(sourcePath) {
216216
}
217217
}
218218
await exec.exec(`make PREFIX=${INSTALL_PREFIX}`, undefined, { cwd: sourcePath, env })
219-
await exec.exec("sudo make install", undefined, { cwd: sourcePath, env })
220-
219+
await exec.exec("sudo -E make install", undefined, { cwd: sourcePath })
220+
if (/beta/i.test(sourcePath)) {
221+
let version = path.parse(sourcePath).base
222+
if (!version) {
223+
throw new Error(`Unable to determine full beta binary name from source path: ${sourcePath}`)
224+
}
225+
await exec.exec("sudo -E ln -sf luajit-2.1.0-beta3 /usr/local/bin/luajit")
226+
}
221227
}
222228

223229
async function buildAndInstallLua5(sourcePath, platform) {

0 commit comments

Comments
 (0)