镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Commit b1d3a31

Browse files
committed
fix(ci): bootstrap Home performance tooling
Add an explicit unbridged public-C archive producer so clean macOS hosts can build the pinned Home repository tool before Home performs the final Objective-C archive packaging. Provision that exact tool and pinned engine siblings in the manual performance workflow, and correct the invalid Home revision. Extend dependency auditing across CI, performance, and release workflows. The exact pinned Home build, final macOS install, 55 benchmark harness tests plus the Home 5/5 matrix tests, dependency audit, workflow parse, 89-file docs link gate, and 49-page BunPress manifest check pass. flips 0 test262 cases
1 parent e5ee2e1 commit b1d3a31

7 files changed

Lines changed: 110 additions & 35 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,14 +349,14 @@ jobs:
349349
with:
350350
repository: home-lang/home
351351
path: Home/lang
352-
ref: 351dc2c59f80effa286bffc00d3b0d1743c10230
352+
ref: 351dc2c59e80d077fab44247e86a893bdb262777
353353
- uses: pantry-pm/pantry/packages/action@9f797da1ed073df7839cb6a9a7db6181ba33f0b7
354354
with:
355355
packages: zig@0.17.0-dev
356356
- name: Build zig-js public C API for Home
357357
if: matrix.home_tool == true
358358
working-directory: zig-js
359-
run: zig build
359+
run: zig build home-tool-bootstrap
360360
- name: Build pinned Home repository-tool runtime
361361
if: matrix.home_tool == true
362362
working-directory: Home/lang

‎.github/workflows/performance.yml‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,37 @@ jobs:
4747
with:
4848
repository: zig-utils/zig-regex
4949
path: zig-regex
50+
ref: 2de46683b948ec895e5fa9a9e7e4c384aceccdfe
5051
- uses: actions/checkout@v6
5152
with:
5253
repository: zig-utils/zig-gc
5354
path: zig-gc
55+
ref: 98edfaa4aa1b2676680d95801d14118f8ed84156
56+
# benchmark-comparison-test includes the representative-matrix contract,
57+
# which is a durable TypeScript tool executed by the owned Home runtime.
58+
# Keep this producer chain identical to the main CI job: zig-js first
59+
# supplies the public C archive, then the pinned Home checkout links its
60+
# repository-tool runner against that archive.
61+
- uses: actions/checkout@v6
62+
with:
63+
repository: home-lang/home
64+
path: Home/lang
65+
ref: 351dc2c59e80d077fab44247e86a893bdb262777
5466
- uses: pantry-pm/pantry/packages/action@9f797da1ed073df7839cb6a9a7db6181ba33f0b7
5567
with:
5668
packages: zig@0.17.0-dev
5769

70+
- name: Build zig-js public C API for Home
71+
working-directory: zig-js
72+
run: zig build home-tool-bootstrap
73+
74+
- name: Build pinned Home repository-tool runtime
75+
working-directory: Home/lang
76+
run: zig build home-tool -Dtool-js-engine=zig-js -Dzig-js-root="$GITHUB_WORKSPACE/zig-js"
77+
5878
- name: Validate comparison harness
5979
working-directory: zig-js
60-
run: zig build benchmark-comparison-test
80+
run: zig build benchmark-comparison-test -Dhome-tool="$GITHUB_WORKSPACE/Home/lang/zig-out/bin/home-tool"
6181

6282
- name: Run full symmetric matrix
6383
working-directory: zig-js

