• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: linux-test-label
2
3on:
4  workflow_call:
5    inputs:
6      build-environment:
7        required: true
8        type: string
9        description: Top-level label for what's being built/tested.
10      test-matrix:
11        required: true
12        type: string
13        description: JSON description of what test configs to run.
14      docker-image:
15        required: true
16        type: string
17        description: Docker image to run in.
18      sync-tag:
19        required: false
20        type: string
21        default: ""
22        description: |
23          If this is set, our linter will use this to make sure that every other
24          job with the same `sync-tag` is identical.
25      timeout-minutes:
26        required: false
27        type: number
28        default: 240
29        description: |
30          Set the maximum (in minutes) how long the workflow should take to finish
31      use-gha:
32        required: false
33        type: string
34        default: ""
35        description: If set to any value, upload to GHA. Otherwise upload to S3.
36      dashboard-tag:
37        required: false
38        type: string
39        default: ""
40      s3-bucket:
41        description: S3 bucket to download artifact
42        required: false
43        type: string
44        default: "gha-artifacts"
45      aws-role-to-assume:
46        description: role to assume for downloading artifacts
47        required: false
48        type: string
49        default: ""
50    secrets:
51      HUGGING_FACE_HUB_TOKEN:
52        required: false
53        description: |
54          HF Auth token to avoid rate limits when downloading models or datasets from hub
55
56env:
57  GIT_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
58
59jobs:
60  test:
61    # Don't run on forked repos or empty test matrix
62    if: github.repository_owner == 'pytorch' && toJSON(fromJSON(inputs.test-matrix).include) != '[]'
63    strategy:
64      matrix: ${{ fromJSON(inputs.test-matrix) }}
65      fail-fast: false
66    runs-on:
67      group: ${{ matrix.runner }}
68    timeout-minutes: ${{ matrix.mem_leak_check == 'mem_leak_check' && 600 || inputs.timeout-minutes }}
69    steps:
70      - name: Checkout PyTorch
71        uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.4
72
73      - name: Linux Test
74        id: linux-test
75        uses: ./.github/actions/linux-test
76        with:
77          build-environment: ${{ inputs.build-environment }}
78          test-matrix: ${{ inputs.test-matrix }}
79          docker-image: ${{ inputs.docker-image }}
80          sync-tag: ${{ inputs.sync-tag }}
81          use-gha: ${{ inputs.use-gha }}
82          dashboard-tag: ${{ inputs.dashboard-tag }}
83          s3-bucket: ${{ inputs.s3-bucket }}
84          aws-role-to-assume: ${{ inputs.aws-role-to-assume }}
85          HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
86          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87