All Projects → ocharles → Micro Ci

ocharles / Micro Ci

Licence: other
A tiny CI server built around GitHub and Nix

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Micro Ci

Nix Dotfiles
My personal nix and nixos configuration
Stars: ✭ 48 (-61.9%)
Mutual labels:  nixos, nix
Dotfiles
well-tailored NixOS & nix-darwin dotfiles
Stars: ✭ 63 (-50%)
Mutual labels:  nixos, nix
Idempotent Desktop
🛸 NixOS, Xmonad, Neovim
Stars: ✭ 51 (-59.52%)
Mutual labels:  nixos, nix
Nixery
Container registry which transparently builds images using the Nix package manager
Stars: ✭ 1,023 (+711.9%)
Mutual labels:  nixos, nix
System
My system configuration
Stars: ✭ 94 (-25.4%)
Mutual labels:  nixos, nix
Workshops
Stars: ✭ 47 (-62.7%)
Mutual labels:  nixos, nix
Iohk Ops
NixOps deployment configuration for IOHK devops
Stars: ✭ 113 (-10.32%)
Mutual labels:  nixos, nix
Fenix
Rust nightly toolchains and rust analyzer nightly for nix [[email protected]]
Stars: ✭ 29 (-76.98%)
Mutual labels:  nixos, nix
Vuizvui
Nix(OS) expressions used by the OpenLab and its members
Stars: ✭ 87 (-30.95%)
Mutual labels:  nixos, nix
Nixos Configs
My NixOS configs
Stars: ✭ 86 (-31.75%)
Mutual labels:  nixos, nix
Nix Home
Nix home environment
Stars: ✭ 38 (-69.84%)
Mutual labels:  nixos, nix
Nix Config
My NixOS configuration
Stars: ✭ 112 (-11.11%)
Mutual labels:  nixos, nix
Nix Examples
Showcase of Nix usage for various technologies
Stars: ✭ 31 (-75.4%)
Mutual labels:  nixos, nix
Docker
Dockerfiles to package Nix in a minimal docker container
Stars: ✭ 114 (-9.52%)
Mutual labels:  nixos, nix
Nixos Config
NixOS configurations for server and desktop systems, including user specific config. with Home Manager
Stars: ✭ 30 (-76.19%)
Mutual labels:  nixos, nix
Snabblab Nixos
NixOS configuration for the Snabb Lab
Stars: ✭ 53 (-57.94%)
Mutual labels:  nixos, nix
Configs
My configuration files
Stars: ✭ 26 (-79.37%)
Mutual labels:  nixos, nix
Nixops
NixOps is a tool for deploying to NixOS machines in a network or cloud.
Stars: ✭ 838 (+565.08%)
Mutual labels:  nixos, nix
Home Manager Template
A quick-start template for using home-manager in a more reproducible way.
Stars: ✭ 73 (-42.06%)
Mutual labels:  nixos, nix
Nix Deploy
Deploy software or an entire NixOS system configuration to another NixOS system
Stars: ✭ 111 (-11.9%)
Mutual labels:  nixos, 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].