aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo
diff options
context:
space:
mode:
authorDelan Azabani <dazabani@igalia.com>2025-01-23 17:05:10 +0800
committerGitHub <noreply@github.com>2025-01-23 09:05:10 +0000
commit0af1204aa3db47c80a50612491a084de859a5be1 (patch)
tree609f1abf48603439bcd50efa270042f0b4c9a29e /python/servo
parent935364b7bcd6f16392a0ea74da3a3a892cd469c7 (diff)
downloadservo-0af1204aa3db47c80a50612491a084de859a5be1.tar.gz
servo-0af1204aa3db47c80a50612491a084de859a5be1.zip
Fix building libservo with `cargo build -p libservo` (#35116)
* Fix building libservo with `cargo build -p libservo` Signed-off-by: Delan Azabani <dazabani@igalia.com> * Test the libservo build in CI Signed-off-by: Delan Azabani <dazabani@igalia.com> * Work around build issue on macOS (#34517) Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'python/servo')
-rw-r--r--python/servo/try_parser.py27
1 files changed, 22 insertions, 5 deletions
diff --git a/python/servo/try_parser.py b/python/servo/try_parser.py
index a2efbec6548..f9297bc5ea9 100644
--- a/python/servo/try_parser.py
+++ b/python/servo/try_parser.py
@@ -57,6 +57,7 @@ class JobConfig(object):
wpt_layout: Layout = Layout.none
profile: str = "release"
unit_tests: bool = False
+ build_libservo: bool = False
bencher: bool = False
wpt_args: str = ""
# These are the fields that must match in between two JobConfigs for them to be able to be
@@ -72,6 +73,7 @@ class JobConfig(object):
self.wpt_layout |= other.wpt_layout
self.unit_tests |= other.unit_tests
+ self.build_libservo |= other.build_libservo
self.bencher |= other.bencher
self.update_name()
return True
@@ -92,6 +94,8 @@ class JobConfig(object):
modifier.append(self.profile.title())
if self.unit_tests:
modifier.append("Unit Tests")
+ if self.build_libservo:
+ modifier.append("Build libservo")
if self.wpt_layout != Layout.none:
modifier.append("WPT")
if self.bencher:
@@ -131,6 +135,8 @@ def handle_modifier(config: JobConfig, s: str) -> Optional[JobConfig]:
s = s.lower()
if "unit-tests" in s:
config.unit_tests = True
+ if "build-libservo" in s:
+ config.build_libservo = True
if "production" in s:
config.profile = "production"
if "bencher" in s:
@@ -175,8 +181,11 @@ class Config(object):
self.fail_fast = True
continue # skip over keyword
if word == "full":
- words.extend(["linux-unit-tests", "linux-wpt-2020", "linux-bencher"])
- words.extend(["macos-unit-tests", "windows-unit-tests", "android", "ohos", "lint"])
+ words.extend(["linux-unit-tests", "linux-build-libservo", "linux-wpt-2020", "linux-bencher"])
+ words.extend([
+ "macos-unit-tests", "macos-build-libservo", "windows-unit-tests", "windows-build-libservo",
+ "android", "ohos", "lint",
+ ])
continue # skip over keyword
if word == "bencher":
words.extend(["linux-bencher", "macos-bencher", "windows-bencher", "android-bencher", "ohos-bencher"])
@@ -220,6 +229,7 @@ class TestParser(unittest.TestCase):
'name': 'Linux (Unit Tests)',
'profile': 'release',
'unit_tests': True,
+ 'build_libservo': False,
'workflow': 'linux',
'wpt_layout': 'none',
'wpt_args': ''
@@ -230,29 +240,32 @@ class TestParser(unittest.TestCase):
self.assertDictEqual(json.loads(Config("").to_json()),
{"fail_fast": False, "matrix": [
{
- "name": "Linux (Unit Tests, WPT, Bencher)",
+ "name": "Linux (Unit Tests, Build libservo, WPT, Bencher)",
"workflow": "linux",
"wpt_layout": "2020",
"profile": "release",
"unit_tests": True,
+ 'build_libservo': True,
'bencher': True,
"wpt_args": ""
},
{
- "name": "MacOS (Unit Tests)",
+ "name": "MacOS (Unit Tests, Build libservo)",
"workflow": "macos",
"wpt_layout": "none",
"profile": "release",
"unit_tests": True,
+ 'build_libservo': True,
'bencher': False,
"wpt_args": ""
},
{
- "name": "Windows (Unit Tests)",
+ "name": "Windows (Unit Tests, Build libservo)",
"workflow": "windows",
"wpt_layout": "none",
"profile": "release",
"unit_tests": True,
+ 'build_libservo': True,
'bencher': False,
"wpt_args": ""
},
@@ -262,6 +275,7 @@ class TestParser(unittest.TestCase):
"wpt_layout": "none",
"profile": "release",
"unit_tests": False,
+ 'build_libservo': False,
'bencher': False,
"wpt_args": ""
},
@@ -271,6 +285,7 @@ class TestParser(unittest.TestCase):
"wpt_layout": "none",
"profile": "release",
"unit_tests": False,
+ 'build_libservo': False,
'bencher': False,
"wpt_args": ""
},
@@ -280,6 +295,7 @@ class TestParser(unittest.TestCase):
"wpt_layout": "none",
"profile": "release",
"unit_tests": False,
+ 'build_libservo': False,
'bencher': False,
"wpt_args": ""}
]})
@@ -292,6 +308,7 @@ class TestParser(unittest.TestCase):
'name': 'Linux (WPT)',
'profile': 'release',
'unit_tests': False,
+ 'build_libservo': False,
'workflow': 'linux',
'wpt_layout': 'all',
'wpt_args': ''