‎build.zig‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,18 @@ pub fn build(b: *std.Build) void {
125125
fixture_private_lib.root_module.addOptions("private_abi_options", fixture_private_abi_options);
126126
const home_private_lib = if (private_abi_is_bun) fixture_private_lib else lib;
127127
const bun_private_lib = if (private_abi_is_bun) lib else fixture_private_lib;
128+
129+
// Home's repository-tool runtime links this public archive, while the full
130+
// macOS install uses that runtime to append the Objective-C bridge objects.
131+
// Keep the raw C archive as an explicit bootstrap producer so a clean host
132+
// can build Home without requiring Home to have already packaged zig-js.
133+
const install_home_tool_bootstrap_lib = b.addInstallArtifact(lib, .{});
134+
const home_tool_bootstrap_step = b.step(
135+
"home-tool-bootstrap",
136+
"Install the unbridged public C archive needed to build Home's repository tool",
137+
);
138+
home_tool_bootstrap_step.dependOn(&install_home_tool_bootstrap_lib.step);
139+
128140
var installed_library: ?std.Build.LazyPath = null;
129141
var objc_bridge_object: ?std.Build.LazyPath = null;
130142
var objc_dispatch_object: ?*std.Build.Step.Compile = null;

‎docs/.data/bunpress-output-v1.json‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
},
6666
{
6767
"path": "c-api/README/index.html",
68-
"bytes": 145574,
69-
"sha256": "110f49b12bb770b76f04c3d938401e7bb700944b31c8b956c5986bbe2c85eb87"
68+
"bytes": 145588,
69+
"sha256": "3727ce2c5dc46a50c72c31a19c6e66876c960587a58fdbcb733bc08d15008196"
7070
},
7171
{
7272
"path": "conformance/index.html",
@@ -75,8 +75,8 @@
7575
},
7676
{
7777
"path": "dependencies/index.html",
78-
"bytes": 159317,
79-
"sha256": "4b441f459da737d7d62c9bb546464eb5726ac1abec2c20960316e870d44b8852"
78+
"bytes": 159868,
79+
"sha256": "d63857d96ec4d3e64347d72ddb3b0adb1e5ea1889b4b9e03e0eefa40ea8f0d1e"
8080
},
8181
{
8282
"path": "dev-cache/index.html",
@@ -264,5 +264,5 @@
264264
"sha256": "65ee46ba189f9930ca0f5703ca14c0aa4429a154eefbdae71dc8344fa9b93230"
265265
}
266266
],
267-
"tree_sha256": "3a19d785b119da88e218d0e3e068d36a93fa506f224846979c4ee7c118071c67"
267+
"tree_sha256": "5eb6cadaaf470d6e143f98fdabd80dda41ba27be4188998081994f2445e203ce"
268268
}

