Skip to content

Commit

Permalink
fix artifact parallel upload & lack of cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
leofang committed Dec 8, 2024
1 parent 9d6e69b commit 8ec6090
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,16 @@ runs:
- name: Set up CTK cache variable
shell: bash --noprofile --norc -xeuo pipefail {0}
run: |
echo "CTK_CACHE_KEY=mini-ctk-${{ inputs.cuda-version }}" >> $GITHUB_ENV
echo "CTK_CACHE_FILENAME=mini-ctk-${{ inputs.cuda-version }}.tar.gz" >> $GITHUB_ENV
- name: Download CTK cache
id: ctk-get-cache
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: ${{ env.CTK_CACHE_FILENAME }}
path: .
name: ${{ env.CTK_CACHE_KEY }}
path: ./${{ env.CTK_CACHE_FILENAME }}

- name: Get CUDA components
if: ${{ steps.ctk-get-cache.outcome == 'failure' }}
Expand Down Expand Up @@ -123,9 +124,10 @@ runs:
- name: Upload CTK cache
if: ${{ steps.ctk-get-cache.outcome == 'failure' }}
uses: actions/upload-artifact@v4
continue-on-error: true
with:
pattern: ${{ env.CTK_CACHE_FILENAME }}
path: .
name: ${{ env.CTK_CACHE_KEY }}
path: ./${{ env.CTK_CACHE_FILENAME }}
if-no-files-found: error

- name: Restore CTK cache
Expand Down
5 changes: 3 additions & 2 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ runs:
- name: Set up CTK cache variable
shell: bash --noprofile --norc -xeuo pipefail {0}
run: |
echo "CTK_CACHE_KEY=mini-ctk-${{ inputs.cuda-version }}" >> $GITHUB_ENV
echo "CTK_CACHE_FILENAME=mini-ctk-${{ inputs.cuda-version }}.tar.gz" >> $GITHUB_ENV
- name: Download CTK cache
id: ctk-get-cache
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: ${{ env.CTK_CACHE_FILENAME }}
path: .
name: ${{ env.CTK_CACHE_KEY }}
path: ./${{ env.CTK_CACHE_FILENAME }}

- name: Restore CTK cache
shell: bash --noprofile --norc -xeuo pipefail {0}
Expand Down

0 comments on commit 8ec6090

Please sign in to comment.