Skip to content

Commit

Permalink
Github Actions (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbecich authored Jul 6, 2021
1 parent 5c31009 commit 3ddd972
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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.4'
- ghc: '8.8.4'
cabal: '3.4'
- ghc: '8.10.5'
cabal: '3.4'
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 --dependencies-only --enable-tests --disable-optimization
- name: Build
run: |
cabal build --enable-tests --disable-optimization 2>&1 | tee build.log
- name: Install RabbitMQ server
run: |
sudo apt-get install rabbitmq-server
PATH=/usr/lib/rabbitmq/bin/:$PATH ./bin/ci/before_build.sh
- name: Test
run: |
cabal test --disable-optimization
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# RabbitMQ Client for Haskell

[![Hackage](https://img.shields.io/hackage/v/amqp.svg)](https://hackage.haskell.org/package/amqp)
[![Build status](https://github.com/hreinhardt/amqp/actions/workflows/ci.yml/badge.svg)](https://github.com/hreinhardt/amqp/actions/workflows/ci.yml)

This is a library for accessing RabbitMQ from Haskell.

Expand Down

0 comments on commit 3ddd972

Please sign in to comment.