我无法让我的项目在travis上构建。它写在swift 4中,travis应该支持。似乎存在获取依赖关系的问题但是#34;它可以在我的机器上运行。"至少swift build
和swift test
因此我很难解决travis上可能出现的问题'侧。
这里有没有人处理类似的问题,知道什么是错的?
YAML
os:
- osx
language: swift
osx_image: xcode9
script:
- swift build
- swift test
输出
11.10s$ swift build
Cloning https://github.com/valdirunars/BigIntCompress.git
error: terminated(128): git clone --shared/Users/travis/build/valdirunars/BioSwift/.build/repositories/BigIntCompress.git-5255985680209734865/Users/travis/build/valdirunars/BioSwift/.build/checkouts/BigIntCompress.git-5255985680209734865
error: product dependency 'BigInt' not found
error: product dependency 'BigIntCompress' not found
The command "swift build" exited with 1.
0.58s$ swift test
Cloning https://github.com/valdirunars/BigIntCompress.git
error: terminated(128): git clone --shared /Users/travis/build/valdirunars/BioSwift/.build/repositories/BigIntCompress.git-5255985680209734865 /Users/travis/build/valdirunars/BioSwift/.build/checkouts/BigIntCompress.git-5255985680209734865
error: product dependency 'BigInt' not found
error: product dependency 'BigIntCompress' not found
The command "swift test" exited with 1.
Done. Your build exited with 1.
答案 0 :(得分:3)
当script
阶段(在.yml中)
解决方案是添加install
标记,其中提取所有依赖项。
os:
- osx
language: swift
osx_image: xcode9
install: swift package update
script:
- swift build
- swift test