btr-hook and some generalizations
[m6w6/btr] / README.md
1 # btr
2
3 A poor man's CI tool.
4
5 ## BUILD TEST REPORT
6
7 A simple tool to automate reporting of build and test results.
8
9 ### Currently supported rulesets:
10
11 * ***source:*** git, svn, cvs
12 * ***build:*** php, pecl, gnu, composer
13 * ***report:*** mail, notify-send, twilio, irc
14
15 #### Usage
16 ```
17 Usage: btr [-hyvqcC] [<options>]
18
19 -h, --help Display this help
20 -y, --yes Always assume yes
21 -v, --verbose Be more verbose
22 -q, --quiet Be more quiet
23 -c, --clean Clean build
24 -C, --vcsclean Clean repo/branch
25
26 Options:
27 -f, --config=<file> Read configuration from a file
28 -s, --source=<rules> Use the specified source ruleset
29 -b, --build=<rules> Use the specified build ruleset
30 -r, --report=<rules> Use the specifued report ruleset
31 -T, --test=<args> Provide test runner arguments
32 -B, --branch=<branch> Checkout this branch
33 -D, --directory=<directory> Use this directory as work root
34 -S, --suffix=<suffix> Append suffix to the build name
35
36 Rules format:
37 type=argument e.g: git=git@github.com:m6w6/btr.git
38 irc=irc://btr@chat.freenode.org/#btr
39 mail="-c copy@to rcpt@to"
40 notify-send="-u low"
41
42 Note though, that some rules do not use any argument.
43
44 Rulesets:
45 source: cvs git svn
46 build: composer gnu pecl php
47 report: irc mail notify-send twilio
48
49 Examples:
50
51 Clone PHP's git, use PHP-5.5 branch, build with php ruleset and
52 run the test suite with valgrind (-m) on a debug build and report
53 the results with a simple OSD notification:
54 $ btr -s git=git@php.net:php/php-src.git -B PHP-5.5 \
55 -b "php=--enable-debug" -T-m -r notify-send
56 See also php.example.conf
57
58 Clone CURL's git (use master), build with GNU autotools
59 ruleset which runs 'make check' and mail the report to the
60 current user. Verbosely show all actions taken:
61 $ btr -v -s git=https://github.com/bagder/curl.git -b gnu -r mail
62 See also curl.example.conf
63
64 ```