Skip to content

Commit f4ed3f3

Browse files
leofangclaude
andcommitted
Remove build-step input from sccache-summary action
GHA has no construct to reference a previous step's name dynamically (steps context only exposes outcome/conclusion/outputs). The label input already identifies which build produced the stats, so the hardcoded build-step name is redundant. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a3f9a2b commit f4ed3f3

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

.github/actions/sccache-summary/action.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ inputs:
1717
description: "Label for the stats row (e.g. cuda.bindings, cuda.core)"
1818
required: false
1919
default: "sccache"
20-
build-step:
21-
description: "Name of the cibuildwheel build step (for deep-link in summary)"
22-
required: false
23-
default: ""
2420

2521
runs:
2622
using: composite
@@ -30,19 +26,17 @@ runs:
3026
env:
3127
SCCACHE_JSON: ${{ inputs.json-file }}
3228
SCCACHE_LABEL: ${{ inputs.label }}
33-
SCCACHE_BUILD_STEP: ${{ inputs.build-step }}
3429
run: |
3530
if [ ! -f "$SCCACHE_JSON" ]; then
3631
echo "::warning::sccache stats file not found: $SCCACHE_JSON"
3732
exit 0
3833
fi
3934
4035
python3 - <<'PYEOF'
41-
import json, os, urllib.parse
36+
import json, os
4237
4338
json_file = os.environ["SCCACHE_JSON"]
4439
label = os.environ["SCCACHE_LABEL"]
45-
build_step = os.environ.get("SCCACHE_BUILD_STEP", "")
4640
4741
with open(json_file) as f:
4842
stats = json.load(f)["stats"]
@@ -62,20 +56,13 @@ runs:
6256
total = hits + misses
6357
pct = int(100 * hits / total) if total > 0 else 0
6458
65-
# Build a deep-link to the cibuildwheel step if step name is provided.
66-
# GHA step summary links use the format: #step:N:L but we can't know the
67-
# step number here. Instead, link to the job page with a search hint.
68-
link_note = ""
69-
if build_step:
70-
link_note = f"\n\n_Full stats in the **{build_step}** step log._\n"
71-
7259
summary_file = os.environ.get("GITHUB_STEP_SUMMARY", "")
7360
if summary_file:
7461
with open(summary_file, "a") as sf:
7562
sf.write(f"### 📊 {label} — sccache stats\n")
7663
sf.write("| Hit Rate | Hits | Misses | Requests |\n")
7764
sf.write("|----------|------|--------|----------|\n")
78-
sf.write(f"| {pct}% | {hits} | {misses} | {total} |{link_note}\n")
65+
sf.write(f"| {pct}% | {hits} | {misses} | {total} |\n\n")
7966
8067
print(f"{label}: {pct}% hit rate ({hits}/{total})")
8168
PYEOF

.github/workflows/build-wheel.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ jobs:
191191
with:
192192
json-file: sccache_bindings.json
193193
label: "cuda.bindings"
194-
build-step: "Build cuda.bindings wheel"
195194

196195
- name: List the cuda.bindings artifacts directory
197196
run: |
@@ -258,7 +257,6 @@ jobs:
258257
with:
259258
json-file: sccache_core.json
260259
label: "cuda.core"
261-
build-step: "Build cuda.core wheel"
262260

263261
- name: List the cuda.core artifacts directory and rename
264262
run: |
@@ -446,7 +444,6 @@ jobs:
446444
with:
447445
json-file: sccache_core_prev.json
448446
label: "cuda.core (prev CTK)"
449-
build-step: "Build cuda.core wheel"
450447

451448
- name: List the cuda.core artifacts directory and rename
452449
run: |

0 commit comments

Comments
 (0)