Skip to content

Commit 2ec7f3b

Browse files
committed
[CI] Save cache on failures
1 parent e314fbd commit 2ec7f3b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ concurrency:
2222
group: ${{ github.workflow }}-${{ github.ref }}
2323
cancel-in-progress: true
2424

25+
# needed to allow julia-actions/cache to delete old caches that it has created
26+
permissions:
27+
actions: write
28+
contents: read
29+
2530
jobs:
2631
test:
2732
timeout-minutes: 60
@@ -58,6 +63,7 @@ jobs:
5863
version: ${{ matrix.version }}
5964
arch: ${{ matrix.arch }}
6065
- uses: julia-actions/cache@v2
66+
id: julia-cache
6167
with:
6268
cache-name: "tests"
6369
- uses: julia-actions/julia-buildpkg@v1
@@ -68,3 +74,11 @@ jobs:
6874
files: lcov.info
6975
token: ${{ secrets.CODECOV_TOKEN }}
7076
continue-on-error: true
77+
- name: Save Julia depot cache on cancel or failure
78+
id: julia-cache-save
79+
if: cancelled() || failure()
80+
uses: actions/cache/save@v4
81+
with:
82+
path: |
83+
${{ steps.julia-cache.outputs.cache-paths }}
84+
key: ${{ steps.julia-cache.outputs.cache-key }}

0 commit comments

Comments
 (0)