Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions doc/releases/0.1.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,8 @@ webcpp::hash's and webcpp::crypto's OpenSSL, when libs/hash is checked out.
* Fixed the check that a program links OpenSSL's archives once finding no link line on WASI.
* Changed /third_party//sodium to link its programs on Emscripten with
-sALLOW_MEMORY_GROWTH=1, for the memory Argon2id and scrypt allocate.
* Added tools/hash/measure.py and webcpp::hash's own lane measure, which builds and measures
its capability table's programs on the four targets in one command.
* Added own lanes that build for every target in one command, whose CI job installs and
registers the WebAssembly toolsets beside Clang 18: webcpp::hash's measure.
* Fixed the lint's clang-tidy refusing such a lane, whose sources it now analyses
natively.
* Added tools/hash/doc_tables.py, which generates webcpp::hash's comparison tables,
backend lists and llms.txt from its capability table and its measurements, and checks them
when its page is built.
* Added tools/hash/doc_tables.py, which generates webcpp::hash's tables, data chapters and
llms.txt from its capability table and measurements, and checks them when its page is built.
* Changed tools/hash/doc_tables.py to give each chapter two comparison tables, each under the
eight columns from which a table scrolls.

Expand Down
2 changes: 1 addition & 1 deletion libs/hash
Submodule hash updated 149 files
38 changes: 5 additions & 33 deletions tools/ci/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,9 @@
from b2's command line alone; an own lane of such a library likewise.

own-lane runs one own lane, OWN-LANE being one entry of the own-lanes matrix as JSON: it registers
the toolset of the lane it shares (Clang 18 when it names no target), and for an own lane of
EVERY_TARGET_LANES, which names no target yet builds for every target in one command, the toolsets
of wasip2, wasip3 and emscripten after it (its entry says wasm, emsdk and node, which its job
installs), prints its b2 command and runs it. Without a target, b2's exit status is its verdict;
with one, it writes DIR/<id>.xml, which the job uploads, and fails only when b2 cannot build at
all, as a lane does.
the toolset of the lane it shares (Clang 18 when it names no target), prints its b2 command and runs
it. Without a target, b2's exit status is its verdict; with one, it writes DIR/<id>.xml, which the
job uploads, and fails only when b2 cannot build at all, as a lane does.

register adds the toolsets of the lanes named by id to the user-config.jam, in their order, the
first being b2's default toolset: what the CI's tools job builds the tests of the tools with. A WASI
Expand Down Expand Up @@ -189,16 +186,6 @@
('document', 'js'), ('trystero', 'interop'),
('webrtc', 'browser'), ('webrtc', 'interop')}

# The own lanes that name no target yet build for every target in one command, (library, lane):
# hash's measure, whose Jamfile names wasip2's, wasip3's and emscripten's toolsets in its
# programs' references. Their job installs wasi-sdk, wasmtime, emsdk and the CI's node, and
# registers those three toolsets after Clang 18's, b2's default, the native target's
# (own_lane_toolsets).
EVERY_TARGET_LANES = {('hash', 'measure')}

# The lanes whose toolsets an own lane of EVERY_TARGET_LANES registers after its own.
EVERY_TARGET_TOOLSETS = ('wasip2', 'wasip3', 'emscripten')

# MSVC's lanes build 64-bit programs, embed their manifest with the linker and abbreviate b2's
# paths against Windows's MAX_PATH, as xstate-cpp's green Windows jobs did. b2 abbreviates each
# word of the toolset directory too, and msvc-14.3 and msvc-14.5 are their own abbreviations,
Expand Down Expand Up @@ -634,16 +621,6 @@ def own_lane_profile(own: OwnLane) -> Lane:
return own_lane_base(own.target)


def own_lane_toolsets(own: OwnLane) -> list[Lane]:
"""The lanes whose toolsets the own lane's job registers, in order, the first b2's default:
the lane it shares, then, for one of EVERY_TARGET_LANES, the lanes of EVERY_TARGET_TOOLSETS."""
lanes = [own_lane_profile(own)]
if (own.library, own.lane) in EVERY_TARGET_LANES:
known = {lane.id: lane for lane in LANES}
lanes += [known[lane_id] for lane_id in EVERY_TARGET_TOOLSETS]
return lanes


def own_lane_entry(own: OwnLane) -> dict[str, object]:
"""The own lane as an entry of the own-lanes matrix: its library, its lane and its
directories; its target and its id when it names one; and, for every entry, its kind, the name
Expand All @@ -659,10 +636,7 @@ def own_lane_entry(own: OwnLane) -> dict[str, object]:
# with it, and a driven test its driver. Without the CI's Node, one would run with the
# image's own, another version. A lane of programs alone, a served one, needs none.
node = base.node or own.kind == 'original'
wasm, emsdk = base.wasm, base.emsdk
if (own.library, own.lane) in EVERY_TARGET_LANES:
wasm = emsdk = node = True
entry.update(kind=own.kind, name=own.name, os=base.os, wasm=wasm, emsdk=emsdk,
entry.update(kind=own.kind, name=own.name, os=base.os, wasm=base.wasm, emsdk=base.emsdk,
node=node, cc=base.cc, cxx=base.cxx, external=needs_external(own.library),
chrome=(own.library, own.lane) in CHROME_LANES)
return entry
Expand Down Expand Up @@ -912,9 +886,7 @@ def run_lane(lane: Lane, user_config: Path, out_dir: Path, extra: list[str]) ->

def run_own_lane(own: OwnLane, user_config: Path, out_dir: Path, extra: list[str]) -> int:
"""Runs the own lane, and returns its exit status."""
# Each read first, so that one that cannot be read leaves user_config as it was.
for lane in [resolved(lane) for lane in own_lane_toolsets(own)]:
register(lane, user_config)
register(resolved(own_lane_profile(own)), user_config)
if own.target is None:
label = f'own lane {" ".join(own.requests)}'
status = run_b2(label, own_lane_command(own, user_config, None, extra))
Expand Down
32 changes: 0 additions & 32 deletions tools/ci/matrix_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,37 +523,6 @@ def test_an_own_lanes_command(root):
assert (lane.id, lane.os) == (lane_id, 'ubuntu-24.04'), lane


def test_an_every_target_lane_sets_up_and_registers_every_toolset(root):
# hash's own lane measure names no target and builds for the four targets in one command:
# its job installs wasi-sdk, wasmtime, emsdk and the CI's node, and registers Clang 18
# first (b2's default toolset, the native target), then wasip2's, wasip3's and emscripten's
# toolsets, which its Jamfile names in the programs' references. No other own lane without a
# target gets them.
assert matrix.EVERY_TARGET_LANES == {('hash', 'measure')}, matrix.EVERY_TARGET_LANES
measure = matrix.parsed_own_lanes('hash measure libs/hash/test/measure programs')[0]
entry = own_lane_entry_of(measure)
assert (entry['wasm'], entry['emsdk'], entry['node']) == (True, True, True), entry
assert 'platform' not in entry and entry['name'] == 'Own lane (hash, measure)', entry
assert [lane.id for lane in matrix.own_lane_toolsets(measure)] == [
'clang-18', 'wasip2', 'wasip3', 'emscripten']
config = root / 'config.jam'
assert matrix.own_lane_command(measure, config, None, []) == [
'b2', f'--user-config={config}', '-a', 'toolset=clang-18',
'libs/hash/test/measure//measure']
oracle = matrix.parsed_own_lanes('beta oracle libs/beta/test/oracle original')[0]
entry = own_lane_entry_of(oracle)
assert (entry['wasm'], entry['emsdk']) == (False, False), entry
assert [lane.id for lane in matrix.own_lane_toolsets(oracle)] == ['clang-18']
config = boost_only(root)
for lane in matrix.own_lane_toolsets(measure):
matrix.register(matrix.resolved(lane), config)
text = config.read_text()
for line in ('using clang : 18 : clang++-18 ;', 'using clang : wasip2 :',
'using clang : wasip3 :', 'using emscripten :'):
assert line in text, (line, text)
assert text.index('using clang : 18') < text.index('using clang : wasip2'), text


def test_beast_browser_lanes_cover_policies_and_exception_modes(root):
config = root / 'config.jam'
options = ['exception-handling=on,off', 'webcpp-beast-unsupported=error,ignore']
Expand Down Expand Up @@ -1572,7 +1541,6 @@ def test_an_unavailable_container_image_fails_without_a_build(root):
test_own_lanes_of_every_library_and_of_one,
test_own_lanes_on_targets,
test_an_own_lanes_command,
test_an_every_target_lane_sets_up_and_registers_every_toolset,
test_beast_browser_lanes_cover_policies_and_exception_modes,
test_asio_capability_lanes_cover_suspension_and_exception_modes,
test_openssl_upstream_lanes_use_the_windows_builds,
Expand Down
Loading
Loading