Skip to content

Commit

Permalink
Merge pull request #24 from peterbecich/basic-github-actions
Browse files Browse the repository at this point in the history
basic GitHub Actions
  • Loading branch information
tchoutri authored Feb 3, 2022
2 parents c6a7847 + 49bf780 commit 927c049
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# modified from https://github.com/jgm/pandoc/blob/master/.github/workflows/ci.yml
name: CI

on:
push:
branches:
- '**'
paths-ignore: []
pull_request:
paths-ignore: []

jobs:
linux:

runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
versions:
- ghc: '8.6.5'
cabal: '3.6'
- ghc: '8.8.4'
cabal: '3.6'
- ghc: '8.10.7'
cabal: '3.6'
- ghc: '9.0.2'
cabal: '3.6'

steps:
- uses: actions/checkout@v2

# need to install older cabal/ghc versions from ppa repository

- name: Install recent cabal/ghc
uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.versions.ghc }}
cabal-version: ${{ matrix.versions.cabal }}

# declare/restore cached things
# caching doesn't work for scheduled runs yet
# https://github.com/actions/cache/issues/63

- name: Cache cabal global package db
id: cabal-global
uses: actions/cache@v2
with:
path: |
~/.cabal
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}

- name: Cache cabal work
id: cabal-local
uses: actions/cache@v2
with:
path: |
dist-newstyle
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local

- name: Install dependencies
run: |
cabal update
cabal build all --dependencies-only --enable-tests --disable-optimization
- name: Build
run: |
cabal build all --enable-tests --disable-optimization 2>&1 | tee build.log
- name: Test
run: |
cabal test all --disable-optimization
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# servant-lucid - Servant support for lucid

![servant](https://raw.githubusercontent.com/haskell-servant/servant/master/servant.png)
[![Build status](https://github.com/haskell-servant/servant-lucid/actions/workflows/ci.yml/badge.svg)](https://github.com/haskell-servant/servant-lucid/actions/workflows/ci.yml)

0 comments on commit 927c049

Please # to comment.