[iOS][CI] Update dev certs (#66004)

Summary:
Fixes https://github.com/pytorch/pytorch/issues/65988

Pull Request resolved: https://github.com/pytorch/pytorch/pull/66004

Reviewed By: xta0

Differential Revision: D31340893

Pulled By: malfet

fbshipit-source-id: 3bf0be266e9686a73d62e86c5cf0bebeb0416260
This commit is contained in:
Tao Xu 2021-10-01 09:33:12 -07:00 committed by Facebook GitHub Bot
parent ccf8d48f16
commit 34682377b9
5 changed files with 26 additions and 16 deletions

11
.circleci/config.yml generated
View File

@ -1566,16 +1566,17 @@ jobs:
# install fastlane # install fastlane
sudo gem install bundler && bundle install sudo gem install bundler && bundle install
# install certificates # install certificates
echo ${IOS_CERT_KEY} >> cert.txt echo ${IOS_CERT_KEY_2022} >> cert.txt
base64 --decode cert.txt -o Certificates.p12 base64 --decode cert.txt -o Certificates.p12
rm cert.txt rm cert.txt
bundle exec fastlane install_cert bundle exec fastlane install_root_cert
bundle exec fastlane install_dev_cert
# install the provisioning profile # install the provisioning profile
PROFILE=PyTorch_CI_2021.mobileprovision PROFILE=PyTorch_CI_2022.mobileprovision
PROVISIONING_PROFILES=~/Library/MobileDevice/Provisioning\ Profiles PROVISIONING_PROFILES=~/Library/MobileDevice/Provisioning\ Profiles
mkdir -pv "${PROVISIONING_PROFILES}" mkdir -pv "${PROVISIONING_PROFILES}"
cd "${PROVISIONING_PROFILES}" cd "${PROVISIONING_PROFILES}"
echo ${IOS_SIGN_KEY} >> cert.txt echo ${IOS_SIGN_KEY_2022} >> cert.txt
base64 --decode cert.txt -o ${PROFILE} base64 --decode cert.txt -o ${PROFILE}
rm cert.txt rm cert.txt
- run: - run:
@ -1636,7 +1637,7 @@ jobs:
command: | command: |
set -e set -e
PROJ_ROOT=/Users/distiller/project PROJ_ROOT=/Users/distiller/project
PROFILE=PyTorch_CI_2021 PROFILE=PyTorch_CI_2022
# run the ruby build script # run the ruby build script
if ! [ -x "$(command -v xcodebuild)" ]; then if ! [ -x "$(command -v xcodebuild)" ]; then
echo 'Error: xcodebuild is not installed.' echo 'Error: xcodebuild is not installed.'

View File

@ -8,16 +8,17 @@ cd ${PROJ_ROOT}/ios/TestApp
# install fastlane # install fastlane
sudo gem install bundler && bundle install sudo gem install bundler && bundle install
# install certificates # install certificates
echo "${IOS_CERT_KEY}" >> cert.txt echo "${IOS_CERT_KEY_2022}" >> cert.txt
base64 --decode cert.txt -o Certificates.p12 base64 --decode cert.txt -o Certificates.p12
rm cert.txt rm cert.txt
bundle exec fastlane install_cert bundle exec fastlane install_root_cert
bundle exec fastlane install_dev_cert
# install the provisioning profile # install the provisioning profile
PROFILE=PyTorch_CI_2021.mobileprovision PROFILE=PyTorch_CI_2022.mobileprovision
PROVISIONING_PROFILES=~/Library/MobileDevice/Provisioning\ Profiles PROVISIONING_PROFILES=~/Library/MobileDevice/Provisioning\ Profiles
mkdir -pv "${PROVISIONING_PROFILES}" mkdir -pv "${PROVISIONING_PROFILES}"
cd "${PROVISIONING_PROFILES}" cd "${PROVISIONING_PROFILES}"
echo "${IOS_SIGN_KEY}" >> cert.txt echo "${IOS_SIGN_KEY_2022}" >> cert.txt
base64 --decode cert.txt -o ${PROFILE} base64 --decode cert.txt -o ${PROFILE}
rm cert.txt rm cert.txt
# run the ruby build script # run the ruby build script
@ -25,5 +26,5 @@ if ! [ -x "$(command -v xcodebuild)" ]; then
echo 'Error: xcodebuild is not installed.' echo 'Error: xcodebuild is not installed.'
exit 1 exit 1
fi fi
PROFILE=PyTorch_CI_2021 PROFILE=PyTorch_CI_2022
ruby ${PROJ_ROOT}/scripts/xcode_build.rb -i ${PROJ_ROOT}/build_ios/install -x ${PROJ_ROOT}/ios/TestApp/TestApp.xcodeproj -p ${IOS_PLATFORM} -c ${PROFILE} -t ${IOS_DEV_TEAM_ID} ruby ${PROJ_ROOT}/scripts/xcode_build.rb -i ${PROJ_ROOT}/build_ios/install -x ${PROJ_ROOT}/ios/TestApp/TestApp.xcodeproj -p ${IOS_PLATFORM} -c ${PROFILE} -t ${IOS_DEV_TEAM_ID}

View File

@ -467,16 +467,17 @@
# install fastlane # install fastlane
sudo gem install bundler && bundle install sudo gem install bundler && bundle install
# install certificates # install certificates
echo ${IOS_CERT_KEY} >> cert.txt echo ${IOS_CERT_KEY_2022} >> cert.txt
base64 --decode cert.txt -o Certificates.p12 base64 --decode cert.txt -o Certificates.p12
rm cert.txt rm cert.txt
bundle exec fastlane install_cert bundle exec fastlane install_root_cert
bundle exec fastlane install_dev_cert
# install the provisioning profile # install the provisioning profile
PROFILE=PyTorch_CI_2021.mobileprovision PROFILE=PyTorch_CI_2022.mobileprovision
PROVISIONING_PROFILES=~/Library/MobileDevice/Provisioning\ Profiles PROVISIONING_PROFILES=~/Library/MobileDevice/Provisioning\ Profiles
mkdir -pv "${PROVISIONING_PROFILES}" mkdir -pv "${PROVISIONING_PROFILES}"
cd "${PROVISIONING_PROFILES}" cd "${PROVISIONING_PROFILES}"
echo ${IOS_SIGN_KEY} >> cert.txt echo ${IOS_SIGN_KEY_2022} >> cert.txt
base64 --decode cert.txt -o ${PROFILE} base64 --decode cert.txt -o ${PROFILE}
rm cert.txt rm cert.txt
- run: - run:
@ -537,7 +538,7 @@
command: | command: |
set -e set -e
PROJ_ROOT=/Users/distiller/project PROJ_ROOT=/Users/distiller/project
PROFILE=PyTorch_CI_2021 PROFILE=PyTorch_CI_2022
# run the ruby build script # run the ruby build script
if ! [ -x "$(command -v xcodebuild)" ]; then if ! [ -x "$(command -v xcodebuild)" ]; then
echo 'Error: xcodebuild is not installed.' echo 'Error: xcodebuild is not installed.'

Binary file not shown.

View File

@ -4,7 +4,14 @@ platform :ios do
before_all do before_all do
setup_circle_ci setup_circle_ci
end end
lane :install_cert do lane :install_root_cert do
import_certificate(
certificate_path: "AppleWWDRCAG3.cer",
keychain_path: "/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db",
keychain_password: ""
)
end
lane :install_dev_cert do
puts "Installing Certificates.p12" puts "Installing Certificates.p12"
import_certificate( import_certificate(
keychain_name: ENV["MATCH_KEYCHAIN_NAME"], keychain_name: ENV["MATCH_KEYCHAIN_NAME"],