8000 bench: patch the crates.io source too in the manual builder (core #937) by adityamukho · Pull Request #34 · project-minigraf/minigraf-java · GitHub
[go: up one dir, main page]

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
2 changes: 1 addition & 1 deletion bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Only a successful process exit, teardown and complete validated stream produce
the 14 `ok:` lines. Existing output directories or metric/provenance files fail;
archive/remove a previous run's outputs explicitly before another invocation.
The core workflow owns upload/audit and pins the Ubuntu 24.04 testbed. See its
[`docs/BINDING_BENCHMARKS.md`](https://github.com/project-minigraf/minigraf/blob/v3/docs/BINDING_BENCHMARKS.md)
[`docs/BINDING_BENCHMARKS.md`](https://github.com/project-minigraf/minigraf/blob/main/docs/BINDING_BENCHMARKS.md)
for the authoritative IDs, timing boundaries and provenance schema.

Tests (also run by the existing PR Java job after building the binding JAR):
Expand Down
8 changes: 6 additions & 2 deletions bench/manual/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ binding_revision=${BINDING_REVISION:-$(git rev-parse HEAD)}
export CARGO_BUILD_JOBS=${CARGO_BUILD_JOBS:-8}
test ! -e .cargo/config.toml
mkdir -p .cargo bench/manual/build/evidence
# The core pin is a git revision before a release and the exact crates.io
# version after it 6BF2 (core #937/#929). Patch both sources: Cargo ignores the
# unused one, and the check below fails if neither replaced the pin.
python3 - "$core_dir" <<'PY'
import json, pathlib, sys
path = 'minigraf = { path = ' + json.dumps(sys.argv[1]) + ' }\n'
pathlib.Path('.cargo/config.toml').write_text(
'[patch."https://github.com/project-minigraf/minigraf"]\n'
'minigraf = { path = ' + json.dumps(sys.argv[1]) + ' }\n')
'[patch."https://github.com/project-minigraf/minigraf"]\n' + path +
'\n[patch.crates-io]\n' + path)
PY
cargo update -p minigraf
cargo metadata --format-version 1 > bench/manual/build/evidence/cargo-metadata.json
Expand Down
Loading
0