diff --git a/Earthfile b/Earthfile index 33eaa695..2dfdc21a 100644 --- a/Earthfile +++ b/Earthfile @@ -209,6 +209,15 @@ run.n: RUN haxe client.hxml SAVE ARTIFACT run.n AS LOCAL run.n +haxelib-binary: + FROM +devcontainer + COPY .git .git + COPY src src + COPY hx3compat hx3compat + COPY client_cpp.hxml haxelib.json . + RUN haxe client_cpp.hxml + SAVE ARTIFACT haxelib AS LOCAL haxelib + package-haxelib: FROM +devcontainer-base COPY src src @@ -518,6 +527,7 @@ ci-tests: # for package.hxml COPY haxelib.json README.md . COPY +run.n/run.n . + COPY +haxelib-binary/haxelib . COPY +ci-runner/ci.n bin/ci.n ENV HAXELIB_SERVER=localhost diff --git a/libs.hxml b/libs.hxml index ef9ca5b3..02cf8bac 100644 --- a/libs.hxml +++ b/libs.hxml @@ -29,4 +29,5 @@ -cmd curl -sSLk https://lib.haxe.org/files/3.0/ufront-2,0,0.zip -o haxelib_global/ufront.zip && neko run.n install --always --skip-dependencies haxelib_global/ufront.zip -cmd curl -sSLk https://lib.haxe.org/files/3.0/utest-1,9,6.zip -o haxelib_global/utest.zip && neko run.n install --always --skip-dependencies haxelib_global/utest.zip -cmd curl -sSLk https://lib.haxe.org/files/3.0/hxnodejs-12,1,0.zip -o haxelib_global/hxnodejs.zip && neko run.n install --always --skip-dependencies haxelib_global/hxnodejs.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/hxcpp-4,3,2.zip -o haxelib_global/hxcpp.zip && neko run.n install --always --skip-dependencies haxelib_global/hxcpp.zip -cmd neko run.n dev record-macros lib/record-macros diff --git a/test/IntegrationTests.hx b/test/IntegrationTests.hx index 532c1466..cc6f2b19 100644 --- a/test/IntegrationTests.hx +++ b/test/IntegrationTests.hx @@ -97,6 +97,8 @@ class IntegrationTests extends TestBase { function haxelib(args:Array, ?input:String):Process { final p = #if system_haxelib new Process("haxelib", ["-R", serverUrl].concat(args)); + #elseif haxelib_path + new Process(haxe.macro.Compiler.getDefine("haxelib_path"), ["-R", serverUrl].concat(args)); #else new Process("neko", [haxelibBin, "-R", serverUrl].concat(args)); #end diff --git a/test/RunCi.hx b/test/RunCi.hx index 268b178e..40c4dd0f 100644 --- a/test/RunCi.hx +++ b/test/RunCi.hx @@ -370,19 +370,6 @@ Listen 2000 } static function integrationTests():Void { - function test():Void { - switch (Sys.getEnv("TRAVIS_HAXE_VERSION")) { - case null, "development": - runCommand("haxe", ["integration_tests.hxml"]); - case "3.1.3": - runCommand("haxe", ["integration_tests.hxml", "-D", "system_haxelib"]); - case _: - runCommand("haxe", ["integration_tests.hxml"]); - runCommand("neko", ["bin/integration_tests.n"]); - runCommand("haxe", ["integration_tests.hxml", "-D", "system_haxelib"]); - } - runCommand("neko", ["bin/integration_tests.n"]); - } var dbConfigPath = Path.join(["www", "dbconfig.json"]); saveContent(dbConfigPath, Json.stringify({ user: Sys.getEnv("HAXELIB_DB_USER"), @@ -391,7 +378,14 @@ Listen 2000 port: Std.parseInt(Sys.getEnv("HAXELIB_DB_PORT")), database: Sys.getEnv("HAXELIB_DB_NAME"), }, "\t")); - test(); + runCommand("haxe", ["integration_tests.hxml"]); + runCommand("neko", ["bin/integration_tests.n"]); + runCommand("haxe", [ + "integration_tests.hxml", + "-D", + 'haxelib_path=${Path.join([Sys.getCwd(), "haxelib"])}' + ]); + runCommand("neko", ["bin/integration_tests.n"]); } static function deploy():Void {