Skip to content
Dhall helpers for github actions
Dhall Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Revert "Bump for GHC 8.8.2" Jan 18, 2020
.ctags
.gitattributes README.md Dec 11, 2019
.gitignore
LICENSE
Makefile Fix Dec 6, 2019
README.md README.md Dec 11, 2019
TODO.md Issue tracker Jan 14, 2020
ats-ci.dhall
dhall-ci.dhall Revert "Bump for GHC 8.8.2" Jan 18, 2020
egison-ci.dhall
example.dhall Revert "Bump for GHC 8.8.2" Jan 18, 2020
futhark-ci.dhall Revert "Bump for GHC 8.8.2" Jan 18, 2020
haskell-ci.dhall Revert "Bump for GHC 8.8.2" Jan 18, 2020
python-ci.dhall
self-ci.dhall
toml-ci.dhall
yaml-ci.dhall fuck schedule fuck github actions fuck yaml fuck cron Dec 20, 2019

README.md

github-actions-dhall

This is a demonstration using Dhall to generate YAML for github actions.

github-actions-dhall is self-hosting.

Example

Haskell

Store the following in example.dhall:

let haskellCi = https://raw.githubusercontent.com/vmchale/github-actions-dhall/master/haskell-ci.dhall

in    haskellCi.generalCi
        haskellCi.matrixSteps
        ( Some
            { ghc = [ haskellCi.GHC.GHC881, haskellCi.GHC.GHC865 ]
            , cabal = [ haskellCi.Cabal.Cabal30 ]
            }
        )
    : haskellCi.CI.Type

Then, generate YAML with dhall-to-yaml --file example.dhall

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: "actions/checkout@v1"
      - uses: "actions/setup-haskell@v1"
        with:
          cabal-version: "${{ matrix.cabal }}"
          ghc-version: "${{ matrix.ghc }}"
      - name: "Install dependencies"
        run: |
          cabal update
          cabal build --enable-tests --enable-benchmarks --only-dependencies
      - name: Build
        run: "cabal build --enable-tests --enable-benchmarks"
      - name: Tests
        run: "cabal test"
      - name: Documentation
        run: "cabal haddock"
    strategy:
      matrix:
        cabal:
          - "3.0"
        ghc:
          - "8.8.1"
          - "8.6.5"
name: "Haskell CI"
on:
  - push

Have a look at hlint-lib for a more "organic" example.

You can’t perform that action at this time.