forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor ios-build-test workflow to support binary release (pytorch#1…
…08322) This refactors the logic from CircleCI iOS [build](https://github.com/pytorch/pytorch/blob/main/.circleci/config.yml#L1323-L1344) and [upload](https://github.com/pytorch/pytorch/blob/main/.circleci/config.yml#L1369-L1377) jobs to GHA. * Nightly artifacts will be available again on `ossci-ios-build` S3 bucket, for example `libtorch_lite_ios_nightly_2.1.0.20230517.zip`. The last one there was s3://ossci-ios-build/libtorch_lite_ios_nightly_2.1.0.20230517.zip from May 17th * [LibTorch-Lite-Nightly](https://github.com/CocoaPods/Specs/blob/master/Specs/c/3/1/LibTorch-Lite-Nightly/1.14.0.20221109/LibTorch-Lite-Nightly.podspec.json) on cocoapods * Release artifacts will be on `ossci-ios` S3 bucket, for example `s3://ossci-ios/libtorch_lite_ios_1.13.0.zip` from Nov 3rd 2022 * [LibTorch-Lite](https://github.com/CocoaPods/Specs/blob/master/Specs/c/c/3/LibTorch-Lite/1.13.0.1/LibTorch-Lite.podspec.json) on cocoapods * [LibTorch](https://github.com/CocoaPods/Specs/blob/master/Specs/1/3/c/LibTorch/1.13.0.1/LibTorch.podspec.json) on cocoapods I will clean up Circle CI code in another PR. ### Testing Generate new release artifacts for testing from main branch. Simulator testing have all passed. * With lite interpreter https://github.com/pytorch/pytorch/actions/runs/6093860118 * https://ossci-ios.s3.amazonaws.com/libtorch_lite_ios_2.1.0.zip * https://ossci-ios.s3.amazonaws.com/LibTorch-Lite-2.1.0.podspec * LibTorch binary can be built without lite interpreter https://github.com/pytorch/pytorch/actions/runs/6103616035 and uses TorchScript, but it has been long dead from my understanding. The binary can still be built and tested though. * https://ossci-ios.s3.amazonaws.com/libtorch_ios_2.1.0.zip * https://ossci-ios.s3.amazonaws.com/LibTorch-2.1.0.podspec ### Next step for release * Once the PR is committed. I plan to use the workflow dispatch to build the binaries manually on `release/2.1` branch. Once they looks good, we can publish them on cocoapods. Pull Request resolved: pytorch#108322 Approved by: https://github.com/atalman
Access has been restricted
You have triggered a rate limit.
Please wait a few minutes before you try again;
in some cases this may take up to an hour.
1 parent
63ae105
commit 4a98c89
Showing
8 changed files
with
431 additions
and
79 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
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: | ||
build-environment: ios-build-test | ||
sync-tag: ios-build-test | ||
test-matrix: | | ||
{ include: [ | ||
{ config: "default", | ||
shard: 1, | ||
num_shards: 1, | ||
runner: "macos-12", | ||
ios_platform: "SIMULATOR", | ||
ios_arch: "x86_64", | ||
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-12", | ||
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 || '' }} | ||
} | ||
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters