iOS : gitlab-runner stuck on CI

标签 ios xcode gitlab gitlab-ci gitlab-ci-runner

我在 Gitlab CI 上工作,但遇到了一些与测试运行相关的问题,因为下面的命令在终端上运行并给出了完美的测试结果,但不知何故它现在在 gitlab CI 上运行。

下面是我的.gitlab-ci.yml

stages:
  - build

build_project:
  stage: build
  script:
    - xcodebuild clean -workspace "First Container.xcworkspace" -scheme "First Container" | xcpretty
    - xcodebuild test -workspace "First Container.xcworkspace" -scheme "First Container" -destination 'platform=iOS Simulator,name=iPhone 8 Plus,OS=11.3' | xcpretty
  tags:
    - ios_11-3
    - xcode_9-3
    - osx_10-13-4

以下命令在我的终端上运行:

   $ xcodebuild test -workspace "First Container.xcworkspace" -scheme "First Container" -destination 'platform=iOS Simulator,name=iPhone 8 Plus,OS=11.3' | xcpretty

但是当我在 CI 上运行时它卡住了,我的 gitlab-runner 没有启动 iPhone 模拟器并运行测试,构建工作正常

enter image description here

最佳答案

当您执行 gitlab-runner register 和稍后 gitlab-runner start 时,不要使用 sudo。这样它将以用户模式(相对于系统模式)运行。如果您已经使用过 sudo,请删除运行程序(从 GitLab Web UI)并重新注册。

关于iOS : gitlab-runner stuck on CI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50793941/

相关文章:

ios - Swift 4 粘贴注释

ios - 为什么不能调用该方法?

XCode Git Head 分离

gitlab - 无法为失败的管道启用 Gitlab 通知电子邮件

java - GitLab AutoDevops 与 Oracle Artifact

git - 有没有办法从 "repository.git"恢复文件

ios - 无法通过 Facebook 浏览器下载文件

ios - 如何在 .travis.yml 中包含多个 OS X 图像

ios - 如何在 Storyboard中制作一个简单的圆形按钮?

ios - MKMapView 未加载