2
0
Эх сурвалжийг харах

TravisCI: fix cpp testing.

Andy Li 11 жил өмнө
parent
commit
d2292c3bd2

+ 8 - 0
tests/unit/RunTravis.hx

@@ -15,6 +15,7 @@ class RunTravis {
 	}
 
 	static function main():Void {
+		var cwd = Sys.getCwd();
 		switch (Sys.getEnv("TARGET")) {
 			case "macro":
 				runProcess("haxe", ["compile-macro.hxml"]);
@@ -26,8 +27,15 @@ class RunTravis {
 				runProcess("haxe", ["compile-php.hxml"]);
 				runProcess("php", ["php/index.php"]);
 			case "cpp":
+				//hxcpp dependencies
 				runProcess("sudo", ["apt-get", "install", "gcc-multilib", "g++-multilib", "-y"]);
+
+				//install and build hxcpp
 				runProcess("haxelib", ["git", "hxcpp", "https://github.com/HaxeFoundation/hxcpp.git"]);
+				Sys.setCwd(Sys.getEnv("HOME") + "/haxelib/hxcpp/git/runtime/");
+				runProcess("haxelib", ["run", "hxcpp", "BuildLibs.xml"]);
+				Sys.setCwd(cwd);
+				
 				runProcess("haxe", ["compile-cpp.hxml"]);
 				runProcess("./cpp/Test-debug", []);
 			case target: