Browse Source

[lua] Remove haxe-deps and directly reference dependencies; re-enable 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
inklit 2 years ago
parent
commit
5979f5769b

+ 3 - 3
.github/workflows/main.yml

@@ -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:

+ 1 - 1
Earthfile

@@ -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
 

+ 5 - 5
extra/github-actions/workflows/main.yml

@@ -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:
@@ -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:
@@ -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:

+ 12 - 1
tests/runci/targets/Lua.hx

@@ -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"]);

+ 1 - 1
tests/unit/src/unit/issues/Issue10752.hx

@@ -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);