MiniCI

Simple minimalist framework to run CI-like checks on local machine, used by Erebos projects.

The code can be downloaded here:

git clone git://erebosprotocol.net/minici

from a mirror on github:

git clone https://github.com/roman-smrz/minici

or from Hackage:

https://hackage.haskell.org/package/minici

Installation

Prebuilt binary with minimal dependencies is available for 64bit Linux:

//repo.erebosprotocol.net/download/minici/v0.1.2/

The archive there contains executable that can be run from any location:

$ tar xzf minici-0.1.2_linux_amd64.tar.gz
$ ./minici-0.1.2_linux_amd64/minici --version
MiniCI version 0.1.2

To build from source, use the cabal tool either within the source directory:

$ tar xzf minici-0.1.2.tar.gz
$ cd minici-0.1.2
$ cabal install

or to automatically download the source from Hackage:

$ cabal install minici

Readme

MiniCI runs jobs defined in the minici.yaml file in the root of the project (on the same level as the .git directory). With that, minici invocation can execute the jobs for local commits that are not yet in upstream (remote) branch or for any manually given commit range.

Job definition

The top-level elements of the YAML file are job <name> defining steps to perform the job and potentially listing artefacts produced or required.

Example:

job build:
  shell:
    - make
  artifact bin:
    path: build/example

job test:
  uses:
    - build.bin
  shell:
    - ./build/example test

Each job is a map with the following attributes:

shell
List of shell commands to perform the job
artifact <name> (optional)
Defines artifact <name> produced by this job. Is itself defined as a dictionary.
artifact <name>.path
Path to the produced artifact file, relative to the root of the project.
uses (optional)
List of artifact required for this job, in the form <job>.<artifact>.

Usage

To run jobs for a git commit range:

minici run <commit>..<commit>

To run jobs for commits that are in local <branch>, but not yet in its upstream:

minici run <branch>

For currently branch, the name can be omitted:

minici run

Roadmap

0.1.3

0.2.0

Changelog

0.1.2 – 2024-07-30

0.1.1 – 2023-04-25

0.1.0 – 2023-02-04