Skip to content

Commit

Permalink
[lua] Remove haxe-deps and directly reference dependencies; re-enable…
Browse files Browse the repository at this point in the history
… CI (#10916)

* Update JsonParser.hx

Respect lua-vanilla for Json.parse

* fix typo

* Update Lua.hx

* Update Earthfile

* Update main.yml

* Update Lua.hx

* Update main.yml

* Update main.yml

* Update Lua.hx

* Update Lua.hx

* Update Issue10752.hx

This test fails on Lua (returns 0)

* Update Lua.hx

* Update Lua.hx

* Update Lua.hx
  • Loading branch information
inklit authored Jan 4, 2023
1 parent 966864c commit 5979f57
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,14 @@ jobs:
fail-fast: false
matrix:
# TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/5024
target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, neko]
target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, neko]
include:
- target: hl
APT_PACKAGES: cmake ninja-build libturbojpeg-dev
- target: cpp
APT_PACKAGES: gcc-multilib g++-multilib
# - target: lua
# APT_PACKAGES: ncurses-dev
- target: lua
APT_PACKAGES: ncurses-dev
steps:
- uses: actions/checkout@main
with:
Expand Down
2 changes: 1 addition & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ test-all:
BUILD +test-jvm
BUILD +test-cs
BUILD +test-cpp
# BUILD +test-lua
BUILD +test-lua
BUILD +test-js
BUILD +test-flash

Expand Down
10 changes: 5 additions & 5 deletions extra/github-actions/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ jobs:
fail-fast: false
matrix:
# TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/5024
target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, neko]
target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, neko]
include:
- target: hl
APT_PACKAGES: cmake ninja-build libturbojpeg-dev
- target: cpp
APT_PACKAGES: gcc-multilib g++-multilib
# - target: lua
# APT_PACKAGES: ncurses-dev
- target: lua
APT_PACKAGES: ncurses-dev
steps:
- uses: actions/checkout@main
with:
Expand Down Expand Up @@ -292,7 +292,7 @@ jobs:
fail-fast: false
matrix:
# TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/5024
target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, flash9, neko]
target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, flash9, neko]
steps:
- uses: actions/checkout@main
with:
Expand All @@ -318,7 +318,7 @@ jobs:
matrix:
# TODO jvm: https://github.com/HaxeFoundation/haxe/issues/8601
# TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/5024
target: [macro, js, hl, cpp, java, cs, php, python, neko]
target: [macro, js, hl, cpp, java, cs, php, python, lua, neko]
steps:
- uses: actions/checkout@main
with:
Expand Down
13 changes: 12 additions & 1 deletion tests/runci/targets/Lua.hx
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,20 @@ class Lua {
// Note: don't use a user config
// attemptCommand("luarocks", ["config", "--user-config"]);

installLib("haxe-deps", "0.0.1-6");
installLib("luasec", "1.0.2-1");

installLib("lrexlib-pcre", "2.9.1-1");
installLib("luv", "1.36.0-0");
installLib("luasocket", "3.0rc1-2");
installLib("luautf8", "0.1.1-1");

//Install bit32 for lua 5.1
if(lv == "-l5.1"){
installLib("bit32", "5.2.2-1");
}

installLib("hx-lua-simdjson", "0.0.1-1");

changeDirectory(unitDir);
runCommand("haxe", ["compile-lua.hxml"].concat(args));
runCommand("lua", ["bin/unit.lua"]);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/src/unit/issues/Issue10752.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Issue10752 extends Test {
function shl(x, y)
return x << y;

#if (!php && !python)
#if (!php && !python && !lua)
function test() {
eq(2, shl(1, 33));
eq(2, 1 << 33);
Expand Down

0 comments on commit 5979f57

Please sign in to comment.