Skip to content

Commit 53cc628

Browse files
committed
Testing new workflow
Fix naming fix input
1 parent cc8d20c commit 53cc628

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Validate domain libary
2+
3+
# A reusable workflow that triggers a set of jobs that perform a smoke test / validation of pytorch binaries.
4+
# Optionally restricts validation to the specified OS and channel.
5+
# For the details about parameter values, see:
6+
# pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
7+
# For an example of the `workflow_call` usage see:
8+
# https://github.com/pytorch/builder/pull/1144
9+
on:
10+
workflow_call:
11+
inputs:
12+
os:
13+
description: "Operating system to generate for (linux, windows, macos, macos-arm64)"
14+
required: true
15+
type: string
16+
channel:
17+
description: "Channel to use (nightly, test, release, all)"
18+
required: true
19+
type: string
20+
ref:
21+
description: 'Reference to checkout, defaults to empty'
22+
default: ""
23+
required: false
24+
type: string
25+
package-type:
26+
description: "Package type (conda, wheel, all)"
27+
required: true
28+
type: string
29+
repository:
30+
description: "Path to repository to checkout"
31+
required: true
32+
type: string
33+
smoke_test:
34+
description: "Path to a smoke test script"
35+
required: true
36+
type: string
37+
38+
jobs:
39+
40+
generate-linux-conda-matrix:
41+
if: (inputs.os == 'linux' || inputs.os == 'all') && (inputs.package_type == 'conda' || inputs.package_type == 'all')
42+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
43+
with:
44+
package-type: conda
45+
os: linux
46+
channel: ${{ inputs.channel }}
47+
with-cuda: disable
48+
generate-linux-wheel-matrix:
49+
if: (inputs.os == 'linux' || inputs.os == 'all') && (inputs.package_type == 'wheel' || inputs.package_type == 'all')
50+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
51+
with:
52+
package-type: wheel
53+
os: linux
54+
channel: ${{ inputs.channel || 'nightly' }}
55+
with-cuda: disable
56+
validate-conda-linux:
57+
if: (inputs.os == 'linux' || inputs.os == 'all') && (inputs.package_type == 'conda' || inputs.package_type == 'all')
58+
needs: generate-linux-conda-matrix
59+
strategy:
60+
matrix: ${{ fromJson(needs.generate-linux-conda-matrix.outputs.matrix) }}
61+
fail-fast: false
62+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
63+
name: "text-${{ matrix.package_type }}-${{ matrix.python_version }}"
64+
with:
65+
runner: "linux.2xlarge"
66+
repository: ${{ inputs.repository }}
67+
ref: ${{ inputs.ref || github.ref }}
68+
job-name: "text-${{ matrix.package_type }}-${{ matrix.python_version }}"
69+
script: |
70+
set -ex
71+
export ENV_NAME="conda-env-${{ github.run_id }}"
72+
export DESIRED_PYTHON="${{ matrix.python_version }}"
73+
export PACKAGE_TYPE="${{ matrix.package_type }}"
74+
export CHANNEL="${{ matrix.channel }}"
75+
export SMOKE_TEST="${{ inputs.smoke_test }}"
76+
eval $SMOKE_TEST
77+
validate-wheel-linux:
78+
if: (inputs.os == 'linux' || inputs.os == 'all') && (inputs.package_type == 'wheel' || inputs.package_type == 'all')
79+
needs: generate-linux-wheel-matrix
80+
strategy:
81+
matrix: ${{ fromJson(needs.generate-linux-wheel-matrix.outputs.matrix) }}
82+
fail-fast: false
83+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
84+
name: "text-${{ matrix.package_type }}-${{ matrix.python_version }}"
85+
with:
86+
runner: "linux.2xlarge"
87+
repository: ${{ inputs.repository }}
88+
ref: ${{ inputs.ref || github.ref }}
89+
job-name: "text-${{ matrix.package_type }}-${{ matrix.python_version }}"
90+
script: |
91+
set -ex
92+
export ENV_NAME="conda-env-${{ github.run_id }}"
93+
export DESIRED_PYTHON="${{ matrix.python_version }}"
94+
export PACKAGE_TYPE="${{ matrix.package_type }}"
95+
export CHANNEL="${{ matrix.channel }}"
96+
export SMOKE_TEST="${{ inputs.smoke_test }}"
97+
eval $SMOKE_TEST

0 commit comments

Comments
 (0)