Update to upload-artifacts and download-artifacts to v4 (#139808)

The 2 actions actions/download-artifact@v3 and
actions/upload-artifact@v3 will be deprecated December 5th, 2024. This change updates them to using v4.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/139808
Approved by: https://github.com/seemethere
This commit is contained in:
Thanh Ha 2024-11-06 05:57:38 +00:00 committed by PyTorch MergeBot
parent 157c18a180
commit d031d1bf4c
9 changed files with 13 additions and 13 deletions

View File

@ -26,7 +26,7 @@ runs:
- name: Download PyTorch Build Artifacts from GHA
if: ${{ inputs.use-gha }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.name }}

View File

@ -18,7 +18,7 @@ runs:
- name: Download TD Artifacts from GHA
if: inputs.use-gha
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: td_results.json

View File

@ -147,7 +147,7 @@ runs:
# GHA upload
- name: Store Test Downloaded JSONs on Github
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: inputs.use-gha
continue-on-error: true
with:
@ -158,7 +158,7 @@ runs:
path: test/**/*.json
- name: Store Test Reports on Github
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: inputs.use-gha
continue-on-error: true
with:
@ -172,7 +172,7 @@ runs:
test/**/*.csv
- name: Store Usage Logs on Github
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: inputs.use-gha
continue-on-error: true
with:

View File

@ -287,7 +287,7 @@ jobs:
s3-bucket: ${{ inputs.s3-bucket }}
- name: Store PyTorch Build Artifacts for s390x
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: inputs.build-generates-artifacts && steps.build.outcome != 'skipped' && !inputs.use_split_build && inputs.build-environment == 'linux-s390x-binary-manywheel'
with:
name: ${{ inputs.build-environment }}
@ -296,7 +296,7 @@ jobs:
path: artifacts.zip
- name: Store PyTorch Build Artifacts for s390x for split build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: inputs.build-generates-artifacts && steps.build.outcome != 'skipped' && inputs.use_split_build && inputs.build-environment == 'linux-s390x-binary-manywheel'
with:
name: ${{ inputs.build-environment }}-experimental-split-build

View File

@ -186,7 +186,7 @@ jobs:
zip -1 -r artifacts.zip dist/ build/.ninja_log build/compile_commands.json .additional_ci_files
- name: Store PyTorch Build Artifacts on GHA
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: inputs.build-generates-artifacts && steps.build.outcome != 'skipped'
with:
name: ${{ env.BUILD_ENVIRONMENT }}
@ -195,7 +195,7 @@ jobs:
path: artifacts.zip
- name: Upload sccache stats to GHA
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
# Only if sccache is installed, see above
if: ${{ (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && steps.build.outcome != 'skipped' }}
with:

View File

@ -269,7 +269,7 @@ jobs:
find . -iname "core.[1-9]*" -exec docker exec "${CONTAINER_NAME}" sh -c "gdb python {} -ex 'bt' -ex 'q'" \;
- name: Store Core dumps on GitHub
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: coredumps-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}

View File

@ -270,7 +270,7 @@ jobs:
docker stop "${{ env.CONTAINER_NAME }}"
- name: Store Core dumps on GitHub
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: coredumps-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}

View File

@ -42,7 +42,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: SARIF file
path: results.sarif

View File

@ -85,7 +85,7 @@ jobs:
path: td_results.json
- name: Store TD results on GHA
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: steps.td.outcome == 'success'
with:
name: td_results.json