name: linux-test-label on: workflow_call: inputs: build-environment: required: true type: string description: Top-level label for what's being built/tested. test-matrix: required: true type: string description: JSON description of what test configs to run. docker-image: required: true type: string description: Docker image to run in. sync-tag: required: false type: string default: "" description: | If this is set, our linter will use this to make sure that every other job with the same `sync-tag` is identical. timeout-minutes: required: false type: number default: 240 description: | Set the maximum (in minutes) how long the workflow should take to finish use-gha: required: false type: string default: "" description: If set to any value, upload to GHA. Otherwise upload to S3. dashboard-tag: required: false type: string default: "" s3-bucket: description: S3 bucket to download artifact required: false type: string default: "gha-artifacts" aws-role-to-assume: description: role to assume for downloading artifacts required: false type: string default: "" secrets: HUGGING_FACE_HUB_TOKEN: required: false description: | HF Auth token to avoid rate limits when downloading models or datasets from hub env: GIT_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} jobs: test: # Don't run on forked repos or empty test matrix if: github.repository_owner == 'pytorch' && toJSON(fromJSON(inputs.test-matrix).include) != '[]' strategy: matrix: ${{ fromJSON(inputs.test-matrix) }} fail-fast: false runs-on: group: ${{ matrix.runner }} timeout-minutes: ${{ matrix.mem_leak_check == 'mem_leak_check' && 600 || inputs.timeout-minutes }} steps: - name: Checkout PyTorch uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.4 - name: Linux Test id: linux-test uses: ./.github/actions/linux-test with: build-environment: ${{ inputs.build-environment }} test-matrix: ${{ inputs.test-matrix }} docker-image: ${{ inputs.docker-image }} sync-tag: ${{ inputs.sync-tag }} use-gha: ${{ inputs.use-gha }} dashboard-tag: ${{ inputs.dashboard-tag }} s3-bucket: ${{ inputs.s3-bucket }} aws-role-to-assume: ${{ inputs.aws-role-to-assume }} HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}