Skip to content

Commit 941ae11

Browse files
author
R
committed
Merge main into fix/after-webrtc: hash's measure lane retired
main (#26) retired tools/hash/measure.py and its test, whose docstring this branch had reflowed; the test goes, as main says.
2 parents 91f2fda + d673d92 commit 941ae11

38 files changed

Lines changed: 398 additions & 2674 deletions

‎doc/releases/0.1.0.adoc‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -300,15 +300,8 @@ webcpp::hash's and webcpp::crypto's OpenSSL, when libs/hash is checked out.
300300
* Fixed the check that a program links OpenSSL's archives once finding no link line on WASI.
301301
* Changed /third_party//sodium to link its programs on Emscripten with
302302
-sALLOW_MEMORY_GROWTH=1, for the memory Argon2id and scrypt allocate.
303-
* Added tools/hash/measure.py and webcpp::hash's own lane measure, which builds and measures
304-
its capability table's programs on the four targets in one command.
305-
* Added own lanes that build for every target in one command, whose CI job installs and
306-
registers the WebAssembly toolsets beside Clang 18: webcpp::hash's measure.
307-
* Fixed the lint's clang-tidy refusing such a lane, whose sources it now analyses
308-
natively.
309-
* Added tools/hash/doc_tables.py, which generates webcpp::hash's comparison tables,
310-
backend lists and llms.txt from its capability table and its measurements, and checks them
311-
when its page is built.
303+
* Added tools/hash/doc_tables.py, which generates webcpp::hash's tables, data chapters and
304+
llms.txt from its capability table and measurements, and checks them when its page is built.
312305
* Changed tools/hash/doc_tables.py to give each chapter two comparison tables, each under the
313306
eight columns from which a table scrolls.
314307

‎libs/hash‎

Submodule hash updated 149 files

‎tools/ci/matrix.py‎

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,9 @@
8383
from b2's command line alone; an own lane of such a library likewise.
8484
8585
own-lane runs one own lane, OWN-LANE being one entry of the own-lanes matrix as JSON: it registers
86-
the toolset of the lane it shares (Clang 18 when it names no target), and for an own lane of
87-
EVERY_TARGET_LANES, which names no target yet builds for every target in one command, the toolsets
88-
of wasip2, wasip3 and emscripten after it (its entry says wasm, emsdk and node, which its job
89-
installs), prints its b2 command and runs it. Without a target, b2's exit status is its verdict;
90-
with one, it writes DIR/<id>.xml, which the job uploads, and fails only when b2 cannot build at
91-
all, as a lane does.
86+
the toolset of the lane it shares (Clang 18 when it names no target), prints its b2 command and runs
87+
it. Without a target, b2's exit status is its verdict; with one, it writes DIR/<id>.xml, which the
88+
job uploads, and fails only when b2 cannot build at all, as a lane does.
9289
9390
register adds the toolsets of the lanes named by id to the user-config.jam, in their order, the
9491
first being b2's default toolset: what the CI's tools job builds the tests of the tools with. A WASI
@@ -189,16 +186,6 @@
189186
('document', 'js'), ('trystero', 'interop'),
190187
('webrtc', 'browser'), ('webrtc', 'interop')}
191188

192-
# The own lanes that name no target yet build for every target in one command, (library, lane):
193-
# hash's measure, whose Jamfile names wasip2's, wasip3's and emscripten's toolsets in its
194-
# programs' references. Their job installs wasi-sdk, wasmtime, emsdk and the CI's node, and
195-
# registers those three toolsets after Clang 18's, b2's default, the native target's
196-
# (own_lane_toolsets).
197-
EVERY_TARGET_LANES = {('hash', 'measure')}
198-
199-
# The lanes whose toolsets an own lane of EVERY_TARGET_LANES registers after its own.
200-
EVERY_TARGET_TOOLSETS = ('wasip2', 'wasip3', 'emscripten')
201-
202189
# MSVC's lanes build 64-bit programs, embed their manifest with the linker and abbreviate b2's
203190
# paths against Windows's MAX_PATH, as xstate-cpp's green Windows jobs did. b2 abbreviates each
204191
# word of the toolset directory too, and msvc-14.3 and msvc-14.5 are their own abbreviations,
@@ -634,16 +621,6 @@ def own_lane_profile(own: OwnLane) -> Lane:
634621
return own_lane_base(own.target)
635622

636623

637-
def own_lane_toolsets(own: OwnLane) -> list[Lane]:
638-
"""The lanes whose toolsets the own lane's job registers, in order, the first b2's default:
639-
the lane it shares, then, for one of EVERY_TARGET_LANES, the lanes of EVERY_TARGET_TOOLSETS."""
640-
lanes = [own_lane_profile(own)]
641-
if (own.library, own.lane) in EVERY_TARGET_LANES:
642-
known = {lane.id: lane for lane in LANES}
643-
lanes += [known[lane_id] for lane_id in EVERY_TARGET_TOOLSETS]
644-
return lanes
645-
646-
647624
def own_lane_entry(own: OwnLane) -> dict[str, object]:
648625
"""The own lane as an entry of the own-lanes matrix: its library, its lane and its
649626
directories; its target and its id when it names one; and, for every entry, its kind, the name
@@ -659,10 +636,7 @@ def own_lane_entry(own: OwnLane) -> dict[str, object]:
659636
# with it, and a driven test its driver. Without the CI's Node, one would run with the
660637
# image's own, another version. A lane of programs alone, a served one, needs none.
661638
node = base.node or own.kind == 'original'
662-
wasm, emsdk = base.wasm, base.emsdk
663-
if (own.library, own.lane) in EVERY_TARGET_LANES:
664-
wasm = emsdk = node = True
665-
entry.update(kind=own.kind, name=own.name, os=base.os, wasm=wasm, emsdk=emsdk,
639+
entry.update(kind=own.kind, name=own.name, os=base.os, wasm=base.wasm, emsdk=base.emsdk,
666640
node=node, cc=base.cc, cxx=base.cxx, external=needs_external(own.library),
667641
chrome=(own.library, own.lane) in CHROME_LANES)
668642
return entry
@@ -912,9 +886,7 @@ def run_lane(lane: Lane, user_config: Path, out_dir: Path, extra: list[str]) ->
912886

913887
def run_own_lane(own: OwnLane, user_config: Path, out_dir: Path, extra: list[str]) -> int:
914888
"""Runs the own lane, and returns its exit status."""
915-
# Each read first, so that one that cannot be read leaves user_config as it was.
916-
for lane in [resolved(lane) for lane in own_lane_toolsets(own)]:
917-
register(lane, user_config)
889+
register(resolved(own_lane_profile(own)), user_config)
918890
if own.target is None:
919891
label = f'own lane {" ".join(own.requests)}'
920892
status = run_b2(label, own_lane_command(own, user_config, None, extra))

‎tools/ci/matrix_test.py‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -523,37 +523,6 @@ def test_an_own_lanes_command(root):
523523
assert (lane.id, lane.os) == (lane_id, 'ubuntu-24.04'), lane
524524

525525

526-
def test_an_every_target_lane_sets_up_and_registers_every_toolset(root):
527-
# hash's own lane measure names no target and builds for the four targets in one command:
528-
# its job installs wasi-sdk, wasmtime, emsdk and the CI's node, and registers Clang 18
529-
# first (b2's default toolset, the native target), then wasip2's, wasip3's and emscripten's
530-
# toolsets, which its Jamfile names in the programs' references. No other own lane without a
531-
# target gets them.
532-
assert matrix.EVERY_TARGET_LANES == {('hash', 'measure')}, matrix.EVERY_TARGET_LANES
533-
measure = matrix.parsed_own_lanes('hash measure libs/hash/test/measure programs')[0]
534-
entry = own_lane_entry_of(measure)
535-
assert (entry['wasm'], entry['emsdk'], entry['node']) == (True, True, True), entry
536-
assert 'platform' not in entry and entry['name'] == 'Own lane (hash, measure)', entry
537-
assert [lane.id for lane in matrix.own_lane_toolsets(measure)] == [
538-
'clang-18', 'wasip2', 'wasip3', 'emscripten']
539-
config = root / 'config.jam'
540-
assert matrix.own_lane_command(measure, config, None, []) == [
541-
'b2', f'--user-config={config}', '-a', 'toolset=clang-18',
542-
'libs/hash/test/measure//measure']
543-
oracle = matrix.parsed_own_lanes('beta oracle libs/beta/test/oracle original')[0]
544-
entry = own_lane_entry_of(oracle)
545-
assert (entry['wasm'], entry['emsdk']) == (False, False), entry
546-
assert [lane.id for lane in matrix.own_lane_toolsets(oracle)] == ['clang-18']
547-
config = boost_only(root)
548-
for lane in matrix.own_lane_toolsets(measure):
549-
matrix.register(matrix.resolved(lane), config)
550-
text = config.read_text()
551-
for line in ('using clang : 18 : clang++-18 ;', 'using clang : wasip2 :',
552-
'using clang : wasip3 :', 'using emscripten :'):
553-
assert line in text, (line, text)
554-
assert text.index('using clang : 18') < text.index('using clang : wasip2'), text
555-
556-
557526
def test_beast_browser_lanes_cover_policies_and_exception_modes(root):
558527
config = root / 'config.jam'
559528
options = ['exception-handling=on,off', 'webcpp-beast-unsupported=error,ignore']
@@ -1572,7 +1541,6 @@ def test_an_unavailable_container_image_fails_without_a_build(root):
15721541
test_own_lanes_of_every_library_and_of_one,
15731542
test_own_lanes_on_targets,
15741543
test_an_own_lanes_command,
1575-
test_an_every_target_lane_sets_up_and_registers_every_toolset,
15761544
test_beast_browser_lanes_cover_policies_and_exception_modes,
15771545
test_asio_capability_lanes_cover_suspension_and_exception_modes,
15781546
test_openssl_upstream_lanes_use_the_windows_builds,

0 commit comments

Comments
 (0)