Skip to content

Commit d600578

Browse files
authored
Adding more OS's to validate domain library workflow (#1238)
* Adding more OS's to validate domain library workflow * conda and wheel togeather * add macos workflows * fix workflow
1 parent 7d11786 commit d600578

File tree

2 files changed

+82
-24
lines changed

2 files changed

+82
-24
lines changed

.github/workflows/test-validate-domain-library.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
test-linux-conda:
11+
test-validate-domain-library:
1212
uses: ./.github/workflows/validate-domain-library.yml
1313
with:
14-
package_type: "conda"
15-
os: "linux"
14+
package_type: "conda,wheel"
15+
os: "all"
1616
channel: "release"
1717
repository: "pytorch/builder"
1818
ref: main

.github/workflows/validate-domain-library.yml

Lines changed: 79 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,32 +36,48 @@ on:
3636
type: string
3737

3838
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')
4141
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
4242
with:
43-
package-type: conda
43+
package-type: ${{ inputs.package_type }}
4444
os: linux
4545
channel: ${{ inputs.channel }}
4646
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')
4949
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
5050
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 }}
5470
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
5874
strategy:
59-
matrix: ${{ fromJson(needs.generate-linux-conda-matrix.outputs.matrix) }}
75+
matrix: ${{ fromJson(needs.generate-linux-matrix.outputs.matrix) }}
6076
fail-fast: false
6177
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
6278
name: "linux-${{ matrix.package_type }}-${{ matrix.python_version }}"
6379
with:
64-
runner: "linux.2xlarge"
80+
runner: ${{ matrix.validation_runner }}
6581
repository: ${{ inputs.repository }}
6682
ref: ${{ inputs.ref || github.ref }}
6783
job-name: "linux-${{ matrix.package_type }}-${{ matrix.python_version }}"
@@ -73,19 +89,61 @@ jobs:
7389
export CHANNEL="${{ matrix.channel }}"
7490
export SMOKE_TEST="${{ inputs.smoke_test }}"
7591
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
7995
strategy:
80-
matrix: ${{ fromJson(needs.generate-linux-wheel-matrix.outputs.matrix) }}
96+
matrix: ${{ fromJson(needs.generate-windows-matrix.outputs.matrix) }}
8197
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 }}"
84100
with:
85-
runner: "linux.2xlarge"
101+
runner: ${{ matrix.validation_runner }}
86102
repository: ${{ inputs.repository }}
87103
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 }}"
89147
script: |
90148
set -ex
91149
export ENV_NAME="conda-env-${{ github.run_id }}"

0 commit comments

Comments
 (0)