Skip to content

Commit

Permalink
Refactor macos-arm64 into separate group
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman committed Dec 12, 2022
1 parent 2946b23 commit fbebbd6
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 32 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/validate-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
62 changes: 62 additions & 0 deletions .github/workflows/validate-macos-arm64-binaries.yml
Original file line number Diff line number Diff line change
@@ -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
32 changes: 0 additions & 32 deletions .github/workflows/validate-macos-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ 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:
Expand All @@ -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: ${{ 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
2 changes: 2 additions & 0 deletions .github/workflows/validate-nightly-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ 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:
- .github/workflows/validate-nightly-binaries.yml
- .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:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validate-release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ 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:
- .github/workflows/validate-release-binaries.yml
- .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:
Expand Down
Empty file modified release/cut-release-branch.sh
100644 → 100755
Empty file.

0 comments on commit fbebbd6

Please sign in to comment.