我无法让我的项目在travis上构建。它写在swift 4中,travis应该支持。似乎存在获取依赖项的问题,但“它可以在我的机器上运行”。 swift build
和swift test
至少所以我很难绕过特拉维斯方面可能出现的问题。
这里有没有人处理类似的问题,知道什么是错的?
Yamla
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.
当它出现在script
stage(在.yml中)时,travis无法获取依赖关系
解决方案是添加一个install
标记,其中提取所有依赖项。
os:
- osx
language: swift
osx_image: xcode9
install: swift package update
script:
- swift build
- swift test