Skip to content

Commit c31af76

Browse files
ctruedenclaude
andcommitted
CI: feed smelt.json into status and cache cjdk/jgo/m2
status.sh now pulls the most recent smelt.json straight from the status.scijava.org gh-pages branch (raw.githubusercontent.com) and passes it to `pombast status --smelt`, so version bumps are classified by bytecode-floor blast radius. Reading the branch directly avoids waiting on the asynchronous GitHub Pages deploy. Best-effort: status still runs if smelt.json is absent. status.yml gains a workflow_run trigger on the build workflow, guarded to master pushes (the only builds that republish smelt.json), so the status page refreshes its classification immediately instead of waiting for the daily cron. The direct push trigger is dropped since build-then-status now covers master pushes with the freshly published smelt.json. Caching: - build.yml: add ~/.cache/cjdk (downloaded JDKs + Maven) and ~/.cache/jgo (per-artifact bytecode-scan results) to the build cache. cjdk is the big win, since smelt provisions a JDK per component. - status.yml: add ~/.cache/jgo and ~/.m2/repository so the daily bump classification stops re-downloading and re-scanning candidate JARs each run. setup-java stays: its JDK 11+fx serves the Maven CI deploy build (ci-build.sh), which is independent of pombast's cjdk-provisioned JDKs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 55ee95c commit c31af76

3 files changed

Lines changed: 41 additions & 10 deletions

File tree

.github/status.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ uv tool install "git+https://github.com/scijava/pombast.git"
33

44
# Pull the most recently published smelt results so that `pombast status` can
55
# classify each available version bump by its bytecode-floor blast radius
6-
# (flat / local / cascading / excluded). This is the same smelt.json the status
7-
# page itself fetches client-side, so the generator and the browser agree.
6+
# (flat / local / cascading / excluded). Read straight from the gh-pages branch
7+
# rather than https://status.scijava.org/, so we pick up a freshly committed
8+
# smelt.json immediately instead of waiting on the asynchronous Pages deploy.
89
#
910
# Best-effort: if smelt.json is not published yet (or the fetch fails), status
1011
# still runs -- just without the bytecode classification overlay.
1112
smelt_arg=""
12-
if curl -fsSLO https://status.scijava.org/smelt.json; then
13+
smelt_url=https://raw.githubusercontent.com/scijava/status.scijava.org/gh-pages/smelt.json
14+
if curl -fsSLO "$smelt_url"; then
1315
smelt_arg="--smelt smelt.json"
1416
else
1517
echo "== smelt.json unavailable; running status without classification =="

.github/workflows/build.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ jobs:
5454
- name: Restore pombast cache
5555
uses: actions/cache/restore@v4
5656
with:
57-
path: ~/.cache/pombast
57+
# pombast: success/timestamp caches; cjdk: downloaded JDKs + Maven;
58+
# jgo: per-artifact bytecode-scan results. (~/.m2 is cached above by
59+
# setup-java's cache: 'maven'.)
60+
path: |
61+
~/.cache/pombast
62+
~/.cache/cjdk
63+
~/.cache/jgo
5864
key: ${{ runner.os }}-pombast-build
5965

6066
- name: Run pombast melt+smelt commands
@@ -72,7 +78,10 @@ jobs:
7278
if: always()
7379
uses: actions/cache/save@v4
7480
with:
75-
path: ~/.cache/pombast
81+
path: |
82+
~/.cache/pombast
83+
~/.cache/cjdk
84+
~/.cache/jgo
7685
key: ${{ runner.os }}-pombast-build
7786

7887
- name: Publish smelt results

.github/workflows/status.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,23 @@ on:
44
schedule:
55
# Run daily at 0500 UTC.
66
- cron: '0 5 * * *'
7-
push:
8-
branches:
9-
- master
7+
# Run right after the build workflow publishes a fresh smelt.json, so the
8+
# status page picks up new bytecode classification immediately rather than
9+
# waiting for the next daily run. The job-level guard below restricts this to
10+
# master pushes, the only builds that republish smelt.json.
11+
workflow_run:
12+
workflows: [build]
13+
types: [completed]
1014

1115
jobs:
1216
status:
1317
runs-on: ubuntu-latest
18+
# Scheduled runs always proceed. workflow_run runs only when the triggering
19+
# build was a push to master (i.e. one that republished smelt.json).
20+
if: >-
21+
github.event_name != 'workflow_run' ||
22+
(github.event.workflow_run.event == 'push' &&
23+
github.event.workflow_run.head_branch == 'master')
1424
permissions:
1525
actions: write # needed to delete and re-save caches
1626

@@ -26,7 +36,14 @@ jobs:
2636
- name: Restore pombast cache
2737
uses: actions/cache/restore@v4
2838
with:
29-
path: ~/.cache/pombast
39+
# pombast: status caches; jgo: per-artifact bytecode-scan results;
40+
# ~/.m2: candidate JARs that bump classification downloads to scan.
41+
# Persisting these keeps the daily classification from re-downloading
42+
# and re-scanning every candidate on each run.
43+
path: |
44+
~/.cache/pombast
45+
~/.cache/jgo
46+
~/.m2/repository
3047
key: ${{ runner.os }}-pombast-status
3148

3249
# The monoqueue library is used by pombast to read GitHub issues.
@@ -53,7 +70,10 @@ jobs:
5370
if: always()
5471
uses: actions/cache/save@v4
5572
with:
56-
path: ~/.cache/pombast
73+
path: |
74+
~/.cache/pombast
75+
~/.cache/jgo
76+
~/.m2/repository
5777
key: ${{ runner.os }}-pombast-status
5878

5979
- name: Delete old monoqueue cache

0 commit comments

Comments
 (0)