Skip to content

Commit

Permalink
GitHub Actions CI (haskell-nix#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorki authored Mar 20, 2021
1 parent 73e2ee5 commit bd19633
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: "actions/checkout@v1"
- id: setup-haskell-cabal
uses: "haskell/actions/[email protected]"
with:
cabal-version: "${{ matrix.cabal }}"
enable-stack: false
ghc-version: "${{ matrix.ghc }}"
- uses: "actions/cache@v1"
with:
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal"
path: "${{ steps.setup-haskell-cabal.outputs.cabal-store }}"
- name: Install dependencies
run: |
cabal update
cabal build --enable-tests --enable-benchmarks --only-dependencies
- name: build
run: cabal build --enable-tests --enable-benchmarks
- name: test
run: cabal test --enable-tests
- name: haddock
run: cabal haddock
strategy:
matrix:
cabal:
- '3.2'
ghc:
- '8.10.4'
- '8.8.4'
- '8.6.5'
- '9.0.1'
name: Haskell CI
on:
- push
- pull_request
2 changes: 0 additions & 2 deletions .travis.yml

This file was deleted.

16 changes: 16 additions & 0 deletions ci.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
let haskellCi =
https://raw.githubusercontent.com/sorki/github-actions-dhall/pending/haskell-ci.dhall

in haskellCi.generalCi
haskellCi.matrixSteps
( Some
{ ghc =
[ haskellCi.GHC.GHC8104
, haskellCi.GHC.GHC884
, haskellCi.GHC.GHC865
, haskellCi.GHC.GHC901
]
, cabal = [ haskellCi.Cabal.Cabal32 ]
}
)
: haskellCi.CI.Type
11 changes: 11 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Script by @fisx

set -eo pipefail
cd "$( dirname "${BASH_SOURCE[0]}" )"

echo "regenerating .github/workflows/ci.yaml..."

# based on https://github.com/vmchale/github-actions-dhall
which dhall-to-yaml || cabal install dhall-yaml
dhall-to-yaml --file ci.dhall > .github/workflows/ci.yaml

0 comments on commit bd19633

Please sign in to comment.