Browse Source

[ci] enable CI, disable tests that do not apply any more

Rudy Ges 1 year ago
parent
commit
14908ebecd
3 changed files with 56 additions and 43 deletions
  1. 16 5
      .github/workflows/main.yml
  2. 3 3
      tests/runci/targets/Macro.hx
  3. 37 35
      tests/server/src/cases/ServerTests.hx

+ 16 - 5
.github/workflows/main.yml

@@ -371,8 +371,16 @@ jobs:
       fail-fast: false
       matrix:
         ocaml: ["4.08.1", "5.0.0"]
-        # target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, flash, neko]
-        target: [macro]
+        target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, flash, 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: flash
+            APT_PACKAGES: libglib2.0-0 libgtk2.0-0 libfreetype6 xvfb
     steps:
       - uses: actions/checkout@main
         with:
@@ -689,7 +697,7 @@ jobs:
       fail-fast: false
       matrix:
         # TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/10919
-        target: [macro]
+        target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, flash, neko]
     steps:
       - uses: actions/checkout@main
         with:
@@ -786,7 +794,7 @@ jobs:
       matrix:
         # TODO jvm: https://github.com/HaxeFoundation/haxe/issues/8601
         # TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/10919
-        target: [macro]
+        target: [macro, js, hl, cpp, java, cs, php, python, flash, neko]
     steps:
       - uses: actions/checkout@main
         with:
@@ -880,7 +888,10 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        target: [macro]
+        target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, flash, neko]
+        include:
+          - target: hl
+            BREW_PACKAGES: ninja
     steps:
       - uses: actions/checkout@main
         with:

+ 3 - 3
tests/runci/targets/Macro.hx

@@ -5,9 +5,9 @@ import runci.Config.*;
 
 class Macro {
 	static public function run(args:Array<String>) {
-		runCommand("haxe", ["compile-hxb-interp.hxml"].concat(args));
-		runCommand("haxe", ["compile-read-hxb-interp.hxml"].concat(args));
-		return; // don't overlook this
+		// runCommand("haxe", ["compile-hxb-interp.hxml"].concat(args));
+		// runCommand("haxe", ["compile-read-hxb-interp.hxml"].concat(args));
+		// return; // don't overlook this
 
 		runCommand("haxe", ["compile-macro.hxml"].concat(args));
 

+ 37 - 35
tests/server/src/cases/ServerTests.hx

@@ -109,26 +109,26 @@ class ServerTests extends TestCase {
 		assertSuccess();
 	}
 
-	function testDisplayModuleRecache() {
-		vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
-		var args = ["--main", "HelloWorld", "--interp"];
-		runHaxe(args);
-		runHaxe(args);
-		assertReuse("HelloWorld");
+	// function testDisplayModuleRecache() {
+	// 	vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
+	// 	var args = ["--main", "HelloWorld", "--interp"];
+	// 	runHaxe(args);
+	// 	runHaxe(args);
+	// 	assertReuse("HelloWorld");
 
-		var args2 = ["--main", "HelloWorld", "--interp", "--display", "HelloWorld.hx@64@type"];
-		runHaxe(args2);
+	// 	var args2 = ["--main", "HelloWorld", "--interp", "--display", "HelloWorld.hx@64@type"];
+	// 	runHaxe(args2);
 
-		runHaxe(args);
-		assertReuse("HelloWorld");
+	// 	runHaxe(args);
+	// 	assertReuse("HelloWorld");
 
-		// make sure we still invalidate if the file does change
-		runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("HelloWorld.hx")});
-		runHaxe(args2);
+	// 	// make sure we still invalidate if the file does change
+	// 	runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("HelloWorld.hx")});
+	// 	runHaxe(args2);
 
-		runHaxe(args);
-		assertSkipping("HelloWorld", Tainted("check_display_file"));
-	}
+	// 	runHaxe(args);
+	// 	assertSkipping("HelloWorld", Tainted("check_display_file"));
+	// }
 
 	function testMutuallyDependent() {
 		vfs.putContent("MutuallyDependent1.hx", getTemplate("MutuallyDependent1.hx"));
@@ -146,6 +146,7 @@ class ServerTests extends TestCase {
 		vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
 		var args = ["--main", "HelloWorld", "--interp"];
 		runHaxe(args);
+		assertSuccess();
 		runHaxe(args);
 		assertReuse("HelloWorld");
 		runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("HelloWorld.hx")});
@@ -153,28 +154,29 @@ class ServerTests extends TestCase {
 		assertSkipping("HelloWorld", Tainted("server/invalidate"));
 		runHaxe(args.concat(["--display", "HelloWorld.hx@0@diagnostics"]));
 		runHaxe(args);
+		// Note: reusing from successful compilation above
 		assertReuse("HelloWorld");
 	}
 
-	function testDiagnosticsRecache2() {
-		vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
-		var args = ["--main", "HelloWorld", "--interp"];
-		runHaxe(args.concat(["--display", "HelloWorld.hx@0@diagnostics"]));
-		runHaxe(args);
-		assertReuse("HelloWorld");
-	}
-
-	function testDiagnosticsRecache3() {
-		vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
-		var args = ["--main", "HelloWorld", "--interp"];
-		runHaxe(args);
-		runHaxe(args);
-		assertReuse("HelloWorld");
-		runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("HelloWorld.hx")});
-		runHaxe(args.concat(["--display", "HelloWorld.hx@0@diagnostics"]));
-		runHaxe(args.concat(["--display", "HelloWorld.hx@0@hover"]));
-		assertReuse("HelloWorld");
-	}
+	// function testDiagnosticsRecache2() {
+	// 	vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
+	// 	var args = ["--main", "HelloWorld", "--interp"];
+	// 	runHaxe(args.concat(["--display", "HelloWorld.hx@0@diagnostics"]));
+	// 	runHaxe(args);
+	// 	assertReuse("HelloWorld");
+	// }
+
+	// function testDiagnosticsRecache3() {
+	// 	vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));
+	// 	var args = ["--main", "HelloWorld", "--interp"];
+	// 	runHaxe(args);
+	// 	runHaxe(args);
+	// 	assertReuse("HelloWorld");
+	// 	runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("HelloWorld.hx")});
+	// 	runHaxe(args.concat(["--display", "HelloWorld.hx@0@diagnostics"]));
+	// 	runHaxe(args.concat(["--display", "HelloWorld.hx@0@hover"]));
+	// 	assertReuse("HelloWorld");
+	// }
 
 	function testSyntaxCache() {
 		vfs.putContent("HelloWorld.hx", getTemplate("HelloWorld.hx"));