[iOS][CI] Remove org-member from iOS Simulator Builds (#34410)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34410

### Summary

Currently, the iOS jobs are not being run on PRs anymore. This is because all iOS jobs have specified the `org-member` as a context which used to include all pytorch members. But seems like recently this rule has changed. It turns out that only users from the admin group or builder group can have access right to the context values. https://circleci.com/gh/organizations/pytorch/settings#contexts/2b885fc9-ef3a-4b86-8f5a-2e6e22bd0cfe

This PR will remove `org-member` from the iOS simulator build which doesn't require code signing. For the arm64 builds, they'll only be run on master, not on PRs anymore.

### Test plan

- The iOS simulator job should be able to appear in the PR workflow

Test Plan: Imported from OSS

Differential Revision: D20347270

Pulled By: xta0

fbshipit-source-id: 23f37d40160c237dc280e0e82f879c1d601f72ac
This commit is contained in:
Tao Xu 2020-03-09 13:19:56 -07:00 committed by Facebook Github Bot
parent 776d2a1e8f
commit 8294db8f15
4 changed files with 12 additions and 6 deletions

View File

@ -1490,7 +1490,11 @@ jobs:
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
if ! [ "$?" -eq "0" ]; then
echo 'xcodebuild failed!'
exit 1
@ -2256,7 +2260,6 @@ workflows:
# Pytorch iOS PR builds
- pytorch_ios_build:
name: pytorch_ios_11_2_1_x86_64_build
context: org-member
build_environment: "pytorch-ios-11.2.1-x86_64_build"
ios_arch: "x86_64"
ios_platform: "SIMULATOR"

View File

@ -411,7 +411,11 @@
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
if ! [ "$?" -eq "0" ]; then
echo 'xcodebuild failed!'
exit 1

View File

@ -1,7 +1,6 @@
# Pytorch iOS PR builds
- pytorch_ios_build:
name: pytorch_ios_11_2_1_x86_64_build
context: org-member
build_environment: "pytorch-ios-11.2.1-x86_64_build"
ios_arch: "x86_64"
ios_platform: "SIMULATOR"

View File

@ -43,7 +43,7 @@ target.build_configurations.each do |config|
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
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
@ -71,7 +71,7 @@ else
end
profile = options[:profile]
if not profile
if not profile and options[:platform] == 'OS'
raise "no provisioning profile found!"
end