-
Notifications
You must be signed in to change notification settings - Fork 607
Add a script to install Apple certificate for CI iOS jobs #4703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/4703
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 789ae9d with merge base f492d96 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@@ -59,6 +59,13 @@ | |||
remoteGlobalIDString = 03C818302AC79FCD0084CC29; | |||
remoteInfo = ImageClassification; | |||
}; | |||
84EF1FE92C7850B6005922B4 /* PBXContainerItemProxy */ = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the changes here in xcodeproj are to make the ExecuTorchDemo
app host the test suite MobileNetClassifierTest
so that the suite can be run on actual AWS devices (coming up next in a separate PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by making the ExecuTorchDemo app host the test suite MobileNetClassifierTest? Are they built and uploaded as separate artifacts in test_ios_ci.sh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, unlike running the test suite in a simulator, running it on actual iOS devices requires a hosting app. So I have 2 choices:
- Either create a new empty app to host
MobileNetClassifierTest
- or just reuse the ExecuTorchDemo app (as show in my xcode screenshot). This kind of makes more sense to me because we will also be able to test if the app can be run at all on iOS. So, two birds one stone.
@shoumikhin what would be your preferred choice here from the expert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, the change I'm highlighting in the screenshot is responsible for those magic numbers that you notice (auto-generated by xcode)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this PR to demonstrate using the certs in the workflow I think option 2 makes sense. I'm chatting with @shoumikhin regarding a generic app for benchmarking we will create a new app from scratch with no UI but just tests. @huydhn @shoumikhin once we have that app, can we reuse the provisioning profile and secret directly, or need to re-gen for the new app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I see, if we can keep the bundle id org.pytorch.executorch.demo.test
, then we can reuse the provisioning profile. Otherwise, we need a new one and store it under a different secret.
@huydhn has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@huydhn has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@huydhn has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
# This script follows the instructions from GitHub to install an Apple certificate | ||
# https://docs.github.com/en/actions/use-cases-and-examples/deploying/installing-an-apple-certificate-on-macos-runners-for-xcode-development | ||
|
||
CERTIFICATE_PATH="${RUNNER_TEMP}"/build_certificate.p12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is the $RUNNER_TEMP set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's one of the default env variables set by GitHub, usually it's a sub-directory inside runner installation dir https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
containerPortal = 032C01672AC228E5002955E1 /* Project object */; | ||
proxyType = 1; | ||
remoteGlobalIDString = 032C016E2AC228E6002955E1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these magic numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@huydhn Thanks for adding the certificates for iOS to the CI.
The demo setup we are using in this PR is for MV2. My only question (for @shoumikhin) is how can we swap with different models? I think we would want to have a generic loader app same as what @kirklandsign is doing for Android.
This PR adds a script
.ci/scripts/setup-ios.sh
to to install Apple certificate for CI iOS jobs, which is then used to build and sign ExecuTorchDemo app and its test suite.The following secrets have been setup in the repo:
BUILD_CERTIFICATE_BASE64
, the p12 build certificate.EXECUTORCH_DEMO_BUILD_PROVISION_PROFILE_BASE64
, ExecuTorchDemo provisioning profileLLAMA_BUILD_PROVISION_PROFILE_BASE64
, iLLaMA provisioning profileKEYCHAIN_PASSWORD
, a random password for the temporary keychain on the runnerAfter this change, I can follow up with CI jobs to: