Travis-ci问题,无法获取依赖关系Swift Package Manager

问题描述 投票:3回答:1

我无法让我的项目在travis上构建。它写在swift 4中,travis应该支持。似乎存在获取依赖项的问题,但“它可以在我的机器上运行”。 swift buildswift 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.
swift travis-ci
1个回答
3
投票

当它出现在scriptstage(在.yml中)时,travis无法获取依赖关系

解决方案是添加一个install标记,其中提取所有依赖项。

os:
  - osx
language: swift
osx_image: xcode9
install: swift package update
script:
  - swift build
  - swift test
© www.soinside.com 2019 - 2024. All rights reserved.