Skip to content

Commit 3a18c52

Browse files
authored
Add configuration for the Emscripten buildbot. (#611)
1 parent a80daa1 commit 3a18c52

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed

master/custom/factories.py

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,6 +1256,10 @@ def host_triple(props):
12561256
return build_triple.split("-")[0] + "-linux-android"
12571257

12581258

1259+
##############################################################################
1260+
############################ VALGRIND BUILDS ###############################
1261+
##############################################################################
1262+
12591263
class ValgrindBuild(UnixBuild):
12601264
buildersuffix = ".valgrind"
12611265
configureFlags = [
@@ -1319,3 +1323,77 @@ def setup(self, parallel, branch, **kwargs):
13191323
))
13201324

13211325
self.addStep(Clean())
1326+
1327+
1328+
##############################################################################
1329+
########################### EMSCRIPTEN BUILDS ##############################
1330+
##############################################################################
1331+
1332+
class EmscriptenBuild(BaseBuild):
1333+
"""Emscripten build.
1334+
1335+
* The Emscripten SDK must be installed, and configured to use the SDK
1336+
version required by the current main PR.
1337+
1338+
"""
1339+
buildersuffix = ".emscripten"
1340+
factory_tags = ["emscripten"]
1341+
1342+
def setup(self, **kwargs):
1343+
compile_environ = {
1344+
"PATH": os.pathsep.join([
1345+
"/home/emscripten/emsdk",
1346+
"/home/emscripten/emsdk/upstream/emscripten",
1347+
"/home/emscripten/.local/bin",
1348+
"/usr/local/bin",
1349+
"/usr/bin",
1350+
"/bin",
1351+
]),
1352+
"EMSDK": "/home/emscripten/emsdk",
1353+
}
1354+
1355+
self.addSteps([
1356+
Configure(
1357+
name="Configure build Python",
1358+
command=["python3", "Tools/wasm/emscripten", "configure-build-python"],
1359+
env=compile_environ,
1360+
),
1361+
Compile(
1362+
name="Compile build Python",
1363+
command=["python3", "Tools/wasm/emscripten", "make-build-python"],
1364+
env=compile_environ,
1365+
),
1366+
Compile(
1367+
name="Compile host libFFI",
1368+
command=["python3", "Tools/wasm/emscripten", "make-libffi"],
1369+
env=compile_environ,
1370+
),
1371+
Configure(
1372+
name="Configure host Python",
1373+
command=["python3", "Tools/wasm/emscripten", "configure-host"],
1374+
env=compile_environ,
1375+
),
1376+
Compile(
1377+
name="Compile host Python",
1378+
command=["python3", "Tools/wasm/emscripten", "make-host"],
1379+
env=compile_environ,
1380+
),
1381+
Test(
1382+
command=[
1383+
"cross-build/wasm32-emscripten/build/python/python.sh",
1384+
"-m", "test",
1385+
"-v",
1386+
"-uall",
1387+
"--rerun",
1388+
"--single-process",
1389+
"-W",
1390+
],
1391+
env=compile_environ,
1392+
timeout=step_timeout(self.test_timeout),
1393+
),
1394+
Clean(
1395+
name="Clean the builds",
1396+
command=["python3", "Tools/wasm/emscripten", "clean"],
1397+
env=compile_environ,
1398+
)
1399+
])

master/custom/workers.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,12 @@ def get_workers(settings):
304304
not_branches=['3.9', '3.10', '3.11', '3.12'],
305305
parallel_builders=4,
306306
),
307+
cpw(
308+
name="rkm-emscripten",
309+
tags=['emscripten'],
310+
not_branches=['3.9', '3.10', '3.11', '3.12', '3.13'],
311+
parallel_builders=4,
312+
),
307313
cpw(
308314
name="mhsmith-android-aarch64",
309315
tags=['android'],

0 commit comments

Comments
 (0)