diff --git a/.github/workflows/validate-binaries.yml b/.github/workflows/validate-binaries.yml index 7f9d22eb21..2a6106a206 100644 --- a/.github/workflows/validate-binaries.yml +++ b/.github/workflows/validate-binaries.yml @@ -71,3 +71,10 @@ jobs: with: channel: ${{ inputs.channel }} ref: ${{ inputs.ref || github.ref }} + + mac-arm64: + if: inputs.os == 'macos' || inputs.os == 'all' + uses: ./.github/workflows/validate-macos-arm64-binaries.yml + with: + channel: ${{ inputs.channel }} + ref: ${{ inputs.ref || github.ref }} diff --git a/.github/workflows/validate-macos-arm64-binaries.yml b/.github/workflows/validate-macos-arm64-binaries.yml new file mode 100644 index 0000000000..aa9831a933 --- /dev/null +++ b/.github/workflows/validate-macos-arm64-binaries.yml @@ -0,0 +1,62 @@ +name: Validate MacOS ARM64 Binaries + +on: + workflow_call: + inputs: + channel: + description: "Channel to use (nightly, test, release, all)" + required: true + type: string + ref: + description: 'Reference to checkout, defaults to empty' + default: "" + required: false + type: string + workflow_dispatch: + inputs: + channel: + description: "Channel to use (nightly, test, release, all)" + required: true + type: choice + options: + - release + - nightly + - test + - all + ref: + description: 'Reference to checkout, defaults to empty' + default: "" + required: false + type: string + +jobs: + generate-macos-arm64-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: all + os: macos-arm64 + channel: ${{ inputs.channel }} + macos-arm64: + needs: generate-macos-arm64-matrix + strategy: + matrix: ${{ fromJson(needs.generate-macos-arm64-matrix.outputs.matrix) }} + fail-fast: false + uses: pytorch/test-infra/.github/workflows/macos_job.yml@main + name: ${{ matrix.build_name }} + with: + runner: ${{ matrix.validation_runner }} + repository: "pytorch/builder" + ref: ${{ inputs.ref || github.ref }} + job-name: ${{ matrix.build_name }} + script: | + set -ex + export ENV_NAME="conda-env-${{ github.run_id }}" + export GPU_ARCH_VER="${{ matrix.gpu_arch_version }}" + export GPU_ARCH_TYPE="${{ matrix.gpu_arch_type }}" + export INSTALLATION="${{ matrix.installation }}" + export CUDA_VER="${{ matrix.desired_cuda }}" + export DESIRED_PYTHON="${{ matrix.python_version }}" + export DESIRED_CUDA="${{ matrix.desired_cuda }}" + export PACKAGE_TYPE="${{ matrix.package_type }}" + export TARGET_OS="macos-arm64" + ./.github/scripts/validate_binaries.sh diff --git a/.github/workflows/validate-macos-binaries.yml b/.github/workflows/validate-macos-binaries.yml index 10ded7b9e8..da4d387959 100644 --- a/.github/workflows/validate-macos-binaries.yml +++ b/.github/workflows/validate-macos-binaries.yml @@ -36,25 +36,18 @@ jobs: package-type: all os: macos channel: ${{ inputs.channel }} - generate-macos-arm64-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main - with: - package-type: all - os: macos-arm64 - channel: ${{ inputs.channel }} - macos: needs: generate-macos-matrix strategy: matrix: ${{ fromJson(needs.generate-macos-matrix.outputs.matrix) }} fail-fast: false uses: pytorch/test-infra/.github/workflows/macos_job.yml@main - name: macos + name: ${{ matrix.build_name }} with: runner: ${{ matrix.validation_runner }} repository: "pytorch/builder" ref: ${{ inputs.ref || github.ref }} - job-name: macos + job-name: ${{ matrix.build_name }} script: | set -ex export ENV_NAME="conda-env-${{ github.run_id }}" @@ -68,28 +61,3 @@ jobs: export PACKAGE_TYPE="${{ matrix.package_type }}" export TARGET_OS="macos" ./.github/scripts/validate_binaries.sh - - macos-arm64: - needs: generate-macos-arm64-matrix - strategy: - matrix: ${{ fromJson(needs.generate-macos-arm64-matrix.outputs.matrix) }} - fail-fast: false - uses: pytorch/test-infra/.github/workflows/macos_job.yml@main - name: macos-arm64 - with: - runner: ${{ matrix.validation_runner }} - repository: "pytorch/builder" - ref: ${{ inputs.ref || github.ref }} - job-name: macos-arm64 - script: | - set -ex - export ENV_NAME="conda-env-${{ github.run_id }}" - export GPU_ARCH_VER="${{ matrix.gpu_arch_version }}" - export GPU_ARCH_TYPE="${{ matrix.gpu_arch_type }}" - export INSTALLATION="${{ matrix.installation }}" - export CUDA_VER="${{ matrix.desired_cuda }}" - export DESIRED_PYTHON="${{ matrix.python_version }}" - export DESIRED_CUDA="${{ matrix.desired_cuda }}" - export PACKAGE_TYPE="${{ matrix.package_type }}" - export TARGET_OS="macos-arm64" - ./.github/scripts/validate_binaries.sh diff --git a/.github/workflows/validate-nightly-binaries.yml b/.github/workflows/validate-nightly-binaries.yml index 78158478c6..13e41514d9 100644 --- a/.github/workflows/validate-nightly-binaries.yml +++ b/.github/workflows/validate-nightly-binaries.yml @@ -15,6 +15,7 @@ on: - .github/workflows/validate-linux-binaries.yml - .github/workflows/validate-windows-binaries.yml - .github/workflows/validate-macos-binaries.yml + - .github/workflows/validate-macos-arm64-binaries.yml - test/smoke_test/* pull_request: paths: @@ -22,6 +23,7 @@ on: - .github/workflows/validate-linux-binaries.yml - .github/workflows/validate-windows-binaries.yml - .github/workflows/validate-macos-binaries.yml + - .github/workflows/validate-macos-arm64-binaries.yml - test/smoke_test/* jobs: diff --git a/.github/workflows/validate-release-binaries.yml b/.github/workflows/validate-release-binaries.yml index ba3f3d095f..cc77561edc 100644 --- a/.github/workflows/validate-release-binaries.yml +++ b/.github/workflows/validate-release-binaries.yml @@ -15,6 +15,7 @@ on: - .github/workflows/validate-linux-binaries.yml - .github/workflows/validate-windows-binaries.yml - .github/workflows/validate-macos-binaries.yml + - .github/workflows/validate-macos-arm64-binaries.yml - test/smoke_test/* pull_request: paths: @@ -22,6 +23,7 @@ on: - .github/workflows/validate-linux-binaries.yml - .github/workflows/validate-windows-binaries.yml - .github/workflows/validate-macos-binaries.yml + - .github/workflows/validate-macos-arm64-binaries.yml - test/smoke_test/* jobs: