Skip to content

Commit e333d84

Browse files
ctruedenclaude
andcommitted
CI: restore pombast cache across smelt runs
Adds restore/delete/save steps for ~/.cache/pombast around the smelt step, matching the pattern used for the old melting-pot cache. Cache must be deleted before re-saving because GitHub Actions does not allow overwriting an existing cache key. Both delete and save run unconditionally (if: always()) so the cache is preserved even when smelt has failures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7393e30 commit e333d84

5 files changed

Lines changed: 28 additions & 5 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main/ci-set
33
sh ci-setup-github-actions.sh
44

55
# Install native libraries needed to build and test smelt components.
6-
pkgs="libxcb-shape0" # org.janelia:H5J_Loader_Plugin
6+
pkgs="libxcb-shape0" # org.janelia:H5J_Loader_Plugin
77
pkgs="$pkgs libgtk2.0-0" # net.imagej:imagej-opencv
8-
pkgs="$pkgs libblosc1" # org.janelia.saalfeldlab:n5-blosc
8+
pkgs="$pkgs libblosc1" # org.janelia.saalfeldlab:n5-blosc
99
sudo apt-get update
1010
sudo apt-get -y install $pkgs

.github/workflows/build.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ on:
1414
jobs:
1515
build:
1616
runs-on: ubuntu-latest
17+
permissions:
18+
actions: write # needed to delete and re-save the pombast cache
1719

1820
steps:
1921
- uses: actions/checkout@v4
@@ -34,7 +36,7 @@ jobs:
3436
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
3537

3638
- name: Set up build environment
37-
run: .github/build-setup.sh
39+
run: .github/setup-build.sh
3840
shell: bash
3941

4042
- name: Maven CI build
@@ -49,10 +51,32 @@ jobs:
4951
CENTRAL_PASS: ${{ secrets.CENTRAL_PASS }}
5052
SIGNING_ASC: ${{ secrets.SIGNING_ASC }}
5153

54+
- name: Restore pombast cache
55+
uses: actions/cache/restore@v4
56+
with:
57+
path: ~/.cache/pombast
58+
key: ${{ runner.os }}-pombast-cache
59+
5260
- name: Smelt components
5361
run: .github/smelt.sh
5462
shell: bash
5563

64+
- name: Delete old pombast cache
65+
if: always()
66+
run: |
67+
gh api --method DELETE \
68+
-H "Accept: application/vnd.github+json" \
69+
"/repos/scijava/pom-scijava/actions/caches?key=${{ runner.os }}-pombast-cache" || true
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
73+
- name: Save pombast cache
74+
if: always()
75+
uses: actions/cache/save@v4
76+
with:
77+
path: ~/.cache/pombast
78+
key: ${{ runner.os }}-pombast-cache
79+
5680
- name: Publish smelt results
5781
if: always() && github.ref == 'refs/heads/master' && github.event_name == 'push'
5882
run: .github/publish.sh smelt.json "Update smelt results"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
cache: 'maven'
2121

2222
- name: Set up release environment
23-
run: .github/release-setup.sh
23+
run: .github/setup-release.sh
2424
shell: bash
2525

2626
- name: Execute the release

.github/workflows/status.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
push:
88
branches:
99
- master
10-
workflow_dispatch:
1110

1211
jobs:
1312
status:

0 commit comments

Comments
 (0)