forked from pytorch/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidate-macos-arm64-binaries.yml
More file actions
130 lines (125 loc) · 4.07 KB
/
Copy pathvalidate-macos-arm64-binaries.yml
File metadata and controls
130 lines (125 loc) · 4.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Validate MacOS ARM64 Binaries
on:
workflow_call:
inputs:
channel:
description: "Channel to use (nightly, test, release, all)"
required: true
type: string
torchonly:
description: 'Validate torchonly'
default: false
required: false
type: boolean
version:
description: 'Version to validate - optional'
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string
include-torchaudio:
description: 'Include torchaudio in validation (by default only torch and torchvision are validated)'
default: false
required: false
type: boolean
use-only-dl-pytorch-org:
description: 'Use only download.pytorch.org when generating wheel install command'
default: "false"
required: false
type: string
use-extra-index-url:
description: 'Use extra-index url for pip tests'
default: false
required: false
type: boolean
use-wheel-variants:
description: 'Use wheel-variants for installing pip binaries'
default: false
required: false
type: boolean
workflow_dispatch:
inputs:
channel:
description: "Channel to use (nightly, test, release, all)"
required: true
type: choice
options:
- release
- nightly
- test
- all
torchonly:
description: 'Validate torchonly'
default: false
required: false
type: boolean
version:
description: 'Version to validate - optional'
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string
include-torchaudio:
description: 'Include torchaudio in validation (by default only torch and torchvision are validated)'
default: false
required: false
type: boolean
use-only-dl-pytorch-org:
description: 'Use only download.pytorch.org when generating wheel install command'
default: "false"
required: false
type: string
use-extra-index-url:
description: 'Use extra-index url for pip tests'
default: false
required: false
type: boolean
use-wheel-variants:
description: 'Use wheel-variants for installing pip binaries'
default: false
required: false
type: boolean
jobs:
generate-macos-arm64-matrix:
uses: ./.github/workflows/generate_binary_build_matrix.yml
with:
package-type: wheel,libtorch # We stopped producing conda nightlies
os: macos-arm64
channel: ${{ inputs.channel }}
use-only-dl-pytorch-org: ${{ inputs.use-only-dl-pytorch-org }}
macos-arm64:
needs: generate-macos-arm64-matrix
strategy:
matrix: ${{ fromJson(needs.generate-macos-arm64-matrix.outputs.matrix) }}
fail-fast: false
uses: ./.github/workflows/macos_job.yml
name: ${{ matrix.build_name }}
with:
runner: ${{ matrix.validation_runner }}
repository: "pytorch/pytorch"
ref: main
job-name: ${{ matrix.build_name }}
binary-matrix: ${{ toJSON(matrix) }}
script: |
set -ex
export ENV_NAME="conda-env-${{ github.run_id }}"
export TARGET_OS="macos-arm64"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
export USE_FORCE_REINSTALL="true"
export INCLUDE_TORCHAUDIO=${{ inputs.include-torchaudio }}
export USE_EXTRA_INDEX_URL=${{ inputs.use-extra-index-url }}
export USE_WHEEL_VARIANTS=${{ inputs.use-wheel-variants }}
if [[ ${{ matrix.package_type }} == "conda" ]]; then
export IS_M1_CONDA_BUILD_JOB=1
fi
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
source ../../test-infra/.github/scripts/validate_binaries.sh