|
11 | 11 | description: 'JSON array of flows to test' |
12 | 12 | required: true |
13 | 13 | type: string |
14 | | - runner: |
15 | | - description: 'Runner to use' |
16 | | - required: true |
17 | | - type: string |
18 | | - docker-image: |
19 | | - description: 'Docker image to use (Linux only)' |
20 | | - required: false |
21 | | - type: string |
22 | | - python-version: |
23 | | - description: 'Python version to use (macOS only)' |
24 | | - required: false |
25 | | - type: string |
26 | 14 | ref: |
27 | 15 | description: 'Git ref to checkout' |
28 | 16 | required: false |
|
33 | 21 | required: false |
34 | 22 | type: number |
35 | 23 | default: 120 |
| 24 | + run-linux: |
| 25 | + description: 'Whether to run Linux tests' |
| 26 | + required: false |
| 27 | + type: boolean |
| 28 | + default: false |
| 29 | + run-macos: |
| 30 | + description: 'Whether to run macOS tests' |
| 31 | + required: false |
| 32 | + type: boolean |
| 33 | + default: false |
36 | 34 |
|
37 | 35 | jobs: |
38 | | - test-backend: |
| 36 | + test-backend-linux: |
| 37 | + if: ${{ inputs.run-linux }} |
| 38 | + strategy: |
| 39 | + fail-fast: false |
| 40 | + matrix: |
| 41 | + flow: ${{ fromJSON(inputs.flows) }} |
| 42 | + suite: [models, operators] |
| 43 | + |
| 44 | + uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main |
| 45 | + permissions: |
| 46 | + id-token: write |
| 47 | + contents: read |
| 48 | + with: |
| 49 | + ref: ${{ inputs.ref }} |
| 50 | + runner: linux.4xlarge.memory |
| 51 | + docker-image: ci-image:executorch-ubuntu-22.04-clang12 |
| 52 | + submodules: recursive |
| 53 | + timeout: ${{ inputs.timeout }} |
| 54 | + upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }} |
| 55 | + script: | |
| 56 | + set -eux |
| 57 | +
|
| 58 | + source .ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" |
| 59 | +
|
| 60 | + test-backend-macos: |
| 61 | + if: ${{ inputs.run-macos }} |
39 | 62 | strategy: |
40 | 63 | fail-fast: false |
41 | 64 | matrix: |
42 | 65 | flow: ${{ fromJSON(inputs.flows) }} |
43 | 66 | suite: [models, operators] |
44 | 67 |
|
45 | | - uses: ${{ contains(inputs.runner, 'macos') && 'pytorch/test-infra/.github/workflows/macos_job.yml@main' || 'pytorch/test-infra/.github/workflows/linux_job_v2.yml@main' }} |
| 68 | + uses: pytorch/test-infra/.github/workflows/macos_job.yml@main |
46 | 69 | permissions: |
47 | 70 | id-token: write |
48 | 71 | contents: read |
49 | 72 | with: |
50 | 73 | ref: ${{ inputs.ref }} |
51 | | - runner: ${{ inputs.runner }} |
52 | | - docker-image: ${{ inputs.docker-image }} |
53 | | - python-version: ${{ inputs.python-version }} |
| 74 | + runner: macos-m1-stable |
| 75 | + python-version: "3.12" |
54 | 76 | submodules: recursive |
55 | 77 | timeout: ${{ inputs.timeout }} |
56 | 78 | upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }} |
57 | 79 | script: | |
58 | 80 | set -eux |
59 | 81 |
|
60 | | - ${{ contains(inputs.runner, 'macos') && '# This is needed to get the prebuilt PyTorch wheel from S3 |
| 82 | + # This is needed to get the prebuilt PyTorch wheel from S3 |
61 | 83 | ${CONDA_RUN} --no-capture-output pip install awscli==1.37.21 |
62 | 84 |
|
63 | | - source .ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"' || 'source .ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"' }} |
| 85 | + source .ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" |
0 commit comments