88 branches :
99 - master
1010 schedule :
11- - cron : " 4 5 * * 0" # every Sunday at 0405, to keep cache alive
11+ # Run weekly on Sunday to keep the Maven cache alive.
12+ - cron : ' 4 5 * * 0'
13+
14+ # Queue runs of the same ref; cancel superseded PR builds (they never publish).
15+ concurrency :
16+ group : build-${{ github.ref }}
17+ cancel-in-progress : ${{ github.event_name == 'pull_request' }}
1218
1319jobs :
1420 build :
1521 runs-on : ubuntu-latest
22+ permissions :
23+ actions : write # needed to delete and re-save the pombast cache
1624
1725 steps :
1826 - uses : actions/checkout@v4
27+
1928 - name : Set up Java
2029 uses : actions/setup-java@v4
2130 with :
@@ -24,19 +33,20 @@ jobs:
2433 distribution : ' zulu'
2534 cache : ' maven'
2635
27- - name : Set up CI environment
28- run : .github/setup.sh
36+ - uses : astral-sh/setup-uv@v6
2937
30- - name : Restore the melting-pot cache
31- id : restore-cache
32- uses : actions/cache/restore@v3
38+ - uses : webfactory/ssh-agent@v0.9.0
39+ if : github.ref == 'refs/heads/master' && github.event_name == 'push'
3340 with :
34- path : ~/.cache/scijava/melting-pot
35- key : ${{ runner.os }}-cache
41+ ssh-private-key : ${{ secrets.SSH_PRIVATE_KEY }}
42+
43+ - name : Set up build environment
44+ run : .github/setup-build.sh
45+ shell : bash
3646
37- - name : Execute the build
38- id : execute-build
47+ - name : Maven CI build
3948 run : .github/build.sh
49+ shell : bash
4050 env :
4151 GPG_KEY_NAME : ${{ secrets.GPG_KEY_NAME }}
4252 GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
@@ -46,22 +56,40 @@ jobs:
4656 CENTRAL_PASS : ${{ secrets.CENTRAL_PASS }}
4757 SIGNING_ASC : ${{ secrets.SIGNING_ASC }}
4858
49- - name : Delete the melting-pot cache
50- if : env.cacheChanged == 'true'
51- id : delete-cache
52- run : |
53- gh api --method DELETE -H "Accept: application/vnd.github+json" /repos/scijava/pom-scijava/actions/caches?key=${{ runner.os }}-cache || true
59+ - name : Restore pombast cache
60+ uses : actions/cache/restore@v4
61+ with :
62+ # pombast: success/timestamp caches; cjdk: downloaded JDKs + Maven;
63+ # jgo: per-artifact bytecode-scan results. (~/.m2 is cached above by
64+ # setup-java's cache: 'maven'.)
65+ path : |
66+ ~/.cache/pombast
67+ ~/.cache/cjdk
68+ ~/.cache/jgo
69+ key : ${{ runner.os }}-pombast-build
70+
71+ - name : Run pombast checks (melt + smelt)
72+ run : bin/check.sh
73+ shell : bash
74+
75+ - name : Delete old pombast cache
76+ if : always()
77+ run : .github/delete-cache.sh "${{ runner.os }}-pombast-build"
78+ shell : bash
5479 env :
55- GITHUB_TOKEN : ${{ secrets.ACCESS_TOKEN }}
80+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5681
57- - name : Save the melting-pot cache
58- if : env.cacheChanged == 'true'
59- id : save-cache
60- uses : actions/cache/save@v3
82+ - name : Save pombast cache
83+ if : always()
84+ uses : actions/cache/save@v4
6185 with :
62- path : ~/.cache/scijava/melting-pot
63- key : ${{ runner.os }}-cache
86+ path : |
87+ ~/.cache/pombast
88+ ~/.cache/cjdk
89+ ~/.cache/jgo
90+ key : ${{ runner.os }}-pombast-build
6491
65- - name : Return the exit code
66- id : exit-build
67- run : .github/exit.sh
92+ - name : Publish smelt results
93+ if : always() && github.ref == 'refs/heads/master' && github.event_name == 'push'
94+ run : .github/publish.sh "Update smelt results" target/pombast/smelt.json
95+ shell : bash
0 commit comments