6

私は最近、スタックでtravis CIを使用しようとしていますが、いくつかの問題が発生しています。

私の .travis.yml ファイルは、ここにある私のレポにあります: (スタック Web サイトのガイドを使用しました) 私の構成ファイルのスナップショットは次のとおりです。

sudo: false

# Caching so the next build will be fast too.
cache:
  directories:
  - $HOME/.stack

before_install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

テストを git にプッシュすると、テストの実行に失敗します。travis CI はリポジトリをビルドしようとしますが、ログを調べると、スタック コマンドが見つからないと表示されます。

ただし、構成ファイルで、スタックをインストールするように指定しました。

なぜこれが起こっているのかわかりませんが、助けていただければ幸いです。

4

1 に答える 1

5

私もこれを見ました。

[0K$ travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | \ tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
/home/travis/build.sh: line 45:  tar: command not found
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0     0    0   607    0     0   7527      0 --:--:-- --:--:-- --:--:--  7527

  0 9223k    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
[31;1mThe command "curl -L https://www.stackage.org/stack/linux-x86_64" failed. Retrying, 2 of 3.[0m

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0     0    0   607    0     0   9491      0 --:--:-- --:--:-- --:--:--  9491

[31;1mThe command "curl -L https://www.stackage.org/stack/linux-x86_64" failed. Retrying, 3 of 3.[0m

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0     0    0   607    0     0  11999      0 --:--:-- --:--:-- --:--:-- 11999

[31;1mThe command "curl -L https://www.stackage.org/stack/linux-x86_64" failed 3 times.

curlなんらかのネットワークの問題で失敗した場合です。ビルドを再起動して、次回の幸運を祈ります。

人々が興味を持っている場合に備えて、ここに私の完全だが最小限のものがあり.travis.ymlます:

sudo: false

language: c

cache:
  directories:
    - ~/.stack

addons:
  apt:
    packages:
      - libgmp-dev

before_install:
  # Download and unpack the stack executable
  - mkdir -p ~/.local/bin
  - export PATH=$HOME/.local/bin:$PATH
  - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

install:
  - stack --no-terminal --install-ghc test --only-dependencies

script:
  - stack --no-terminal test --haddock --no-haddock-deps
于 2016-08-14T14:37:40.673 に答える