我有一个工作区,其中包含必须构建为静态库的几个项目,并且我有针对它们的测试方案。我想配置 TeamCity 来构建和测试这些库中的每一个,但它不适用于以下错误:
...
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace code/MyApplication/My Framework.xcworkspace -scheme One Of Tests TEST_AFTER_BUILD=YES clean build -configuration Debug -sdk iphonesimulator6.1
in directory: /Users/Me/TeamCity/buildAgent/work/d0f083d874fc6891
Build settings from command line:
SDKROOT = iphonesimulator6.1
TEST_AFTER_BUILD = YES
xcodebuild: error: Failed to build workspace My Framework with scheme One Of Tests.
Reason: Scheme "One Of Tests" is not configured for running.
Process exited with code 70
...
但与此同时,当我克隆我的存储库时,将 cd 放入其中并在终端中从上面运行命令:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace code/MyApplication/My Framework.xcworkspace -scheme One Of Tests TEST_AFTER_BUILD=YES clean build -configuration Debug -sdk iphonesimulator6.1
它成功了://更新:它仅适用于构建方案,不适用于测试
** BUILD SUCCEEDED **
所以这绝对是 TeamCity 中的错误设置。我可以尝试什么使它起作用?
用于构建库的 PS 方案工作正常。只有测试会抛出错误。