Skip to content

Commit 6b28fcf

Browse files
(actions) migrate back actions/cache@v4 (#2700)
Which now also supports save-always, but is maintained much better. See pat-s/always-upload-cache#2
1 parent f47b4c0 commit 6b28fcf

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/ci.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -97,32 +97,35 @@ jobs:
9797
with:
9898
file: moveit2.repos
9999
- name: Cache upstream workspace
100-
uses: pat-s/always-upload-cache@v3.0.11
100+
uses: actions/cache@v4
101101
with:
102102
path: ${{ env.BASEDIR }}/upstream_ws
103103
key: ${{ env.CACHE_PREFIX }}-${{ github.run_id }}
104104
restore-keys: ${{ env.CACHE_PREFIX }}
105+
save-always: true
105106
env:
106107
CACHE_PREFIX: ${{ steps.rosdistro_release_date.outputs.date }}-upstream_ws-${{ steps.repos_edit_timestamp.outputs.timestamp }}-${{ matrix.env.IMAGE }}-${{ hashFiles('moveit2*.repos', '.github/workflows/ci.yaml') }}
107108
# The target directory cache doesn't include the source directory because
108109
# that comes from the checkout. See "prepare target_ws for cache" task below
109110
- name: Cache target workspace
110111
if: "!matrix.env.CCOV"
111-
uses: pat-s/always-upload-cache@v3.0.11
112+
uses: actions/cache@v4
112113
with:
113114
path: ${{ env.BASEDIR }}/target_ws
114115
key: ${{ env.CACHE_PREFIX }}-${{ github.run_id }}
115116
restore-keys: ${{ env.CACHE_PREFIX }}
117+
save-always: true
116118
env:
117119
CACHE_PREFIX: target_ws${{ matrix.env.CCOV && '-ccov' || '' }}-${{ matrix.env.IMAGE }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml', '.github/workflows/ci.yaml') }}
118120
- name: Cache ccache
119-
uses: pat-s/always-upload-cache@v3.0.11
121+
uses: actions/cache@v4
120122
with:
121123
path: ${{ env.CCACHE_DIR }}
122124
key: ${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}
123125
restore-keys: |
124126
${{ env.CACHE_PREFIX }}-${{ github.sha }}
125127
${{ env.CACHE_PREFIX }}
128+
save-always: true
126129
env:
127130
CACHE_PREFIX: ccache-${{ matrix.env.IMAGE }}${{ matrix.env.CCOV && '-ccov' || '' }}
128131
- name: Configure ccache

.github/workflows/sonar.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,23 @@ jobs:
7171
with:
7272
file: moveit2.repos
7373
- name: Cache upstream workspace
74-
uses: pat-s/always-upload-cache@v3.0.11
74+
uses: actions/cache@v4
7575
with:
7676
path: ${{ env.BASEDIR }}/upstream_ws
7777
key: ${{ env.CACHE_PREFIX }}-${{ github.run_id }}
7878
restore-keys: ${{ env.CACHE_PREFIX }}
79+
save-always: true
7980
env:
8081
CACHE_PREFIX: ${{ steps.rosdistro_release_date.outputs.date }}-upstream_ws-${{ steps.repos_edit_timestamp.outputs.timestamp }}-rolling-ci-${{ hashFiles('moveit2*.repos', '.github/workflows/ci.yaml') }}
8182
- name: Cache ccache
82-
uses: pat-s/always-upload-cache@v3.0.11
83+
uses: actions/cache@v4
8384
with:
8485
path: ${{ env.CCACHE_DIR }}
8586
key: ccache-rolling-ci-ccov-${{ github.sha }}-${{ github.run_id }}
8687
restore-keys: |
8788
ccache-rolling-ci-ccov-${{ github.sha }}
8889
ccache-rolling-ci-ccov
90+
save-always: true
8991
- name: Configure ccache
9092
run: |
9193
mkdir -p ${{ env.CCACHE_DIR }}

0 commit comments

Comments
 (0)