如何为 ARM64 架构的 Haskell 配置我的 Travis CI 构建?

时间:2021-03-17 16:49:40

标签: haskell arm travis-ci haskell-stack

目前我有下面的 .travis.yml 并且想从默认的 arch 移动到 arm64 甚至 arm64-graviton2(以及各种 dist)但是无法弄清楚如何为 ARM64 安装正确的 Haskell Stack 发行版(或者它是否存在)。

如何将针对 Haskell 的 Travis CI 构建配置为 ARM64 架构?

os: linux


# Choose a lightweight base image; we provide our own build tools.
language: generic

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

# GHC depends on GMP. You can add other dependencies here as well.
addons:
  apt:
    packages:
    - libgmp-dev

# ...

before_install:
# Download and unpack the stack executable -- https://docs.haskellstack.org/en/stable/travis_ci/?highlight=travis
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
# Aquire the stack aprioriate to the os used -- https://stackoverflow.com/a/52796679/656912
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then  brew update ; brew install stack ; fi
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then  travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' ;  fi
- stack --version

0 个答案:

没有答案