‎docs/.data/dependency-inventory-v1.json‎

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"status": "allowed",
5252
"scope": "repository TypeScript and JavaScript tooling",
5353
"locator": "$HOME/Code/Home/lang/zig-out/bin/home-tool or -Dhome-tool/HOME_TOOL override",
54-
"pin": "home-lang/home@351dc2c59f80effa286bffc00d3b0d1743c10230; local checkout may be selected explicitly",
54+
"pin": "home-lang/home@351dc2c59e80d077fab44247e86a893bdb262777; local checkout may be selected explicitly",
5555
"license": "MIT",
5656
"affects_runtime_semantics": false,
5757
"runtime_semantics": "Home compiles TypeScript and executes the emitted JavaScript with zig-js by default; the runner is never linked into libzig-js."
@@ -180,6 +180,18 @@
180180
"license": "MIT",
181181
"affects_runtime_semantics": false,
182182
"runtime_semantics": "Owner-maintained, immutable CI bootstrap for Zig and BunPress tooling; never part of libzig-js."
183+
},
184+
{
185+
"id": "pantry-release-bootstrap",
186+
"class": "owner_maintained_pinned_tooling",
187+
"status": "migration_required",
188+
"scope": "release publication bootstrap",
189+
"locator": "home-lang/pantry/packages/action",
190+
"pin": "mutable main; immutable revision migration remains required",
191+
"license": "MIT",
192+
"affects_runtime_semantics": false,
193+
"runtime_semantics": "Owner-maintained release publication only; never part of libzig-js.",
194+
"migration_issue": 497
183195
}
184196
],
185197
"boundaries": {
@@ -188,9 +200,9 @@
188200
"../zig-gc"
189201
],
190202
"owned_sibling_checkouts": [
191-
{ "repository": "zig-utils/zig-regex", "path": "zig-regex", "revision": "2de46683b948ec895e5fa9a9e7e4c384aceccdfe", "occurrences": 6, "edge": "zig-regex" },
192-
{ "repository": "zig-utils/zig-gc", "path": "zig-gc", "revision": "98edfaa4aa1b2676680d95801d14118f8ed84156", "occurrences": 6, "edge": "zig-gc" },
193-
{ "repository": "home-lang/home", "path": "Home/lang", "revision": "351dc2c59f80effa286bffc00d3b0d1743c10230", "occurrences": 1, "edge": "home-tool-runtime" },
203+
{ "repository": "zig-utils/zig-regex", "path": "zig-regex", "revision": "2de46683b948ec895e5fa9a9e7e4c384aceccdfe", "occurrences": 7, "edge": "zig-regex" },
204+
{ "repository": "zig-utils/zig-gc", "path": "zig-gc", "revision": "98edfaa4aa1b2676680d95801d14118f8ed84156", "occurrences": 7, "edge": "zig-gc" },
205+
{ "repository": "home-lang/home", "path": "Home/lang", "revision": "351dc2c59e80d077fab44247e86a893bdb262777", "occurrences": 2, "edge": "home-tool-runtime" },
194206
{ "repository": "zig-utils/zig-regex", "path": "Libraries/zig-regex", "revision": "2de46683b948ec895e5fa9a9e7e4c384aceccdfe", "occurrences": 1, "edge": "zig-regex" },
195207
{ "repository": "zig-utils/zig-gc", "path": "Libraries/zig-gc", "revision": "98edfaa4aa1b2676680d95801d14118f8ed84156", "occurrences": 1, "edge": "zig-gc" },
196208
{ "repository": "stacksjs/bunpress", "path": "Tools/bunpress", "revision": "1262895355142cb57ae7850dec7bf31cc5f5999d", "occurrences": 1, "edge": "bunpress-docs-toolchain" },
@@ -242,8 +254,11 @@
242254
{ "manifest": "package.json", "name": "docs:data", "command": "~/Code/Home/lang/zig-out/bin/home-tool run scripts/gen-test262-data.ts", "edge": "home-tool-runtime" }
243255
],
244256
"ci_actions": [
245-
{ "name": "actions/checkout@v6", "count": 25, "edge": "ci-bootstrap-actions" },
246-
{ "name": "pantry-pm/pantry/packages/action@9f797da1ed073df7839cb6a9a7db6181ba33f0b7", "count": 7, "edge": "pantry-docs-bootstrap" }
257+
{ "name": "actions/checkout@v6", "count": 30, "edge": "ci-bootstrap-actions" },
258+
{ "name": "actions/upload-artifact@v4", "count": 1, "edge": "ci-bootstrap-actions" },
259+
{ "name": "stacksjs/action-releaser@v1.2.9", "count": 1, "edge": "ci-bootstrap-actions" },
260+
{ "name": "pantry-pm/pantry/packages/action@9f797da1ed073df7839cb6a9a7db6181ba33f0b7", "count": 8, "edge": "pantry-docs-bootstrap" },
261+
{ "name": "home-lang/pantry/packages/action@main", "count": 1, "edge": "pantry-release-bootstrap" }
247262
],
248263
"pinned_downloads": [
249264
{ "url": "https://github.com/WebAssembly/wabt/releases/download/1.0.12/wabt-1.0.12-linux.tar.gz", "sha256": "540632382afd3e658761f2abb742e0504b4986ffcd127cef250fc843e46d9271", "occurrences": 1, "edge": "pinned-wasm-converters" },

‎docs/dependencies.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ revisions are recorded in the inventory. CI uses the same `Libraries/` plus
4444
before rendering. Missing behavior is fixed in the owning repository and then
4545
consumed here; zig-js does not carry substitutes.
4646

47+
Home's repository-tool runtime is bootstrapped without a dependency cycle.
48+
`zig build home-tool-bootstrap` installs the unbridged public C archive that
49+
Home links for its zig-js engine; once that pinned Home runtime exists, the
50+
normal macOS `zig build` uses it to append the Objective-C bridge objects and
51+
produce the complete installed archive. The bootstrap target is not a reduced
52+
public product and does not replace the normal install—it is the exact producer
53+
boundary needed before the owned packaging tool exists.
54+
4755
The macOS Objective-C bridge may use the Xcode SDK and Foundation as the
4856
platform interface it implements. System JavaScriptCore is isolated to the
4957
explicit differential and benchmark executables; it never links into

‎tools/dependency_audit.zig‎

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ fn count(haystack: []const u8, needle: []const u8) usize {
134134
return total;
135135
}
136136

137+
fn countSources(sources: []const []const u8, needle: []const u8) usize {
138+
var total: usize = 0;
139+
for (sources) |source| total += count(source, needle);
140+
return total;
141+
}
142+
137143
fn read(gpa: std.mem.Allocator, io: std.Io, path: []const u8) ![]u8 {
138144
return std.Io.Dir.cwd().readFileAlloc(io, path, gpa, .limited(max_source_bytes));
139145
}
@@ -666,8 +672,19 @@ fn auditGitIndex(gpa: std.mem.Allocator, io: std.Io, inventory: Inventory) !void
666672
}
667673

