• Stars
    star
    132
  • Rank 274,205 (Top 6 %)
  • Language
    Haskell
  • License
    BSD 3-Clause "New...
  • Created about 7 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A tiny CI server built around GitHub and Nix

micro-ci

Hello, thanks for checking out micro-ci.

micro-ci is a tiny continuous integration server, that tries to do very little. By this, we mean off loading as much logic as possible to other systems. In particular, this continuous integration server only supports GitHub and Nix.

This project is in its infancy, but if you'd like to play along at home, here's how.

Example

Getting Started

  1. Get an OAuth token.

    Navigate to https://github.com/settings/tokens and generate a new OAuth token. It only needs the repo:status permission.

  2. Add the webhook.

    Go to https://github.com/$YOUR_NAME/$YOUR_REPO/settings/hooks, changing $YOUR_NAME and $YOUR_REPO appropriately. Add a webhook with a URL of the format: http://$PUBLIC_HOST:8080/github/web-hook, where $PUBLIC_HOST is the publically accessible host of the server that will be running your builds.

    Set:

    • Content type: application/json
    • Secret: (anything you want)
    • Which events: at least "pull request", but you can also just use "everything".
  3. Configure the server.

    In the directory you plan to run micro-ci from, you'll need a config.dhall file. A template is:

    {
      repoRoot = "repositories",
      secret = ...,
      oauth = ...
    }

    Fill in oauth and secret according to values previously retrieved/entered.

  4. Run the server.

    On the machine that will run the builds, run

    nix-build ci.nix -A micro-ci
    ./result/bin/micro-ci
    
  5. Add a ci.nix file to your project.

    Finally, write a ci.nix file in your project. This Nix expression should evaluate to an attribute-set of derivations.

    For example, a Haskell project could use:

    with (import <nixpkgs> {});
    {
      cabal-build = haskellPackages.callPackage ./default.nix {};
    }

    But you can be as clever as you want. All that micro-ci cares about is if the derivation can be evaluated.

  6. Optional: Add status checks

    Open a pull request to check that everything works. If it looks good, you can enforce micro-ci to pass all jobs. Head to https://github.com/$YOUR_NAME/$YOUR_REPO/settings/branches and set up a protected branch and add the ci.nix statuses.

More Repositories

1

papers

A Git annex repository of papers
696
star
2

weeder

A re-implementation of weeder using HIE files
Haskell
163
star
3

zero-to-quake-3

Implementing Quake 3 in Haskell & Vulkan
Haskell
162
star
4

engine.io

A Haskell server implementation of the Engine.IO and Socket.IO (1.0) protocols
Haskell
149
star
5

netwire-classics

Classic games recreated in netwire
Haskell
95
star
6

what-it-do

Automatically trace all (showable) binds in do expressions
Haskell
84
star
7

hadoom

A little Doom-like 2.5 game engine
Haskell
82
star
8

Francium

A small web programming library on top of reactive-banana and virtual-dom
HTML
79
star
9

blog

The contents of ocharles.org.uk/blog
Haskell
66
star
10

effect-zoo

Comparing Haskell effect systems for ergonomics and speed
Haskell
65
star
11

assert-explainer

Py.test style assertions in Haskell
Haskell
65
star
12

dhallql

Can we write a querying language with Dhall? Let's find out!
64
star
13

logging-effect

A very general logging effect for Haskell
Haskell
58
star
14

plhaskell

Write PostgreSQL functions in Haskell
Haskell
54
star
15

pandoc-live

Automatically refresh Pandoc documents in your web browser
JavaScript
51
star
16

hlint-source-plugin

Run HLint as part of normal compilation
Haskell
47
star
17

BookBrainz

MusicBrainz for books? Why not!
Haskell
35
star
18

hs-quake-3

Quake 3 map viewer written in Haskell
Haskell
34
star
19

digestive-functors-aeson

Run digestive-functors against a JSON document
Haskell
34
star
20

virtual-dom

Haskell (GHCJS) bindings to the virtual-dom project
Haskell
26
star
21

dhall-build

Drive the Nix build system using the Dhall configuration language
Haskell
26
star
22

nix-build-cache

Extends stdenv.mkDerivation based builds with a distributed build cache on Amazon S3.
Nix
24
star
23

transformers-eff

An approach to managing composable effects, ala mtl/transformers/extensible-effects/Eff
Haskell
24
star
24

hsfmt

A Haskell code formatter using prettyprinter and the GHC API
Haskell
24
star
25

libsystemd-journal

Haskell bindings to libsystemd-journal
Haskell
21
star
26

rio-effect

An effect system similar to mtl with explicit dictionary passing.
Haskell
17
star
27

haskell-opentracing

Haskell libraries for OpenTracing.io
Haskell
16
star
28

snaplet-oauth2

OAuth 2 authentication for Snap applications
Haskell
14
star
29

opaleye-tf

An alternative interface to Opaleye, built around type families
Haskell
13
star
30

Elasticsearch

Haskell API to elasticsearch's REST interface
Haskell
12
star
31

tasty-rerun

Rerun previous test suite runs to run only failing tests
Haskell
12
star
32

language-postgresql

A PostgreSQL AST/parser for Haskell
Haskell
11
star
33

prometheus-effect

Yet another Haskell Prometheus client
Haskell
11
star
34

ocharles.org.uk--Getting-Started-with-Netwire-and-SDL

Code to accompany my blog post "Getting Started with Netwire and SDL"
Haskell
10
star
35

listenbrainz-client

A client to the ListenBrainz project
Haskell
10
star
36

exhaustive

Compile time checks that a computation considers producing data through all possible constructors
Haskell
10
star
37

dhall-agda

Dhall, formalised in Agda
10
star
38

json-assertions

Test that your (Aeson) JSON encoding matches your expectation
Haskell
8
star
39

snap-cors

Add CORS headers to Snap applications
Nix
8
star
40

excursions

A single collection of various experiments before they turn into more polished work.
Haskell
8
star
41

hydra-continuous-deployment-tutorial

Nix
8
star
42

tasty-ant-xml

A tasty ingredient to output test results in XML, using the Ant schema. This XML can be consumed by the Jenkins continuous integration framework.
Haskell
8
star
43

diff-drv

Calculate the differences between two Nix .drvs
Nix
7
star
44

Orgdex

An org-mode file indexer/search tool
Haskell
7
star
45

dotcharles

My dotfiles
Nix
6
star
46

pipes-postgresql-simple

A pipes wrapper for postgresql-simple
Haskell
6
star
47

snaplet-socketio

Communicate with Socket.IO clients as part of a Snap website
Haskell
6
star
48

ekg-carbon

An EKG backend to send statistics to Carbon (part of Graphite monitoring tools)
Haskell
6
star
49

diff3

3-way diff algorithm for Haskell
Haskell
6
star
50

ekg-bosun

Send Haskell EKG metrics to Bosun servers
Haskell
6
star
51

network-carbon

A Haskell implementation of the Carbon protocol (part of the Graphite monitoring tools)
Haskell
5
star
52

reactive-banana-gtk

High-level bindings using reactive-banana to GTK3
Haskell
5
star
53

fused-effects-backpack

5
star
54

SSAO-example

A demonstration of screen-space ambient occlusion using OpenGL & Haskell
Haskell
5
star
55

mb-collector

A command line tool to add media files to your MusicBrainz collection
Perl
4
star
56

pipes-tar

A Haskell library for streaming the contents of tar files
Haskell
4
star
57

Xapian-Haskell

A FFI to Xapian for Haskell
Haskell
4
star
58

haskell-anki-decks

A collection of decks for learning various bits about Haskell and Haskell libraries.
4
star
59

OCharles-Blog-Factories

Accompanying code to my "Implement factories" article
Perl
3
star
60

Catalyst-View-HTML-Zoom

Catalyst templating on rollerskates. Woosh!
Perl
3
star
61

