From 914e3a861ac441b17b3f143c3076fa7a424c4738 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Mon, 13 Sep 2021 15:21:51 -0700 Subject: [PATCH] Revert D30878101: [pytorch][PR] Fix test report uploading Test Plan: revert-hammer Differential Revision: D30878101 (https://github.com/pytorch/pytorch/commit/fba40bfc1ab45b4410504ec64b585c4df74b6f47) Original commit changeset: 0730f17fa3f4 fbshipit-source-id: dad89e68b4daf656dd0b592bc9b2758f00af38c6 --- .github/scripts/generate_ci_workflows.py | 7 +--- .github/templates/bazel_ci_workflow.yml.j2 | 19 +++++++++- .github/templates/common.yml.j2 | 44 ---------------------- .github/templates/linux_ci_workflow.yml.j2 | 28 +++++++++++++- .github/templates/windows_ci_workflow.yml.j2 | 19 +++++++++- .../generated-linux-bionic-cuda10.2-py3.9-gcc7.yml | 10 +++-- .../generated-linux-bionic-py3.6-clang9.yml | 10 +++-- .../generated-linux-bionic-py3.8-gcc9-coverage.yml | 10 +++-- .../generated-linux-xenial-cuda10.2-py3.6-gcc7.yml | 10 +++-- .../generated-linux-xenial-cuda11.3-py3.6-gcc7.yml | 10 +++-- .../generated-linux-xenial-py3.6-gcc5.4.yml | 10 +++-- ...enerated-linux-xenial-py3.6-gcc7-bazel-test.yml | 17 +++------ ...ed-parallelnative-linux-xenial-py3.6-gcc5.4.yml | 10 +++-- ...rated-paralleltbb-linux-xenial-py3.6-gcc5.4.yml | 10 +++-- ...d-periodic-linux-xenial-cuda11.1-py3.6-gcc7.yml | 10 +++-- .../generated-periodic-win-vs2019-cuda11.1-py3.yml | 17 +++------ .github/workflows/generated-win-vs2019-cpu-py3.yml | 17 +++------ .../generated-win-vs2019-cuda10.2-py3.yml | 17 +++------ .../generated-win-vs2019-cuda11.3-py3.yml | 17 +++------ 19 files changed, 143 insertions(+), 149 deletions(-) diff --git a/.github/scripts/generate_ci_workflows.py b/.github/scripts/generate_ci_workflows.py index 0b6a08f..5881151 100755 --- a/.github/scripts/generate_ci_workflows.py +++ b/.github/scripts/generate_ci_workflows.py @@ -7,7 +7,6 @@ from typing import Dict, Set import jinja2 import json import os -import sys from typing_extensions import Literal YamlShellBool = Literal["''", 1] @@ -203,11 +202,7 @@ class CIWorkflow: with open(output_file_path, "w") as output_file: GENERATED = "generated" # Note that please keep the variable GENERATED otherwise phabricator will hide the whole file output_file.writelines([f"# @{GENERATED} DO NOT EDIT MANUALLY\n"]) - try: - content = workflow_template.render(asdict(self)) - except Exception as e: - print(f"Failed on template: {workflow_template}", file=sys.stderr) - raise e + content = workflow_template.render(asdict(self)) output_file.write(content) if content[-1] != "\n": output_file.write("\n") diff --git a/.github/templates/bazel_ci_workflow.yml.j2 b/.github/templates/bazel_ci_workflow.yml.j2 index 5cdf5da..20d33c3 100644 --- a/.github/templates/bazel_ci_workflow.yml.j2 +++ b/.github/templates/bazel_ci_workflow.yml.j2 @@ -131,7 +131,24 @@ on: run: | # Ensure the working directory gets chowned back to the current user docker run --rm -v "$(pwd)":/v -w /v "${ALPINE_IMAGE}" chown -R "$(id -u):$(id -g)" . - !{{ common.upload_test_reports(name='bazel') }} + - name: Zip test reports for upload + if: always() + env: + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' + run: | + # Remove any previous test reports if they exist + rm -f test-reports-*.zip + zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml' + - uses: actions/upload-artifact@v2 + name: Store PyTorch Test Reports + if: always() + with: + name: test-reports + retention-days: 14 + if-no-files-found: error + path: + test-reports-*.zip !{{ common.upload_test_statistics(build_environment) }} !{{ common.teardown_ec2_linux() }} {%- endblock %} diff --git a/.github/templates/common.yml.j2 b/.github/templates/common.yml.j2 index fa34cbb..9b5f51b 100644 --- a/.github/templates/common.yml.j2 +++ b/.github/templates/common.yml.j2 @@ -109,47 +109,3 @@ concurrency: fetch-depth: 0 submodules: !{{ submodules }} {%- endmacro -%} - - -{%- macro upload_test_reports(name) -%} - - name: Zip test reports for upload - if: always() - env: -{%- if name == 'linux' or name == 'windows' %} - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' -{%- else %} - FILE_SUFFIX: '!{{ name }}-${{ github.job }}' -{%- endif %} -{%- if name == 'windows' %} - shell: powershell - run: | - # -ir => recursive include all files in pattern - 7z a "test-reports-$Env:FILE_SUFFIX.zip" -ir'!test\*.xml' -{%- else %} - run: | - # Remove any previous test reports if they exist - rm -f test-reports-*.zip - zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml' -{%- endif %} - - uses: actions/upload-artifact@v2 - name: Store Test Reports - if: always() - with: -{%- if name == 'linux' or name == 'windows' %} - name: test-reports-${{ matrix.config }} -{%- else %} - name: test-reports-!{{ name }} -{%- endif %} - retention-days: 14 - if-no-files-found: error - path: - test-reports-*.zip - - uses: !{{ upload_artifact_s3_action }} - name: Store Test Reports on S3 - if: always() - with: - retention-days: 14 - if-no-files-found: error - path: - test-reports-*.zip -{%- endmacro -%} diff --git a/.github/templates/linux_ci_workflow.yml.j2 b/.github/templates/linux_ci_workflow.yml.j2 index 262de1c..d0ea3ff 100644 --- a/.github/templates/linux_ci_workflow.yml.j2 +++ b/.github/templates/linux_ci_workflow.yml.j2 @@ -348,7 +348,33 @@ jobs: python3 -mpip install codecov==2.1.12 python3 -mcodecov {%- endif %} - !{{ common.upload_test_reports(name='linux') }} + - name: Zip test reports for upload + if: always() + env: + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' + run: | + # Remove any previous test reports if they exist + rm -f test-reports-*.zip + zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml' + - uses: actions/upload-artifact@v2 + name: Store PyTorch Test Reports + if: always() + with: + name: test-reports-${{ matrix.config }} + retention-days: 14 + if-no-files-found: error + path: + test-reports-*.zip + - uses: !{{ common.upload_artifact_s3_action }} + name: Store PyTorch Test Reports on S3 + if: always() + with: + name: test-reports-${{ matrix.config }} + retention-days: 14 + if-no-files-found: error + path: + test-reports-*.zip !{{ common.parse_ref() }} !{{ common.upload_test_statistics(build_environment) }} !{{ common.teardown_ec2_linux() }} diff --git a/.github/templates/windows_ci_workflow.yml.j2 b/.github/templates/windows_ci_workflow.yml.j2 index 37d219a..22913a3 100644 --- a/.github/templates/windows_ci_workflow.yml.j2 +++ b/.github/templates/windows_ci_workflow.yml.j2 @@ -252,7 +252,24 @@ jobs: export RUN_SMOKE_TESTS_ONLY=1 fi .jenkins/pytorch/win-test.sh - !{{ common.upload_test_reports(name='windows') }} + - name: Zip test reports for upload + if: always() + env: + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' + shell: powershell + run: | + # -ir => recursive include all files in pattern + 7z a "test-reports-$Env:COMMIT_SHA1-$Env:WORKFLOW_ID.zip" -ir'!test\*.xml' + - uses: actions/upload-artifact@v2 + name: Store PyTorch Test Reports + if: always() + with: + name: test-reports-${{ matrix.config }} + retention-days: 14 + if-no-files-found: error + path: + pytorch-${{ github.run_id }}/test-reports-*.zip !{{ wait_and_kill_ssh() }} !{{ common.parse_ref() }} !{{ common.upload_test_statistics(build_environment) }} diff --git a/.github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml b/.github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml index e025fd1..da9890c 100644 --- a/.github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml +++ b/.github/workflows/generated-linux-bionic-cuda10.2-py3.9-gcc7.yml @@ -455,13 +455,14 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' run: | # Remove any previous test reports if they exist rm -f test-reports-*.zip - zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml' + zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} @@ -470,9 +471,10 @@ jobs: path: test-reports-*.zip - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 + name: Store PyTorch Test Reports on S3 if: always() with: + name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: diff --git a/.github/workflows/generated-linux-bionic-py3.6-clang9.yml b/.github/workflows/generated-linux-bionic-py3.6-clang9.yml index fe04694..cbb41d4 100644 --- a/.github/workflows/generated-linux-bionic-py3.6-clang9.yml +++ b/.github/workflows/generated-linux-bionic-py3.6-clang9.yml @@ -455,13 +455,14 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' run: | # Remove any previous test reports if they exist rm -f test-reports-*.zip - zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml' + zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} @@ -470,9 +471,10 @@ jobs: path: test-reports-*.zip - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 + name: Store PyTorch Test Reports on S3 if: always() with: + name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: diff --git a/.github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml b/.github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml index 393843d..74e204d 100644 --- a/.github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml +++ b/.github/workflows/generated-linux-bionic-py3.8-gcc9-coverage.yml @@ -459,13 +459,14 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' run: | # Remove any previous test reports if they exist rm -f test-reports-*.zip - zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml' + zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} @@ -474,9 +475,10 @@ jobs: path: test-reports-*.zip - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 + name: Store PyTorch Test Reports on S3 if: always() with: + name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: diff --git a/.github/workflows/generated-linux-xenial-cuda10.2-py3.6-gcc7.yml b/.github/workflows/generated-linux-xenial-cuda10.2-py3.6-gcc7.yml index 22a4ac9..68ed662 100644 --- a/.github/workflows/generated-linux-xenial-cuda10.2-py3.6-gcc7.yml +++ b/.github/workflows/generated-linux-xenial-cuda10.2-py3.6-gcc7.yml @@ -455,13 +455,14 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' run: | # Remove any previous test reports if they exist rm -f test-reports-*.zip - zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml' + zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} @@ -470,9 +471,10 @@ jobs: path: test-reports-*.zip - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 + name: Store PyTorch Test Reports on S3 if: always() with: + name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: diff --git a/.github/workflows/generated-linux-xenial-cuda11.3-py3.6-gcc7.yml b/.github/workflows/generated-linux-xenial-cuda11.3-py3.6-gcc7.yml index 43ac5fc..8b2927c 100644 --- a/.github/workflows/generated-linux-xenial-cuda11.3-py3.6-gcc7.yml +++ b/.github/workflows/generated-linux-xenial-cuda11.3-py3.6-gcc7.yml @@ -455,13 +455,14 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' run: | # Remove any previous test reports if they exist rm -f test-reports-*.zip - zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml' + zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} @@ -470,9 +471,10 @@ jobs: path: test-reports-*.zip - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 + name: Store PyTorch Test Reports on S3 if: always() with: + name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: diff --git a/.github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml b/.github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml index 87d82c2..41f54cd 100644 --- a/.github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml +++ b/.github/workflows/generated-linux-xenial-py3.6-gcc5.4.yml @@ -455,13 +455,14 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' run: | # Remove any previous test reports if they exist rm -f test-reports-*.zip - zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml' + zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} @@ -470,9 +471,10 @@ jobs: path: test-reports-*.zip - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 + name: Store PyTorch Test Reports on S3 if: always() with: + name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: diff --git a/.github/workflows/generated-linux-xenial-py3.6-gcc7-bazel-test.yml b/.github/workflows/generated-linux-xenial-py3.6-gcc7-bazel-test.yml index 7a235db..6f2853d 100644 --- a/.github/workflows/generated-linux-xenial-py3.6-gcc7-bazel-test.yml +++ b/.github/workflows/generated-linux-xenial-py3.6-gcc7-bazel-test.yml @@ -293,24 +293,17 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: 'bazel-${{ github.job }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' run: | # Remove any previous test reports if they exist rm -f test-reports-*.zip - zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml' + zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports - if: always() - with: - name: test-reports-bazel - retention-days: 14 - if-no-files-found: error - path: - test-reports-*.zip - - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 + name: Store PyTorch Test Reports if: always() with: + name: test-reports retention-days: 14 if-no-files-found: error path: diff --git a/.github/workflows/generated-parallelnative-linux-xenial-py3.6-gcc5.4.yml b/.github/workflows/generated-parallelnative-linux-xenial-py3.6-gcc5.4.yml index b6382a2..c27533c 100644 --- a/.github/workflows/generated-parallelnative-linux-xenial-py3.6-gcc5.4.yml +++ b/.github/workflows/generated-parallelnative-linux-xenial-py3.6-gcc5.4.yml @@ -455,13 +455,14 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' run: | # Remove any previous test reports if they exist rm -f test-reports-*.zip - zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml' + zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} @@ -470,9 +471,10 @@ jobs: path: test-reports-*.zip - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 + name: Store PyTorch Test Reports on S3 if: always() with: + name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: diff --git a/.github/workflows/generated-paralleltbb-linux-xenial-py3.6-gcc5.4.yml b/.github/workflows/generated-paralleltbb-linux-xenial-py3.6-gcc5.4.yml index ed6a7c8..f1077ae 100644 --- a/.github/workflows/generated-paralleltbb-linux-xenial-py3.6-gcc5.4.yml +++ b/.github/workflows/generated-paralleltbb-linux-xenial-py3.6-gcc5.4.yml @@ -455,13 +455,14 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' run: | # Remove any previous test reports if they exist rm -f test-reports-*.zip - zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml' + zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} @@ -470,9 +471,10 @@ jobs: path: test-reports-*.zip - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 + name: Store PyTorch Test Reports on S3 if: always() with: + name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: diff --git a/.github/workflows/generated-periodic-linux-xenial-cuda11.1-py3.6-gcc7.yml b/.github/workflows/generated-periodic-linux-xenial-cuda11.1-py3.6-gcc7.yml index 4fbd35d..6dbee1f 100644 --- a/.github/workflows/generated-periodic-linux-xenial-cuda11.1-py3.6-gcc7.yml +++ b/.github/workflows/generated-periodic-linux-xenial-cuda11.1-py3.6-gcc7.yml @@ -453,13 +453,14 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' run: | # Remove any previous test reports if they exist rm -f test-reports-*.zip - zip -r "test-reports-${FILE_SUFFIX}.zip" test -i '*.xml' + zip -r "test-reports-${COMMIT_SHA1}-${WORKFLOW_ID}.zip" test -i '*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} @@ -468,9 +469,10 @@ jobs: path: test-reports-*.zip - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 + name: Store PyTorch Test Reports on S3 if: always() with: + name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: diff --git a/.github/workflows/generated-periodic-win-vs2019-cuda11.1-py3.yml b/.github/workflows/generated-periodic-win-vs2019-cuda11.1-py3.yml index 146fcee..c071bc4 100644 --- a/.github/workflows/generated-periodic-win-vs2019-cuda11.1-py3.yml +++ b/.github/workflows/generated-periodic-win-vs2019-cuda11.1-py3.yml @@ -242,28 +242,21 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' shell: powershell run: | # -ir => recursive include all files in pattern - 7z a "test-reports-$Env:FILE_SUFFIX.zip" -ir'!test\*.xml' + 7z a "test-reports-$Env:COMMIT_SHA1-$Env:WORKFLOW_ID.zip" -ir'!test\*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: - test-reports-*.zip - - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 - if: always() - with: - retention-days: 14 - if-no-files-found: error - path: - test-reports-*.zip + pytorch-${{ github.run_id }}/test-reports-*.zip - name: Wait until all sessions have drained shell: powershell if: always() diff --git a/.github/workflows/generated-win-vs2019-cpu-py3.yml b/.github/workflows/generated-win-vs2019-cpu-py3.yml index 9b1bbf6..d0eb3fd 100644 --- a/.github/workflows/generated-win-vs2019-cpu-py3.yml +++ b/.github/workflows/generated-win-vs2019-cpu-py3.yml @@ -226,28 +226,21 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' shell: powershell run: | # -ir => recursive include all files in pattern - 7z a "test-reports-$Env:FILE_SUFFIX.zip" -ir'!test\*.xml' + 7z a "test-reports-$Env:COMMIT_SHA1-$Env:WORKFLOW_ID.zip" -ir'!test\*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: - test-reports-*.zip - - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 - if: always() - with: - retention-days: 14 - if-no-files-found: error - path: - test-reports-*.zip + pytorch-${{ github.run_id }}/test-reports-*.zip - name: Wait until all sessions have drained shell: powershell if: always() diff --git a/.github/workflows/generated-win-vs2019-cuda10.2-py3.yml b/.github/workflows/generated-win-vs2019-cuda10.2-py3.yml index 448f5d1..c6c752f 100644 --- a/.github/workflows/generated-win-vs2019-cuda10.2-py3.yml +++ b/.github/workflows/generated-win-vs2019-cuda10.2-py3.yml @@ -244,28 +244,21 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' shell: powershell run: | # -ir => recursive include all files in pattern - 7z a "test-reports-$Env:FILE_SUFFIX.zip" -ir'!test\*.xml' + 7z a "test-reports-$Env:COMMIT_SHA1-$Env:WORKFLOW_ID.zip" -ir'!test\*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: - test-reports-*.zip - - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 - if: always() - with: - retention-days: 14 - if-no-files-found: error - path: - test-reports-*.zip + pytorch-${{ github.run_id }}/test-reports-*.zip - name: Wait until all sessions have drained shell: powershell if: always() diff --git a/.github/workflows/generated-win-vs2019-cuda11.3-py3.yml b/.github/workflows/generated-win-vs2019-cuda11.3-py3.yml index 7e0cd3e..67a4a2a 100644 --- a/.github/workflows/generated-win-vs2019-cuda11.3-py3.yml +++ b/.github/workflows/generated-win-vs2019-cuda11.3-py3.yml @@ -244,28 +244,21 @@ jobs: - name: Zip test reports for upload if: always() env: - FILE_SUFFIX: '${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}' + COMMIT_SHA1: ${{ github.event.pull_request.head.sha || github.sha }} + WORKFLOW_ID: '${{ github.run_id }}_${{ github.run_number }}' shell: powershell run: | # -ir => recursive include all files in pattern - 7z a "test-reports-$Env:FILE_SUFFIX.zip" -ir'!test\*.xml' + 7z a "test-reports-$Env:COMMIT_SHA1-$Env:WORKFLOW_ID.zip" -ir'!test\*.xml' - uses: actions/upload-artifact@v2 - name: Store Test Reports + name: Store PyTorch Test Reports if: always() with: name: test-reports-${{ matrix.config }} retention-days: 14 if-no-files-found: error path: - test-reports-*.zip - - uses: seemethere/upload-artifact-s3@v3 - name: Store Test Reports on S3 - if: always() - with: - retention-days: 14 - if-no-files-found: error - path: - test-reports-*.zip + pytorch-${{ github.run_id }}/test-reports-*.zip - name: Wait until all sessions have drained shell: powershell if: always() -- 2.7.4