From 06868004b7cf10241a68be74d35a536572e650bc Mon Sep 17 00:00:00 2001 From: John Detloff Date: Thu, 29 Sep 2022 19:49:11 +0000 Subject: [PATCH] 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 --- .circleci/config.yml | 24 ++---------------- .circleci/scripts/binary_ios_test.sh | 21 ++++----------- .../job-specs/job-specs-custom.yml | 24 ++---------------- ios/TestApp/AppleWWDRCAG3.cer | Bin 1109 -> 0 bytes ios/TestApp/fastlane/Fastfile | 16 ------------ scripts/xcode_build.rb | 18 +------------ 6 files changed, 10 insertions(+), 93 deletions(-) delete mode 100644 ios/TestApp/AppleWWDRCAG3.cer diff --git a/.circleci/config.yml b/.circleci/config.yml index 0fb7288a533..bcdcd8d8322 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/.circleci/scripts/binary_ios_test.sh b/.circleci/scripts/binary_ios_test.sh index 3f052175235..c750dbceca8 100644 --- a/.circleci/scripts/binary_ios_test.sh +++ b/.circleci/scripts/binary_ios_test.sh @@ -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} diff --git a/.circleci/verbatim-sources/job-specs/job-specs-custom.yml b/.circleci/verbatim-sources/job-specs/job-specs-custom.yml index c0e9fea21f2..dc06e6886bb 100644 --- a/.circleci/verbatim-sources/job-specs/job-specs-custom.yml +++ b/.circleci/verbatim-sources/job-specs/job-specs-custom.yml @@ -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 diff --git a/ios/TestApp/AppleWWDRCAG3.cer b/ios/TestApp/AppleWWDRCAG3.cer deleted file mode 100644 index 32f96f81dd6ea4c1c0f8e84698a50df773444b83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1109 zcmXqLVhJ>8Vzyks%*4pVBv7+HlS_5G<-h9LE>#CBj=nSCW#iOp^Jx3d%gD&h%3zRW z$Zf#M#vIDRCd?EXY$$9X2;y)Fb2%0iH*zq6|t6T@0MSI(e)iI>Ymea#G4OQ&JUNQp-|v@(WUn6oOK7z!nxO;Ibd;6K){o*(MkVCXU}R-rZerwT0E%-lH8CYLni>cB0Y1I-s6|D1SjdC!T1#gEpxT}+xg zX~l#D^V*DQXL}#~nf!ynzs^Bts5HBBM?YUi*LCU=8QrPsRL7p`U7PH?oF*7nSE^d5p z(D=qc2pB!G!ijc@}j8RRiS(iVNi1WT9Gi4Pg$!gt>iJm2SVTDg9T1)HbA1Ze zB%z&Z8p%A<-z?u`zz34%2l<2rm_yhM1lYL1`5`%ljfs(k3792Na|kd^Ffy!76@KyU zL1VcKle^Qt_@$N#uaZ{&Jv!lJvGCP-voEaT@9jPPmhpU!hC}r6P!-1?f6gD=s{HcK zn~(XY8f4249ZB?5O<&J{%2IXh<;PWLj5T=q^cIFY6#se_vyLrL^X=nS9{G!0~pME4H^8F=`FYGft6Cx##-<@*tz`>mQ3dQ$4 zudQ=tHhBjnSZuXy%6$`L7`%^vqK~I%N&m9I(=G0PvZd;Idw*Vv`CNY}hnv&vQOc7; z=FB3JS6^jKS+(-^zi+cR(!1Yl?^q@7*}VSz={+ycznWUOVT