36
36
type : string
37
37
38
38
jobs :
39
- generate-linux-conda- matrix :
40
- if : (inputs.os == 'linux' || inputs.os == 'all') && (inputs.package_type == 'conda' || inputs.package_type == 'all')
39
+ generate-linux-matrix :
40
+ if : (inputs.os == 'linux' || inputs.os == 'all')
41
41
uses : pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
42
42
with :
43
- package-type : conda
43
+ package-type : ${{ inputs.package_type }}
44
44
os : linux
45
45
channel : ${{ inputs.channel }}
46
46
with-cuda : disable
47
- generate-linux-wheel -matrix :
48
- if : (inputs.os == 'linux ' || inputs.os == 'all') && (inputs.package_type == 'wheel' || inputs.package_type == 'all')
47
+ generate-windows -matrix :
48
+ if : (inputs.os == 'windows ' || inputs.os == 'all')
49
49
uses : pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
50
50
with :
51
- package-type : wheel
52
- os : linux
53
- channel : ${{ inputs.channel || 'nightly' }}
51
+ package-type : ${{ inputs.package_type }}
52
+ os : windows
53
+ channel : ${{ inputs.channel }}
54
+ with-cuda : disable
55
+ generate-macos-matrix :
56
+ if : (inputs.os == 'macos' || inputs.os == 'all')
57
+ uses : pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
58
+ with :
59
+ package-type : ${{ inputs.package_type }}
60
+ os : macos
61
+ channel : ${{ inputs.channel }}
62
+ with-cuda : disable
63
+ generate-macos-arm64-matrix :
64
+ if : (inputs.os == 'macos-arm64' || inputs.os == 'all')
65
+ uses : pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
66
+ with :
67
+ package-type : ${{ inputs.package_type }}
68
+ os : macos-arm64
69
+ channel : ${{ inputs.channel }}
54
70
with-cuda : disable
55
- validate-conda- linux :
56
- if : (inputs.os == 'linux' || inputs.os == 'all') && (inputs.package_type == 'conda' || inputs.package_type == 'all')
57
- needs : generate-linux-conda- matrix
71
+ validate-linux :
72
+ if : (inputs.os == 'linux' || inputs.os == 'all')
73
+ needs : generate-linux-matrix
58
74
strategy :
59
- matrix : ${{ fromJson(needs.generate-linux-conda- matrix.outputs.matrix) }}
75
+ matrix : ${{ fromJson(needs.generate-linux-matrix.outputs.matrix) }}
60
76
fail-fast : false
61
77
uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
62
78
name : " linux-${{ matrix.package_type }}-${{ matrix.python_version }}"
63
79
with :
64
- runner : " linux.2xlarge "
80
+ runner : ${{ matrix.validation_runner }}
65
81
repository : ${{ inputs.repository }}
66
82
ref : ${{ inputs.ref || github.ref }}
67
83
job-name : " linux-${{ matrix.package_type }}-${{ matrix.python_version }}"
@@ -73,19 +89,61 @@ jobs:
73
89
export CHANNEL="${{ matrix.channel }}"
74
90
export SMOKE_TEST="${{ inputs.smoke_test }}"
75
91
eval $SMOKE_TEST
76
- validate-wheel-linux :
77
- if : (inputs.os == 'linux ' || inputs.os == 'all') && (inputs.package_type == 'wheel' || inputs.package_type == 'all')
78
- needs : generate-linux-wheel -matrix
92
+ validate-windows :
93
+ if : (inputs.os == 'windows ' || inputs.os == 'all')
94
+ needs : generate-windows -matrix
79
95
strategy :
80
- matrix : ${{ fromJson(needs.generate-linux-wheel -matrix.outputs.matrix) }}
96
+ matrix : ${{ fromJson(needs.generate-windows -matrix.outputs.matrix) }}
81
97
fail-fast : false
82
- uses : pytorch/test-infra/.github/workflows/linux_job .yml@main
83
- name : " linux -${{ matrix.package_type }}-${{ matrix.python_version }}"
98
+ uses : pytorch/test-infra/.github/workflows/windows_job .yml@main
99
+ name : " windows -${{ matrix.package_type }}-${{ matrix.python_version }}"
84
100
with :
85
- runner : " linux.2xlarge "
101
+ runner : ${{ matrix.validation_runner }}
86
102
repository : ${{ inputs.repository }}
87
103
ref : ${{ inputs.ref || github.ref }}
88
- job-name : " linux-${{ matrix.package_type }}-${{ matrix.python_version }}"
104
+ job-name : " windows-${{ matrix.package_type }}-${{ matrix.python_version }}"
105
+ script : |
106
+ set -ex
107
+ export ENV_NAME="conda-env-${{ github.run_id }}"
108
+ export DESIRED_PYTHON="${{ matrix.python_version }}"
109
+ export PACKAGE_TYPE="${{ matrix.package_type }}"
110
+ export CHANNEL="${{ matrix.channel }}"
111
+ export SMOKE_TEST="${{ inputs.smoke_test }}"
112
+ eval $SMOKE_TEST
113
+ validate-macos :
114
+ if : (inputs.os == 'macos' || inputs.os == 'all')
115
+ needs : generate-macos-matrix
116
+ strategy :
117
+ matrix : ${{ fromJson(needs.generate-macos-matrix.outputs.matrix) }}
118
+ fail-fast : false
119
+ uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
120
+ name : " macos-${{ matrix.package_type }}-${{ matrix.python_version }}"
121
+ with :
122
+ runner : ${{ matrix.validation_runner }}
123
+ repository : ${{ inputs.repository }}
124
+ ref : ${{ inputs.ref || github.ref }}
125
+ job-name : " macos-${{ matrix.package_type }}-${{ matrix.python_version }}"
126
+ script : |
127
+ set -ex
128
+ export ENV_NAME="conda-env-${{ github.run_id }}"
129
+ export DESIRED_PYTHON="${{ matrix.python_version }}"
130
+ export PACKAGE_TYPE="${{ matrix.package_type }}"
131
+ export CHANNEL="${{ matrix.channel }}"
132
+ export SMOKE_TEST="${{ inputs.smoke_test }}"
133
+ eval $SMOKE_TEST
134
+ validate-macos-arm64 :
135
+ if : (inputs.os == 'macos-arm64' || inputs.os == 'all')
136
+ needs : generate-macos-matrix
137
+ strategy :
138
+ matrix : ${{ fromJson(needs.generate-macos-arm64-matrix.outputs.matrix) }}
139
+ fail-fast : false
140
+ uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
141
+ name : " macos-${{ matrix.package_type }}-${{ matrix.python_version }}"
142
+ with :
143
+ runner : ${{ matrix.validation_runner }}
144
+ repository : ${{ inputs.repository }}
145
+ ref : ${{ inputs.ref || github.ref }}
146
+ job-name : " macos-arm64-${{ matrix.package_type }}-${{ matrix.python_version }}"
89
147
script : |
90
148
set -ex
91
149
export ENV_NAME="conda-env-${{ github.run_id }}"
0 commit comments