Skip to content

Commit c4e39a6

Browse files
committed
COMP: Patch asv.conf.json branches to origin/main at harness-stage
ITKPerformanceBenchmarking's asv.conf.json (at the pinned SHA 41bf1b9cfbaa1b146e1b3e5d3ad3571b2203ce1e, introduced by #111) still hard-codes branches=['origin/master'], but ITK's default branch has been 'main' for some time. Running `asv run` against origin/main therefore fails with 'Unknown branch origin/master in configuration' and aborts before any benchmark executes. Rather than block this workflow on an upstream fix in ITKPerformanceBenchmarking, patch asv.conf.json in place during the harness-stage step so it references origin/main. The upstream fix should still land in ITKPerformanceBenchmarking's asv.conf.json; once it does, this patch becomes a no-op and can be removed.
1 parent dd6b21c commit c4e39a6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/perf-benchmark.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ jobs:
118118
echo " InsightSoftwareConsortium/ITKPerformanceBenchmarking#111)." >&2
119119
exit 1
120120
fi
121+
# ITKPerformanceBenchmarking's asv.conf.json still hard-codes
122+
# ['origin/master']; ITK's default branch is 'main'. Patch in
123+
# place so `asv run` doesn't fail with "Unknown branch
124+
# origin/master in configuration". The upstream fix belongs
125+
# in ITKPerformanceBenchmarking's asv.conf.json directly.
126+
python -c "import json,sys,pathlib; p=pathlib.Path(sys.argv[1]); c=json.loads(p.read_text()); c['branches']=['origin/main']; p.write_text(json.dumps(c,indent=2)+'\n')" \
127+
"${HARNESS}/asv.conf.json"
121128
ln -sfn "${GITHUB_WORKSPACE}/itk-head" "${HARNESS}/itk-repo"
122129
python -m pip install -e "${HARNESS}/python"
123130
echo "harness=${HARNESS}" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)