summaryrefslogtreecommitdiff
path: root/ofborg/README.md
blob: 812fe78f2f9008244502576caa5f2e515448c511 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# tickborg

Distributed CI bot for the Project Tick monorepo, adapted from [ofborg](https://github.com/NixOS/ofborg).

## Overview

tickborg is a RabbitMQ-based distributed CI system that:
- Automatically detects changed projects in PRs
- Builds affected sub-projects using their native build systems (CMake, Meson, Autotools, Cargo, Gradle, Make)
- Posts build results as GitHub check runs
- Supports multi-platform builds (Linux, macOS, Windows, FreeBSD)

## Automatic Building

PRs automatically trigger builds for affected projects based on:
- **File path detection**: Changed files are mapped to sub-projects
- **Conventional Commits**: Commit scopes like `feat(meshmc):` trigger builds for the named project

Example commit titles and the builds they will start:

| Message | Automatic Build |
|---|---|
| `feat(meshmc): add chunk loading` | `meshmc` |
| `cmark: fix buffer overflow` | `cmark` |
| `fix(neozip): handle empty archives` | `neozip` |
| `chore(ci): update workflow` | _(CI changes only)_ |

If the title of a PR begins with `WIP:` or contains `[WIP]` anywhere, its
projects are not built automatically.

## Commands

The comment parser is line-based. Commentary can be interwoven with bot
instructions.

1. To trigger the bot, the line _must_ start with `@tickbot` (case insensitive).
2. To use multiple commands, separate them on different lines.

### build

```
@tickbot build meshmc neozip cmark
```

This will build the specified projects using their configured build systems.

### test

```
@tickbot test meshmc
```

This will run the test suite for the specified projects.

### eval

```
@tickbot eval
```

Triggers a full evaluation of the PR — detects changed projects and labels the PR.

## Supported Platforms

| Platform | Runner |
|---|---|
| `x86_64-linux` | `ubuntu-latest` |
| `aarch64-linux` | `ubuntu-24.04-arm` |
| `x86_64-darwin` | `macos-15` |
| `aarch64-darwin` | `macos-15` |
| `x86_64-windows` | `windows-2025` |
| `aarch64-windows` | `windows-2025` |
| `x86_64-freebsd` | `ubuntu-latest` (VM) |

## Sub-Projects

| Project | Build System | Path |
|---|---|---|
| mnv | Autotools | `mnv/` |
| cgit | Make | `cgit/` |
| cmark | CMake | `cmark/` |
| neozip | CMake | `neozip/` |
| genqrcode | CMake | `genqrcode/` |
| json4cpp | CMake | `json4cpp/` |
| tomlplusplus | Meson | `tomlplusplus/` |
| libnbtplusplus | CMake | `libnbtplusplus/` |
| meshmc | CMake | `meshmc/` |
| forgewrapper | Gradle | `forgewrapper/` |
| corebinutils | Make | `corebinutils/` |

## Hacking

```shell
$ git clone https://github.com/project-tick/Project-Tick/
$ cd Project-Tick/ofborg
$ cd tickborg
$ cargo build
$ cargo check
$ cargo test
```

Make sure to format with `cargo fmt` and lint with `cargo clippy`.

## Configuration

See [`example.config.json`](./example.config.json) for a minimal configuration
and [`config.public.json`](./config.public.json) for the production config.