@@ -55,14 +55,14 @@ runs:
55
55
56
56
- name : Download CTK cache
57
57
id : ctk-get-cache
58
- uses : actions/download-artifact @v4
58
+ uses : actions/cache/restore @v4
59
59
continue-on-error : true
60
60
with :
61
- name : ${{ env.CTK_CACHE_KEY }}
62
- path : ./
61
+ key : ${{ env.CTK_CACHE_KEY }}
62
+ path : ${{ env.CTK_CACHE_FILENAME }}
63
63
64
64
- name : Get CUDA components
65
- if : ${{ steps.ctk-get-cache.outcome == 'failure ' }}
65
+ if : ${{ steps.ctk-get-cache.outputs.cache-hit != 'true ' }}
66
66
shell : bash --noprofile --norc -xeuo pipefail {0}
67
67
run : |
68
68
CUDA_PATH="./cuda_toolkit"
@@ -123,16 +123,15 @@ runs:
123
123
# so setting the CUDA_PATH env var here is meaningless.
124
124
125
125
- name : Upload CTK cache
126
- if : ${{ steps.ctk-get-cache.outcome == 'failure' }}
127
- uses : actions/upload-artifact@v4
128
- continue-on-error : true
126
+ if : ${{ always() &&
127
+ steps.ctk-get-cache.outputs.cache-hit != 'true' }}
128
+ uses : actions/cache/save@v4
129
129
with :
130
- name : ${{ env.CTK_CACHE_KEY }}
130
+ key : ${{ env.CTK_CACHE_KEY }}
131
131
path : ./${{ env.CTK_CACHE_FILENAME }}
132
- if-no-files-found : error
133
132
134
133
- name : Restore CTK cache
135
- if : ${{ steps.ctk-get-cache.outcome == 'success ' }}
134
+ if : ${{ steps.ctk-get-cache.outputs.cache-hit == 'true ' }}
136
135
shell : bash --noprofile --norc -xeuo pipefail {0}
137
136
run : |
138
137
ls -l
0 commit comments