在travis-ci的测试中,sbt挂起

By simon at 2018-02-28 • 0人收藏 • 67人看过

我有一个开源的Scala项目 (https://github.com/lucidsoftware/xtract)。在travis-ci上构建 一直挂着运行测试,对于scala 2.11和2.12。 有时它会在编译之后以及其他任何测试输出之前挂起 次我在运行测试中间挂起。我尝试了几次迭代 改变travis,试图用和不用sudo: false, 不同版本的sbt,以不同方式分割sbt命令, 使用oraclejdk8和openjdk8,例如TC。 我做错了什么或者这是一个错误? 示例失败:https://travis-ci.org/lucidsoftware/xtract/jobs/280974227 我的.travis.yml:

language: scala

scala:
  - 2.11.11
  - 2.12.3

jdk:
  - openjdk8

dist: trusty
sudo: false

cache:
  directories:
    - $HOME/.ivy2/cache
    - $HOME/.sbt/

after_success:
  - sbt ++$TRAVIS_SCALA_VERSION package
  - |
    if [ -n "$TRAVIS_TAG" ] || ([ "$TRAVIS_PULL_REQUEST" == false ] && [ "$TRAVIS_BRANCH" == master ])
    then
      mkdir ~/.pgp
      echo $PGP_PUBLIC | base64 --decode > ~/.pgp/pubring
      echo $PGP_SECRET | base64 --decode > ~/.pgp/secring
      echo "Publishing snapshot"
      sbt ++$TRAVIS_SCALA_VERSION xtract/publishSigned xtractTesting/publishSigned
    fi
deploy:
  api_key: $GITHUB_AUTH
  file:
    - xtract-core/target/**/*.jar
    - testing/target/**/*.jar
  file_glob: true
  provider: releases
  skip_cleanup: true
  on:
    tags: true

install: sbt ++$TRAVIS_SCALA_VERSION update
before_cache:
  #Avoid unncessary cache updates
  - find $HOME/.ivy2 -name "ivydata-*.properties" -print -delete
  - find $HOME/.sbt  -name "*.lock" -print -delete
编辑 sbt上的-debug选项失败: 它所做的最后一件事是
[debug] Running TaskDef(com.lucidchart.open.xtract.DefaultXmlReadersSpec, specs2 Specification fingerprint, false, [SuiteSelector])
*编辑2 * 一些笔记。该项目有多个子项目。构建暂停w而 运行测试和测试都在他们自己的项目中,因为他们依赖于 核心代码和一个单独的子程序特定于specs2匹配器的特定 到项目。

2 个回复 | 最后更新于 2018-02-28
2018-02-28   #1

这是一个10分钟的编译器超时。也许内存限制太多 交换。 -Xms2048M -Xmx2048M -Xss6M -XX:MaxPermSize=512M

2018-02-28   #2

我遇到了同样的问题。加入你的build.sbt

logLevel := Level.Debug
以便您可以使用日志调试来检查发生了什么。在我的case sbt 正在寻找
sbt-chain: module revision found in cache: com.fasterxml.jackson#jackson-parent;2.8
[debug]         tried /home/travis/.ivy2/local/com.fasterxml.jackson/jackson-bom/2.8.11/jars/jackson-bom.jar
[debug]         tried https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-bom/2.8.11/jackson-bom-2.8.11.jar
[debug] CLIENT ERROR: Not Found url=https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-bom/2.8.11/jackson-bom-2.8.11.jar
[debug]         tried /home/travis/.sbt/preloaded/com.fasterxml.jackson/jackson-bom/2.8.11/jars/jackson-bom.jar
[debug]         tried file:////home/travis/.sbt/preloaded/com/fasterxml/jackson/jackson-bom/2.8.11/jackson-bom-2.8.11.jar
[debug]         tried https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-bom/2.8.11/jackson-bom-2.8.11.jar
[debug] CLIENT ERROR: Not Found url=https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-bom/2.8.11/jackson-bom-2.8.11.jar

登录后方可回帖

Loading...