Skip to content

[pull] main from pytorch:main #3885

[pull] main from pytorch:main

[pull] main from pytorch:main #3885

name: Build iOS binaries
on:
push:
branches:
- nightly
tags:
# NOTE: Binary build pipelines should only get triggered on release candidate builds
# Release candidate tags look like: v1.11.0-rc1
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
paths:
- .github/workflows/build-ios-binaries.yml
- .github/workflows/_ios-build-test.yml
pull_request:
paths:
- .github/workflows/build-ios-binaries.yml
- .github/workflows/_ios-build-test.yml
# NB: We can use this workflow dispatch to test and build iOS binaries manually
workflow_dispatch:
inputs:
use_lite_interpreter:
description: "Use PyTorch lite interpreter?"
type: string
default: 1
use_coreml:
description: "Use Apple Core ML?"
type: string
default: 1
use_custom_op_list:
description: "Specify the custom ops list to include in the binaries"
type: string
default: ""
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
jobs:
# TODO: Figure out how to migrate this job to M1 runner
ios-build-test:
name: ios-build-test
uses: ./.github/workflows/_ios-build-test.yml
with:
trigger-event: ${{ github.event_name }}
build-environment: ios-build-test
sync-tag: ios-build-test
test-matrix: |
{ include: [
{ config: "default",
shard: 1,
num_shards: 1,
runner: "macos-14-xlarge",
ios_platform: "SIMULATOR",
ios_arch: "arm64",
use_lite_interpreter: ${{ inputs.use_lite_interpreter || 1 }},
use_metal: 0,
use_coreml: ${{ inputs.use_coreml || 1 }},
use_custom_op_list: ${{ inputs.use_custom_op_list || '' }}
},
{ config: "default",
shard: 1,
num_shards: 1,
runner: "macos-14-xlarge",
ios_platform: "OS",
ios_arch: "arm64",
use_lite_interpreter: ${{ inputs.use_lite_interpreter || 1 }},
use_metal: 1,
use_coreml: ${{ inputs.use_coreml || 1 }},
use_custom_op_list: ${{ inputs.use_custom_op_list || '' }}
}
]}
secrets:
AWS_PYTORCH_MOBILE_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_MOBILE_UPLOADER_ACCESS_KEY_ID }}
AWS_PYTORCH_MOBILE_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_MOBILE_UPLOADER_SECRET_ACCESS_KEY }}