首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何配置`travis.yaml` `jobs.include`和`before_install`以安装适用于macOS的堆栈?

如何配置`travis.yaml` `jobs.include`和`before_install`以安装适用于macOS的堆栈?
EN

Stack Overflow用户
提问于 2018-10-14 02:56:42
回答 1查看 84关注 0票数 1

尽管我已经实现了步骤described in the instructions

代码语言:javascript
复制
before_install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

my travis.yaml这些fail中,当我尝试在macOS上使用

代码语言:javascript
复制
jobs:
  include:
  ...
  - name: "LTS 9.6 (Haskell for macOS)"
    os: osx
    osx_image: xcode10
    env: ...
    ...

使用

代码语言:javascript
复制
tar: Option --wildcards is not supported
Usage:
  List:    tar -tf <archive-filename>
  Extract: tar -xf <archive-filename>
  Create:  tar -cf <archive-filename> [filenames...]
  Help:    tar --help
curl: (23) Failed writing body (0 != 597)
The command "curl -L https://www.stackage.org/stack/linux-x86_64" failed. Retrying, 2 of 3.
curl: (23) Failed writing body (0 != 597)
The command "curl -L https://www.stackage.org/stack/linux-x86_64" failed. Retrying, 3 of 3.
curl: (23) Failed writing body (0 != 597)
The command "curl -L https://www.stackage.org/stack/linux-x86_64" failed 3 times.

如何修改travis.yaml jobs.includebefore_install以安装适用于macOS的堆栈?

EN

回答 1

Stack Overflow用户

发布于 2018-10-14 03:44:09

有几件事。

  1. 我不会在这里使用travis_retry,因为curl有更好的--retry flag
  2. macOS使用的是BSD tar,而不是tar。您可以选择:
    1. 找到一个在两个
    2. Install gnu-tar上都有效的通用标志,然后使用它。(如果您希望以correctly.)

的身份执行此公式,则它需要的不仅仅是brew install gnu-tar,因此请确保将其设置为tar

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52796255

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档