668674
fn auditCi(gpa: std.mem.Allocator, io: std.Io, inventory: Inventory) !void {
669-
const source = try read(gpa, io, ".github/workflows/ci.yml");
670-
defer gpa.free(source);
675+
const workflow_paths = [_][]const u8{
676+
".github/workflows/ci.yml",
677+
".github/workflows/performance.yml",
678+
".github/workflows/release.yml",
679+
};
680+
var sources: [workflow_paths.len][]u8 = undefined;
681+
var loaded: usize = 0;
682+
defer for (sources[0..loaded]) |source| gpa.free(source);
683+
for (&sources, workflow_paths) |*source, path| {
684+
source.* = try read(gpa, io, path);
685+
loaded += 1;
686+
}
687+
671688
var sibling_occurrences: usize = 0;
672689
for (inventory.boundaries.owned_sibling_checkouts) |item| {
673690
const fragment = try std.fmt.allocPrint(
@@ -676,52 +693,55 @@ fn auditCi(gpa: std.mem.Allocator, io: std.Io, inventory: Inventory) !void {
676693
.{ item.repository, item.path, item.revision },
677694
);
678695
defer gpa.free(fragment);
679-
const actual = count(source, fragment);
696+
const actual = countSources(&sources, fragment);
680697
if (actual != item.occurrences)
681698
return fail("owned sibling {s}@{s} occurs {d} times, expected {d}", .{ item.repository, item.revision, actual, item.occurrences });
682699
sibling_occurrences += item.occurrences;
683700
}
684-
if (count(source, "repository: ") != sibling_occurrences)
685-
return fail("CI contains an unclassified owned sibling checkout", .{});
701+
if (countSources(&sources, "repository: ") != sibling_occurrences)
702+
return fail("workflow set contains an unclassified owned sibling checkout", .{});
686703

687704
var action_occurrences: usize = 0;
688705
for (inventory.boundaries.ci_actions) |item| {
689706
const fragment = try std.fmt.allocPrint(gpa, "uses: {s}", .{item.name});
690707
defer gpa.free(fragment);
691-
const actual = count(source, fragment);
692-
if (actual != item.count) return fail("CI action '{s}' occurs {d} times, expected {d}", .{ item.name, actual, item.count });
708+
const actual = countSources(&sources, fragment);
709+
if (actual != item.count) return fail("workflow action '{s}' occurs {d} times, expected {d}", .{ item.name, actual, item.count });
693710
action_occurrences += item.count;
694711
}
695-
if (count(source, "uses: ") != action_occurrences) return fail("CI contains an unclassified action", .{});
712+
if (countSources(&sources, "uses: ") != action_occurrences) return fail("workflow set contains an unclassified action", .{});
696713

697714
var download_occurrences: usize = 0;
698715
for (inventory.boundaries.pinned_downloads) |item| {
699-
const urls = count(source, item.url);
700-
const hashes = count(source, item.sha256);
716+
const urls = countSources(&sources, item.url);
717+
const hashes = countSources(&sources, item.sha256);
701718
if (urls != item.occurrences or hashes != item.occurrences)
702719
return fail("download pin '{s}' occurs URL/hash {d}/{d}, expected {d}/{d}", .{ item.url, urls, hashes, item.occurrences, item.occurrences });
703720
download_occurrences += item.occurrences;
704721
}
705-
if (count(source, "releases/download/") != download_occurrences)
706-
return fail("CI contains an unclassified release download", .{});
722+
if (countSources(&sources, "releases/download/") != download_occurrences)
723+
return fail("workflow set contains an unclassified release download", .{});
707724

708725
for (inventory.boundaries.pinned_ci_corpora) |item| {
709726
const remote = try std.fmt.allocPrint(gpa, "remote add origin {s}", .{item.url});
710727
defer gpa.free(remote);
711-
var rest = source;
712728
var matched = false;
713-
while (std.mem.indexOf(u8, rest, remote)) |at| {
714-
const end = @min(rest.len, at + remote.len + 500);
715-
if (std.mem.indexOf(u8, rest[at..end], item.revision) != null) {
716-
matched = true;
717-
break;
729+
for (sources) |source| {
730+
var rest = source;
731+
while (std.mem.indexOf(u8, rest, remote)) |at| {
732+
const end = @min(rest.len, at + remote.len + 500);
733+
if (std.mem.indexOf(u8, rest[at..end], item.revision) != null) {
734+
matched = true;
735+
break;
736+
}
737+
rest = rest[at + remote.len ..];
718738
}
719-
rest = rest[at + remote.len ..];
739+
if (matched) break;
720740
}
721741
if (!matched) return fail("CI corpus {s}@{s} is not pinned beside its remote", .{ item.url, item.revision });
722742
}
723-
if (count(source, "remote add origin https://github.com/WebAssembly/") != inventory.boundaries.pinned_ci_corpora.len)
724-
return fail("CI contains an unclassified WebAssembly corpus checkout", .{});
743+
if (countSources(&sources, "remote add origin https://github.com/WebAssembly/") != inventory.boundaries.pinned_ci_corpora.len)
744+
return fail("workflow set contains an unclassified WebAssembly corpus checkout", .{});
725745
}
726746

727747
fn auditProductionSources(gpa: std.mem.Allocator, io: std.Io, inventory: Inventory) !void {

0 commit comments

Comments
 (0)