diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml index 30e150cfe5..ca4b077027 100644 --- a/.github/workflows/build_wheels_macos.yml +++ b/.github/workflows/build_wheels_macos.yml @@ -88,6 +88,16 @@ on: description: 'Timeout for the job (in minutes)' default: 60 type: number + secrets: + R2_ACCOUNT_ID: + description: Cloudflare R2 account ID + required: false + R2_ACCESS_KEY_ID: + description: Cloudflare R2 access key ID + required: false + R2_SECRET_ACCESS_KEY: + description: Cloudflare R2 secret access key + required: false permissions: id-token: write @@ -106,6 +116,7 @@ jobs: CU_VERSION: ${{ matrix.desired_cuda }} name: build-${{ matrix.build_name }} runs-on: ${{ inputs.runner-type }} + environment: ${{(inputs.trigger-event == 'schedule' || (inputs.trigger-event == 'push' && (startsWith(github.event.ref, 'refs/heads/nightly') || startsWith(github.event.ref, 'refs/tags/v')))) && 'pytorchbot-env' || ''}} # If a build is taking longer than 60 minutes on these runners we need # to have a conversation timeout-minutes: ${{ inputs.timeout }} @@ -273,6 +284,22 @@ jobs: build-matrix: ${{ inputs.build-matrix }} trigger-event: ${{ inputs.trigger-event }} + upload-r2: + needs: build + uses: ./.github/workflows/_binary_upload_r2.yml + if: always() + with: + repository: ${{ inputs.repository }} + ref: ${{ inputs.ref }} + test-infra-repository: ${{ inputs.test-infra-repository }} + test-infra-ref: ${{ inputs.test-infra-ref }} + build-matrix: ${{ inputs.build-matrix }} + trigger-event: ${{ inputs.trigger-event }} + secrets: + R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }} + R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} + R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} cancel-in-progress: true diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 58a4645d08..8258cf7597 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -82,6 +82,16 @@ on: description: 'CPU architecture to build for' default: "x64" type: string + secrets: + R2_ACCOUNT_ID: + description: Cloudflare R2 account ID + required: false + R2_ACCESS_KEY_ID: + description: Cloudflare R2 access key ID + required: false + R2_SECRET_ACCESS_KEY: + description: Cloudflare R2 secret access key + required: false permissions: id-token: write @@ -101,6 +111,7 @@ jobs: UPLOAD_TO_BASE_BUCKET: ${{ matrix.upload_to_base_bucket }} name: build-${{ matrix.build_name }} runs-on: ${{ matrix.validation_runner }} + environment: ${{(inputs.trigger-event == 'schedule' || (inputs.trigger-event == 'push' && (startsWith(github.event.ref, 'refs/heads/nightly') || startsWith(github.event.ref, 'refs/tags/v')))) && 'pytorchbot-env' || ''}} defaults: run: shell: bash -l {0} @@ -391,6 +402,23 @@ jobs: trigger-event: ${{ inputs.trigger-event }} architecture: ${{ inputs.architecture }} + upload-r2: + needs: build + uses: ./.github/workflows/_binary_upload_r2.yml + if: always() + with: + repository: ${{ inputs.repository }} + ref: ${{ inputs.ref }} + test-infra-repository: ${{ inputs.test-infra-repository }} + test-infra-ref: ${{ inputs.test-infra-ref }} + build-matrix: ${{ inputs.build-matrix }} + trigger-event: ${{ inputs.trigger-event }} + architecture: ${{ inputs.architecture }} + secrets: + R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }} + R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} + R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} - cancel-in-progress: true \ No newline at end of file + cancel-in-progress: true diff --git a/.lintrunner.toml b/.lintrunner.toml index a1bf6e7096..b72835930f 100644 --- a/.lintrunner.toml +++ b/.lintrunner.toml @@ -80,6 +80,7 @@ init_command = [ 'types-colorama==0.4.6', 'filelock==3.13.1', 'junitparser==2.1.1', + 'pytest==8.4.2', 'rich==10.9.0', 'pyyaml==6.0.1', 'optree==0.13.0',