mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
Remove codesigning from ios circleci workflows (#85630)
This PR is a follow up to https://github.com/pytorch/pytorch/pull/85597 which removes codesigning from our github action workflows. This is a synonymous change to our circleci workflows. Since we only run TestApp on simulator we don't need to have this codesigning logic. (And more pressingly, these dev cert is expiring at the end of the month and we don't have a replacement) Pull Request resolved: https://github.com/pytorch/pytorch/pull/85630 Approved by: https://github.com/atalman, https://github.com/malfet
This commit is contained in:
parent
a9183c0f9e
commit
06868004b7
24
.circleci/config.yml
generated
24
.circleci/config.yml
generated
|
|
@ -1021,7 +1021,7 @@ jobs:
|
|||
retry checkout
|
||||
- run_brew_for_ios_build
|
||||
- run:
|
||||
name: Run Fastlane
|
||||
name: Setup Fastlane
|
||||
no_output_timeout: "1h"
|
||||
command: |
|
||||
set -e
|
||||
|
|
@ -1029,20 +1029,6 @@ jobs:
|
|||
cd ${PROJ_ROOT}/ios/TestApp
|
||||
# install fastlane
|
||||
sudo gem install bundler && bundle install
|
||||
# install certificates
|
||||
echo ${IOS_CERT_KEY_2022} >> cert.txt
|
||||
base64 --decode cert.txt -o Certificates.p12
|
||||
rm cert.txt
|
||||
bundle exec fastlane install_root_cert
|
||||
bundle exec fastlane install_dev_cert
|
||||
# install the provisioning profile
|
||||
PROFILE=PyTorch_CI_2022.mobileprovision
|
||||
PROVISIONING_PROFILES=~/Library/MobileDevice/Provisioning\ Profiles
|
||||
mkdir -pv "${PROVISIONING_PROFILES}"
|
||||
cd "${PROVISIONING_PROFILES}"
|
||||
echo ${IOS_SIGN_KEY_2022} >> cert.txt
|
||||
base64 --decode cert.txt -o ${PROFILE}
|
||||
rm cert.txt
|
||||
- run:
|
||||
name: Build
|
||||
no_output_timeout: "1h"
|
||||
|
|
@ -1100,18 +1086,12 @@ jobs:
|
|||
command: |
|
||||
set -e
|
||||
PROJ_ROOT=/Users/distiller/project
|
||||
PROFILE=PyTorch_CI_2022
|
||||
# run the ruby build script
|
||||
if ! [ -x "$(command -v xcodebuild)" ]; then
|
||||
echo 'Error: xcodebuild is not installed.'
|
||||
exit 1
|
||||
fi
|
||||
echo ${IOS_DEV_TEAM_ID}
|
||||
if [ ${IOS_PLATFORM} != "SIMULATOR" ]; then
|
||||
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}
|
||||
else
|
||||
ruby ${PROJ_ROOT}/scripts/xcode_build.rb -i ${PROJ_ROOT}/build_ios/install -x ${PROJ_ROOT}/ios/TestApp/TestApp.xcodeproj -p ${IOS_PLATFORM}
|
||||
fi
|
||||
ruby ${PROJ_ROOT}/scripts/xcode_build.rb -i ${PROJ_ROOT}/build_ios/install -x ${PROJ_ROOT}/ios/TestApp/TestApp.xcodeproj -p ${IOS_PLATFORM}
|
||||
if ! [ "$?" -eq "0" ]; then
|
||||
echo 'xcodebuild failed!'
|
||||
exit 1
|
||||
|
|
|
|||
|
|
@ -1,30 +1,19 @@
|
|||
#!/bin/bash
|
||||
set -ex -o pipefail
|
||||
|
||||
if ! [ "$IOS_PLATFORM" == "SIMULATOR" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "DIR: $(pwd)"
|
||||
PROJ_ROOT=/Users/distiller/project
|
||||
cd ${PROJ_ROOT}/ios/TestApp
|
||||
# install fastlane
|
||||
sudo gem install bundler && bundle install
|
||||
# install certificates
|
||||
echo "${IOS_CERT_KEY_2022}" >> cert.txt
|
||||
base64 --decode cert.txt -o Certificates.p12
|
||||
rm cert.txt
|
||||
bundle exec fastlane install_root_cert
|
||||
bundle exec fastlane install_dev_cert
|
||||
# install the provisioning profile
|
||||
PROFILE=PyTorch_CI_2022.mobileprovision
|
||||
PROVISIONING_PROFILES=~/Library/MobileDevice/Provisioning\ Profiles
|
||||
mkdir -pv "${PROVISIONING_PROFILES}"
|
||||
cd "${PROVISIONING_PROFILES}"
|
||||
echo "${IOS_SIGN_KEY_2022}" >> cert.txt
|
||||
base64 --decode cert.txt -o ${PROFILE}
|
||||
rm cert.txt
|
||||
# run the ruby build script
|
||||
if ! [ -x "$(command -v xcodebuild)" ]; then
|
||||
echo 'Error: xcodebuild is not installed.'
|
||||
exit 1
|
||||
fi
|
||||
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}
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@
|
|||
retry checkout
|
||||
- run_brew_for_ios_build
|
||||
- run:
|
||||
name: Run Fastlane
|
||||
name: Setup Fastlane
|
||||
no_output_timeout: "1h"
|
||||
command: |
|
||||
set -e
|
||||
|
|
@ -554,20 +554,6 @@
|
|||
cd ${PROJ_ROOT}/ios/TestApp
|
||||
# install fastlane
|
||||
sudo gem install bundler && bundle install
|
||||
# install certificates
|
||||
echo ${IOS_CERT_KEY_2022} >> cert.txt
|
||||
base64 --decode cert.txt -o Certificates.p12
|
||||
rm cert.txt
|
||||
bundle exec fastlane install_root_cert
|
||||
bundle exec fastlane install_dev_cert
|
||||
# install the provisioning profile
|
||||
PROFILE=PyTorch_CI_2022.mobileprovision
|
||||
PROVISIONING_PROFILES=~/Library/MobileDevice/Provisioning\ Profiles
|
||||
mkdir -pv "${PROVISIONING_PROFILES}"
|
||||
cd "${PROVISIONING_PROFILES}"
|
||||
echo ${IOS_SIGN_KEY_2022} >> cert.txt
|
||||
base64 --decode cert.txt -o ${PROFILE}
|
||||
rm cert.txt
|
||||
- run:
|
||||
name: Build
|
||||
no_output_timeout: "1h"
|
||||
|
|
@ -625,18 +611,12 @@
|
|||
command: |
|
||||
set -e
|
||||
PROJ_ROOT=/Users/distiller/project
|
||||
PROFILE=PyTorch_CI_2022
|
||||
# run the ruby build script
|
||||
if ! [ -x "$(command -v xcodebuild)" ]; then
|
||||
echo 'Error: xcodebuild is not installed.'
|
||||
exit 1
|
||||
fi
|
||||
echo ${IOS_DEV_TEAM_ID}
|
||||
if [ ${IOS_PLATFORM} != "SIMULATOR" ]; then
|
||||
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}
|
||||
else
|
||||
ruby ${PROJ_ROOT}/scripts/xcode_build.rb -i ${PROJ_ROOT}/build_ios/install -x ${PROJ_ROOT}/ios/TestApp/TestApp.xcodeproj -p ${IOS_PLATFORM}
|
||||
fi
|
||||
ruby ${PROJ_ROOT}/scripts/xcode_build.rb -i ${PROJ_ROOT}/build_ios/install -x ${PROJ_ROOT}/ios/TestApp/TestApp.xcodeproj -p ${IOS_PLATFORM}
|
||||
if ! [ "$?" -eq "0" ]; then
|
||||
echo 'xcodebuild failed!'
|
||||
exit 1
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -4,20 +4,4 @@ platform :ios do
|
|||
before_all do
|
||||
setup_ci(provider: "circleci", timeout: 0)
|
||||
end
|
||||
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"
|
||||
import_certificate(
|
||||
keychain_name: ENV["MATCH_KEYCHAIN_NAME"],
|
||||
keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"],
|
||||
certificate_path: 'Certificates.p12',
|
||||
certificate_password: ENV["IOS_CERT_SECRET"] || "default"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -13,12 +13,6 @@ option_parser = OptionParser.new do |opts|
|
|||
opts.on('-p', '--platform ', 'platform for the current build, OS or SIMULATOR') { |value|
|
||||
options[:platform] = value
|
||||
}
|
||||
opts.on('-c', '--provisioning_profile ', 'provisioning profile for code signing') { |value|
|
||||
options[:profile] = value
|
||||
}
|
||||
opts.on('-t', '--team_id ', 'development team ID') { |value|
|
||||
options[:team_id] = value
|
||||
}
|
||||
end.parse!
|
||||
puts options.inspect
|
||||
|
||||
|
|
@ -42,11 +36,6 @@ target.build_configurations.each do |config|
|
|||
config.build_settings['LIBRARY_SEARCH_PATHS'] = libraries_search_path
|
||||
config.build_settings['OTHER_LDFLAGS'] = other_linker_flags
|
||||
config.build_settings['ENABLE_BITCODE'] = 'No'
|
||||
dev_team_id = options[:team_id]
|
||||
if not dev_team_id and options[:platform] == 'OS'
|
||||
raise "Please sepecify a valid development team id for code signing"
|
||||
end
|
||||
config.build_settings['DEVELOPMENT_TEAM'] = dev_team_id
|
||||
end
|
||||
|
||||
# link static libraries
|
||||
|
|
@ -84,10 +73,5 @@ else
|
|||
raise "unsupported platform #{options[:platform]}"
|
||||
end
|
||||
|
||||
profile = options[:profile]
|
||||
if not profile and options[:platform] == 'OS'
|
||||
raise "no provisioning profile found!"
|
||||
end
|
||||
|
||||
# run xcodebuild
|
||||
exec "xcodebuild clean build -project #{xcodeproj_path} -target #{target.name} -sdk #{sdk} -configuration Release PROVISIONING_PROFILE_SPECIFIER=#{profile} -arch #{arch}"
|
||||
exec "xcodebuild clean build -project #{xcodeproj_path} -target #{target.name} -sdk #{sdk} -configuration Release -arch #{arch}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user