Skip to content

Commit 4a6fe7b

Browse files
authored
Refactor macos and linux to use same validate-binary action (#1129)
* Refactor macos binaries * Fix action name * Refactoring macos and linux * Fix target_os for mac * Fix ident * Refactor macos and linux
1 parent 4ba7408 commit 4a6fe7b

File tree

4 files changed

+99
-106
lines changed

4 files changed

+99
-106
lines changed

.github/workflows/call-reusable-workflow-to-validate-MacOS-binaries.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/validate-MacOS-binaries.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/validate-linux-binaries.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Validate binary images
1+
name: Validate linux binaries
22

33
on:
44
push:
@@ -36,10 +36,8 @@ jobs:
3636
fail-fast: false
3737
runs-on: ${{ matrix.validation_runner }}
3838
steps:
39-
- name: Checkout PyTorch builder
40-
uses: actions/checkout@v2
4139
- name: Validate binary conda
42-
uses: ./.github/actions/validate-linux-binary
40+
uses: pytorch/builder/.github/actions/validate-binary@main
4341
with:
4442
gpu_arch_type: ${{ matrix.gpu_arch_type }}
4543
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
@@ -53,10 +51,8 @@ jobs:
5351
fail-fast: false
5452
runs-on: ${{ matrix.validation_runner }}
5553
steps:
56-
- name: Checkout PyTorch builder
57-
uses: actions/checkout@v2
5854
- name: Validate binary wheel
59-
uses: ./.github/actions/validate-linux-binary
55+
uses: pytorch/builder/.github/actions/validate-binary@main
6056
with:
6157
gpu_arch_type: ${{ matrix.gpu_arch_type }}
6258
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
@@ -72,8 +68,6 @@ jobs:
7268
env:
7369
PYTHON_VERSION: ${{ matrix.python_version }}
7470
steps:
75-
- name: Checkout PyTorch builder
76-
uses: actions/checkout@v2
7771
- name: Install pytorch and smoke test
7872
env:
7973
INSTALLATION: ${{ matrix.installation }}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Validate MacOS Binaries
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- .github/workflows/validate-macos-binaries.yml
7+
jobs:
8+
generate-arm64-conda-matrix:
9+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
10+
with:
11+
package-type: conda
12+
os: macos-arm64
13+
channel: all
14+
generate-arm64-wheel-matrix:
15+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
16+
with:
17+
package-type: wheel
18+
os: macos-arm64
19+
channel: all
20+
generate-x86_64-conda-matrix:
21+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
22+
with:
23+
package-type: conda
24+
os: macos-x86_64
25+
channel: all
26+
generate-x86_64-wheel-matrix:
27+
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
28+
with:
29+
package-type: wheel
30+
os: macos-x86_64
31+
channel: all
32+
33+
validate-macos-arm64-binaries-conda:
34+
needs: generate-arm64-conda-matrix
35+
strategy:
36+
matrix:
37+
${{ fromJson(needs.generate-arm64-conda-matrix.outputs.matrix) }}
38+
fail-fast: false
39+
runs-on: ${{ matrix.validation_runner }}
40+
steps:
41+
- name: Validate binary conda
42+
uses: pytorch/builder/.github/actions/validate-binary@main
43+
with:
44+
gpu_arch_type: ${{ matrix.gpu_arch_type }}
45+
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
46+
installation: ${{ matrix.installation }}
47+
python_version: ${{ matrix.python_version }}
48+
target_os: macos
49+
validate-macos-arm64-binaries-wheel:
50+
needs: generate-arm64-wheel-matrix
51+
strategy:
52+
matrix:
53+
${{ fromJson(needs.generate-arm64-wheel-matrix.outputs.matrix) }}
54+
fail-fast: false
55+
runs-on: ${{ matrix.validation_runner }}
56+
steps:
57+
- name: Validate binary wheel
58+
uses: pytorch/builder/.github/actions/validate-binary@main
59+
with:
60+
gpu_arch_type: ${{ matrix.gpu_arch_type }}
61+
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
62+
installation: ${{ matrix.installation }}
63+
python_version: ${{ matrix.python_version }}
64+
target_os: macos
65+
validate-macos-x86_64-binaries-conda:
66+
needs: generate-x86_64-conda-matrix
67+
strategy:
68+
matrix:
69+
${{ fromJson(needs.generate-x86_64-conda-matrix.outputs.matrix) }}
70+
fail-fast: false
71+
runs-on: ${{ matrix.validation_runner }}
72+
steps:
73+
- name: Validate binary conda
74+
uses: pytorch/builder/.github/actions/validate-binary@main
75+
with:
76+
gpu_arch_type: ${{ matrix.gpu_arch_type }}
77+
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
78+
installation: ${{ matrix.installation }}
79+
python_version: ${{ matrix.python_version }}
80+
target_os: macos
81+
validate-macos-x86_64-binaries-wheel:
82+
needs: generate-x86_64-wheel-matrix
83+
strategy:
84+
matrix:
85+
${{ fromJson(needs.generate-x86_64-wheel-matrix.outputs.matrix) }}
86+
fail-fast: false
87+
runs-on: ${{ matrix.validation_runner }}
88+
steps:
89+
- name: Validate binary wheel
90+
uses: pytorch/builder/.github/actions/validate-binary@main
91+
with:
92+
gpu_arch_type: ${{ matrix.gpu_arch_type }}
93+
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
94+
installation: ${{ matrix.installation }}
95+
python_version: ${{ matrix.python_version }}
96+
target_os: macos

0 commit comments

Comments
 (0)