@@ -55,14 +55,14 @@ runs:
5555
5656 - name : Download CTK cache
5757 id : ctk-get-cache
58- uses : actions/download-artifact @v4
58+ uses : actions/cache/restore @v4
5959 continue-on-error : true
6060 with :
61- name : ${{ env.CTK_CACHE_KEY }}
62- path : ./
61+ key : ${{ env.CTK_CACHE_KEY }}
62+ path : ./${{ env.CTK_CACHE_FILENAME }}
6363
6464 - name : Get CUDA components
65- if : ${{ steps.ctk-get-cache.outcome == 'failure ' }}
65+ if : ${{ steps.ctk-get-cache.outputs.cache-hit != 'true ' }}
6666 shell : bash --noprofile --norc -xeuo pipefail {0}
6767 run : |
6868 CUDA_PATH="./cuda_toolkit"
@@ -123,16 +123,15 @@ runs:
123123 # so setting the CUDA_PATH env var here is meaningless.
124124
125125 - 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
129129 with :
130- name : ${{ env.CTK_CACHE_KEY }}
130+ key : ${{ env.CTK_CACHE_KEY }}
131131 path : ./${{ env.CTK_CACHE_FILENAME }}
132- if-no-files-found : error
133132
134133 - name : Restore CTK cache
135- if : ${{ steps.ctk-get-cache.outcome == 'success ' }}
134+ if : ${{ steps.ctk-get-cache.outputs.cache-hit == 'true ' }}
136135 shell : bash --noprofile --norc -xeuo pipefail {0}
137136 run : |
138137 ls -l
0 commit comments