• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

actions/setup-haskell: Set up your GitHub Actions workflow with a specific versi ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

actions/setup-haskell

开源软件地址(OpenSource Url):

https://github.com/actions/setup-haskell

开源编程语言(OpenSource Language):

TypeScript 96.0%

开源软件介绍(OpenSource Introduction):

setup-haskell

Please note: This repository is currently unmaintained by a team of developers at GitHub. The repository is here and you can use it as an example, or in Actions. However please be aware that we are not going to be updating issues or pull requests on this repository.

Maintained forks:

You could also fork this code and maintain it, if you do please let us know.

To reflect this state we’ve marked this repository as Archived.

If you are having an issue or question about GitHub Actions then please contact customer support.

If you have found a security issue please submit it here.


GitHub Actions status

This action sets up a Haskell environment for use in actions by:

  • optionally installing a version of ghc and cabal and adding to PATH.
  • optionally installing a version of Stack and adding to PATH.
  • setting the outputs of ghc-path, cabal-path, stack-path, and cabal-store when necessary.

The GitHub runners come with pre-installed versions of GHC and Cabal. Those will be used whenever possible. For all other versions, this action utilizes ppa:hvr/ghc, ghcup, and chocolatey.

Usage

See action.yml

Minimal:

on: [push]
name: build
jobs:
  runhaskell:
    name: Hello World
    runs-on: ubuntu-latest # or macOS-latest, or windows-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/[email protected]
      - run: runhaskell Hello.hs

Basic:

on: [push]
name: build
jobs:
  runhaskell:
    name: Hello World
    runs-on: ubuntu-latest # or macOS-latest, or windows-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/[email protected]
        with:
          ghc-version: '8.8' # Resolves to the latest point release of GHC 8.8
          cabal-version: '3.0.0.0' # Exact version of Cabal
      - run: runhaskell Hello.hs

Basic with Stack:

on: [push]
name: build
jobs:
  runhaskell:
    name: Hello World
    runs-on: ubuntu-latest # or macOS-latest, or windows-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/[email protected]
        with:
          ghc-version: '8.8.3' # Exact version of ghc to use
          # cabal-version: 'latest'. Omitted, but defalts to 'latest'
          enable-stack: true
          stack-version: 'latest'
      - run: runhaskell Hello.hs

Matrix Testing:

on: [push]
name: build
jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        ghc: ['8.6.5', '8.8.3']
        cabal: ['2.4.1.0', '3.0.0.0']
        os: [ubuntu-latest, macOS-latest, windows-latest]
        exclude:
          # GHC 8.8+ only works with cabal v3+
          - ghc: 8.8.3
            cabal: 2.4.1.0
    name: Haskell GHC ${{ matrix.ghc }} sample
    steps:
      - uses: actions/checkout@v2
      - name: Setup Haskell
        uses: actions/[email protected]
        with:
          ghc-version: ${{ matrix.ghc }}
          cabal-version: ${{ matrix.cabal }}
      - run: runhaskell Hello.hs

Inputs

Name Required Description Type Default
ghc-version GHC version to use, ex. latest string latest
cabal-version Cabal version to use, ex. 3.2 string latest
stack-version Stack version to use, ex. latest. Stack will only be installed if enable-stack is set. string latest
enable-stack If specified, will setup Stack. "boolean" false
stack-no-global If specified, enable-stack must be set. Prevents installing GHC and Cabal globally "boolean" false
stack-setup-ghc If specified, enable-stack must be set. Runs stack setup to install the specified GHC. (Note: setting this does not imply stack-no-global) "boolean" false

Outputs

Name Description Type
ghc-path The path of the ghc executable directory string
cabal-path The path of the cabal executable directory string
stack-path The path of the stack executable directory string
cabal-store The path to the cabal store string
ghc-exe The path of the ghc executable string
cabal-exe The path of the cabal executable string
stack-exe The path of the stack executable string

Version Support

GHC:

  • latest (default, recommended)
  • 8.10.1 8.10
  • 8.8.3 8.8
  • 8.8.2
  • 8.8.1
  • 8.6.5 8.6
  • 8.6.4
  • 8.6.3
  • 8.6.2
  • 8.6.1
  • 8.4.4 8.4
  • 8.4.3
  • 8.4.2
  • 8.4.1
  • 8.2.2 8.2
  • 8.0.2 8.0
  • 7.10.3 7.10

Suggestion: Try to support the three latest major versions of GHC.

Cabal:

  • latest (default, recommended)
  • 3.2.0.0 3.2
  • 3.0.0.0 3.0
  • 2.4.1.0 2.4
  • 2.4.0.0
  • 2.2.0.0 2.2

Recommendation: Use the latest available version if possible.

Stack:

  • latest (recommended) -- follows the latest release automatically.
  • 2.3.1 2.3
  • 2.1.3 2.1
  • 2.1.1
  • 1.9.3.1 1.9
  • 1.9.1.1
  • 1.7.1 1.7
  • 1.6.5 1.6
  • 1.6.3.1
  • 1.6.1.1
  • 1.5.1 1.5
  • 1.5.0
  • 1.4.0 1.4
  • 1.3.2 1.3
  • 1.3.0
  • 1.2.0 1.2

Recommendation: Use the latest available version if possible.

The full list of available versions of GHC, Cabal, and Stack are as follows:

Note: There are technically some descrepencies here. For example, "8.10.1-alpha1" will work for a ghc version for windows but not for Linux and macOS. For your sanity, I suggest sticking with the version lists above which are supported across all three operating systems.

License

The scripts and documentation in this project are released under the MIT License.

Contributions

Contributions are welcome! See the Contributor's Guide.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap