2017-10-10 104 views
1

我无法让我的项目在travis上构建。它是用travis应该支持的swift 4写的。好像有一个问题提取依赖关系,但“它在我的机器上工作。” swift buildswift test至少是这样,我很难得到Travis的问题。Travis-ci问题,无法取得依赖关系Swift Package Manager

有没有人在这里处理类似的问题,并知道什么是错的?

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. 

回答

1

原来特拉维斯上提取的依赖性时,它的在script阶段(在.yml)失败

解决的办法是增加一个install标记获取所有依赖关系。

os: 
    - osx 
language: swift 
osx_image: xcode9 
install: swift package update 
script: 
    - swift build 
    - swift test