Skip to content

Commit d8ed65b

Browse files
committed
Improvements to the Emscripten buildbot
* 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 python/cpython#146156 has to land first
1 parent de388c9 commit d8ed65b

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

master/custom/factories.py

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,48 +1357,52 @@ 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-emscripetn"],
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"],
1377+
env=compile_environ,
1378+
),
1379+
Compile(
1380+
name="Compile host libFFI (if needed)",
1381+
command=["python3", "Platform/emscripten", "make-libffi"],
13811382
env=compile_environ,
13821383
),
13831384
Compile(
1384-
name="Compile host libFFI",
1385-
command=["python3", "Tools/wasm/emscripten", "make-libffi"],
1385+
name="Compile host mpdec (if needed)",
1386+
command=["python3", "Platform/emscripten", "make-mpdec"],
13861387
env=compile_environ,
13871388
),
13881389
Configure(
13891390
name="Configure host Python",
1390-
command=["python3", "Tools/wasm/emscripten", "configure-host"],
1391+
command=["python3", "Platform/emscripten", "configure-host"],
13911392
env=compile_environ,
13921393
),
13931394
Compile(
13941395
name="Compile host Python",
1395-
command=["python3", "Tools/wasm/emscripten", "make-host"],
1396+
command=["python3", "Platform/emscripten", "make-host"],
13961397
env=compile_environ,
13971398
),
13981399
Test(
13991400
name="Node full test suite",
14001401
command=[
1401-
"cross-build/wasm32-emscripten/build/python/python.sh",
1402+
"python3",
1403+
"Platform/emscripten",
1404+
"run",
1405+
"--",
14021406
"-m", "test",
14031407
"-v",
14041408
"-uall",
@@ -1412,14 +1416,14 @@ def setup(self, **kwargs):
14121416
Test(
14131417
name="PyRepl in Chrome smoke test",
14141418
command=[
1415-
"Tools/wasm/emscripten/browser_test/run_test.sh",
1419+
"Platform/emscripten/browser_test/run_test.sh",
14161420
],
14171421
env=compile_environ,
14181422
timeout=step_timeout(self.test_timeout),
14191423
),
14201424
Clean(
14211425
name="Clean the builds",
1422-
command=["python3", "Tools/wasm/emscripten", "clean"],
1426+
command=["python3", "Platform/emscripten", "clean"],
14231427
env=compile_environ,
14241428
)
14251429
])

0 commit comments

Comments
 (0)