Skip to content

Commit f82a93f

Browse files
Improvements to the Emscripten buildbot (#687)
* Use the build script from its new `Platform/emscripten/__main__.py` location * Use `python3 Platform/emscripten run` to avoid hard coding build output path * Use new `EMSDK_CACHE` environment variable to allow build script to manage Emscripten installations * Build libmpdec * Cache libffi and libmpdec * Allow build script to manage node installations Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
1 parent de388c9 commit f82a93f

File tree

1 file changed

+18
-25
lines changed

1 file changed

+18
-25
lines changed

master/custom/factories.py

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,69 +1357,62 @@ class EmscriptenBuild(BaseBuild):
13571357

13581358
def setup(self, **kwargs):
13591359
compile_environ = {
1360-
"PATH": os.pathsep.join([
1361-
"/home/emscripten/emsdk",
1362-
"/home/emscripten/emsdk/upstream/emscripten",
1363-
"/home/emscripten/.local/bin",
1364-
"/usr/local/bin",
1365-
"/usr/bin",
1366-
"/bin",
1367-
]),
1368-
"EMSDK": "/home/emscripten/emsdk",
1369-
"PYTHON_NODE_VERSION": "24",
1360+
"EMSDK_CACHE": "/home/emscripten/emsdk-versions",
13701361
}
13711362

13721363
self.addSteps([
1364+
Configure(
1365+
name="Install emscripten (if needed)",
1366+
command=["python3", "Platform/emscripten", "install-emscripten"],
1367+
env=compile_environ,
1368+
),
13731369
Configure(
13741370
name="Configure build Python",
1375-
command=["python3", "Tools/wasm/emscripten", "configure-build-python"],
1371+
command=["python3", "Platform/emscripten", "configure-build-python"],
13761372
env=compile_environ,
13771373
),
13781374
Compile(
13791375
name="Compile build Python",
1380-
command=["python3", "Tools/wasm/emscripten", "make-build-python"],
1376+
command=["python3", "Platform/emscripten", "make-build-python"],
13811377
env=compile_environ,
13821378
),
13831379
Compile(
1384-
name="Compile host libFFI",
1385-
command=["python3", "Tools/wasm/emscripten", "make-libffi"],
1380+
name="Compile host dependencies (if needed)",
1381+
command=["python3", "Platform/emscripten", "make-dependencies"],
13861382
env=compile_environ,
13871383
),
13881384
Configure(
13891385
name="Configure host Python",
1390-
command=["python3", "Tools/wasm/emscripten", "configure-host"],
1386+
command=["python3", "Platform/emscripten", "configure-host"],
13911387
env=compile_environ,
13921388
),
13931389
Compile(
13941390
name="Compile host Python",
1395-
command=["python3", "Tools/wasm/emscripten", "make-host"],
1391+
command=["python3", "Platform/emscripten", "make-host"],
13961392
env=compile_environ,
13971393
),
13981394
Test(
13991395
name="Node full test suite",
14001396
command=[
1401-
"cross-build/wasm32-emscripten/build/python/python.sh",
1402-
"-m", "test",
1403-
"-v",
1404-
"-uall",
1405-
"--rerun",
1406-
"--single-process",
1407-
"-W",
1397+
"python3",
1398+
"Platform/emscripten",
1399+
"run",
1400+
"--test",
14081401
],
14091402
env=compile_environ,
14101403
timeout=step_timeout(self.test_timeout),
14111404
),
14121405
Test(
14131406
name="PyRepl in Chrome smoke test",
14141407
command=[
1415-
"Tools/wasm/emscripten/browser_test/run_test.sh",
1408+
"Platform/emscripten/browser_test/run_test.sh",
14161409
],
14171410
env=compile_environ,
14181411
timeout=step_timeout(self.test_timeout),
14191412
),
14201413
Clean(
14211414
name="Clean the builds",
1422-
command=["python3", "Tools/wasm/emscripten", "clean"],
1415+
command=["python3", "Platform/emscripten", "clean"],
14231416
env=compile_environ,
14241417
)
14251418
])

0 commit comments

Comments
 (0)