Skip to content

Commit bd19633

Browse files
authored
GitHub Actions CI (#12)
Similar to Gabriella439/nix-diff#37
1 parent 73e2ee5 commit bd19633

File tree

4 files changed

+65
-2
lines changed

4 files changed

+65
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
jobs:
2+
build:
3+
runs-on: ubuntu-18.04
4+
steps:
5+
- uses: "actions/checkout@v1"
6+
- id: setup-haskell-cabal
7+
uses: "haskell/actions/[email protected]"
8+
with:
9+
cabal-version: "${{ matrix.cabal }}"
10+
enable-stack: false
11+
ghc-version: "${{ matrix.ghc }}"
12+
- uses: "actions/cache@v1"
13+
with:
14+
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal"
15+
path: "${{ steps.setup-haskell-cabal.outputs.cabal-store }}"
16+
- name: Install dependencies
17+
run: |
18+
cabal update
19+
cabal build --enable-tests --enable-benchmarks --only-dependencies
20+
- name: build
21+
run: cabal build --enable-tests --enable-benchmarks
22+
- name: test
23+
run: cabal test --enable-tests
24+
- name: haddock
25+
run: cabal haddock
26+
strategy:
27+
matrix:
28+
cabal:
29+
- '3.2'
30+
ghc:
31+
- '8.10.4'
32+
- '8.8.4'
33+
- '8.6.5'
34+
- '9.0.1'
35+
name: Haskell CI
36+
on:
37+
- push
38+
- pull_request

.travis.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

ci.dhall

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
let haskellCi =
2+
https://raw.githubusercontent.com/sorki/github-actions-dhall/pending/haskell-ci.dhall
3+
4+
in haskellCi.generalCi
5+
haskellCi.matrixSteps
6+
( Some
7+
{ ghc =
8+
[ haskellCi.GHC.GHC8104
9+
, haskellCi.GHC.GHC884
10+
, haskellCi.GHC.GHC865
11+
, haskellCi.GHC.GHC901
12+
]
13+
, cabal = [ haskellCi.Cabal.Cabal32 ]
14+
}
15+
)
16+
: haskellCi.CI.Type

ci.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
# Script by @fisx
3+
4+
set -eo pipefail
5+
cd "$( dirname "${BASH_SOURCE[0]}" )"
6+
7+
echo "regenerating .github/workflows/ci.yaml..."
8+
9+
# based on https://github.com/vmchale/github-actions-dhall
10+
which dhall-to-yaml || cabal install dhall-yaml
11+
dhall-to-yaml --file ci.dhall > .github/workflows/ci.yaml

0 commit comments

Comments
 (0)