Web-MusicBrainz

Haskell implementation of the MusicBrainz API
Haskell
3
star
62

CatalystX-Profile

Profile Catalyst applications with Devel::NYTProf
Perl
3
star
63

netwire-platformer

A platformer game in Netwire 5
Haskell
3
star
64

varnish-cache-invalidation

This project contains my prototype for doing Varnish cache invalidation with RabbitMQ and pg_amqp
Haskell
3
star
65

dhall.js

Work with Dhall values in JavaScript
JavaScript
3
star
66

dot-files

Lua
3
star
67

musicbrainz-rewrite

A rewrite of MusicBrainz using DBIx::Class, Moose, Catalyst, and various other technologies
Perl
3
star
68

algebraic-mtl

A variation of the mtl, where type classes only contain algebraic effects/effect constructors
Haskell
3
star
69

Raskell

Community ratings for Hackage, the Haskell package database
Haskell
3
star
70

ant-plus

Haskell ANT+ bindings
Haskell
3
star
71

snap-error-collector

Collect errors from Snap applications and periodically flush them (via email, etc)
Haskell
3
star
72

Perl-Conditions

Implementing Lisp style conditions and restarts in Perl 5
Perl
2
star
73

Perlanet-DBIx-Class

A Perlanet that "renders" to a DBIx::Class database, and stores all feeds and posts there
Perl
2
star
74

reactive-html

A small API for building reactive web applications with reactive-banana & GHCJS
Haskell
2
star
75

test-xml-element

Test the properties of a single XML element
Perl
2
star
76

VotingGame

A little voting game for triaging our MusicBrainz bug tracker
Haskell
2
star
77

prometheus-push

Push prometheus-client metrics to a push gateway
Haskell
2
star
78

nes-playground

Playground for my work on the New Edit System. Mostly pure PG SQL.
2
star
79

MooseX-Types-DBIx-Class

MooseX::Types for DBIx::Class
Perl
2
star
80

Test-Magpie

Spying test doubles, just like Mockito
Perl
2
star
81

Slothmarks

A REST server like delicious (motivation for Sloth)
Perl
2
star
82

can-google-count

Scripts for my paper "Can Google Count?"
Perl
2
star
83

hedgehog-scenarios

A collection of test scenarios we'd like to be able to express in Hedgehog
Haskell
2
star
84

monadplus

Generalized filter combinators
Haskell
2
star
85

storable-sop

A generic implementation of Storable using the machinery provided by generics-sop
Haskell
1
star
86

Sloth

A Plack backed REST framework
Perl
1
star
87

monad-yield

Just playing with some ideas of type class based streaming. Don't expect much atm!
Haskell
1
star
88

Test-Mock

A mocking framework for Perl inspired by JMock
Perl
1
star
89

hydra-ocharles-projects

My Hydra configuration to build all of my own libraries
Nix
1
star
90

dhall-doc

Document your Dhall types
Haskell
1
star
91

snaplet-ekg

A Snap Snaplet to add Ekg monitor to your web application
Haskell
1
star
92

Fey-SQL-Pg

PostgreSQL specific extensions for Fey
Perl
1
star
93

Data-TreeValidator

Easy validation and transformation of tree structures
Perl
1
star
94

MBChatLogger-index

A seach indexer for MBChatLogger's RDF output
Haskell
1
star
95

pipes-crypto

Cryptographic pipes
Haskell
1
star
96

SQL-Abstract-Plugin-InsertReturning

Adds 'RETURNING' support to SQL::Abstract->insert
Perl
1
star
97

SPOJ-solutions

My solutions to SPOJ challenges (spoilers!)
Common Lisp
1
star
98

musicbrainz-server-database-only

MusicBrainz database import/replication code
Perl
1
star
99

agda-nixfmt

A pretty printer for Nix expressions, written in Agda because I'm a masochist
Agda
1
star
100

reactive-banana-fireworks-benchmark

A benchmark of particle physics (firework sparks) for reactive-banana
Haskell
1
star