Skip to content

Commit affa569

Browse files
committed
Add new documentation for homebrew tap
1 parent 94b81b2 commit affa569

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

doc/ADR/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ of the system and the surrounding infrastructure.
99
## Release & Packaging
1010

1111
* [Release Process](release_process.md)
12+
* [Homebrew tap](homebrew_tap.md)

doc/ADR/homebrew_tap.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Homebrew tap instructions
2+
3+
## User instructions
4+
5+
1. Add the CBMC tap using the following command:
6+
7+
```sh
8+
$ brew tap diffblue/cbmc
9+
```
10+
11+
2. Install any of the available CBMC versions in the following manner:
12+
13+
```sh
14+
$ brew install diffblue/cbmc/[email protected]
15+
```
16+
17+
## Developer instructions
18+
19+
1. First of all, you need to create a new tap locally:
20+
21+
```sh
22+
$ brew tap-new diffblue/homebrew-cbmc
23+
```
24+
25+
This step is needed if you are the one creating the tap.
26+
If you want to install the tap that's already available
27+
at the [Diffblue repository](https://github.com/diffblue/homebrew-cbmc),
28+
`$ brew tap diffblue/cbmc` should suffice.
29+
30+
31+
2. For any edit, the second step is to `cd` into the repository.
32+
To do that easily, it's best to ask Homebrew to give you the
33+
location of the repository:
34+
35+
```sh
36+
$ cd $(brew --repo diffblue/cbmc)
37+
```
38+
39+
3. You can extract versions of CBMC previously available in `homebrew/core`
40+
to the tap with the following instruction:
41+
42+
```sh
43+
$ brew extract cbmc diffblue/cbmc --version=<ver>
44+
```
45+
46+
For example `$ brew extract cbmc diffblue/cbmc --version=5.54.0` will
47+
have as an end result a new file under `Formula/[email protected]` that will
48+
contain the formula that we had submitted for that version of CBMC in the
49+
`homebrew/core` repository.
50+
51+
52+
## Notes
53+
54+
* Bootstrapping the repository with `brew tap --new` created two github actions
55+
`.github/workflows/publish.yml` and `.github/workflows/tests.yml` which we are
56+
not using at the moment but could serve to make future automation easier.
57+
58+
## Known Limitations
59+
60+
* The binaries are installed without any version tag attached, so they cannot
61+
live side by side.
62+
* The install formula doesn't override binaries, so if you already have a CBMC
63+
version installed, you need to `remove` it before installing another one:
64+
65+
```sh
66+
$ brew install diffblue/cbmc/[email protected]
67+
[...]
68+
$ brew remove [email protected]
69+
[...]
70+
$ brew install diffblue/cbmc/[email protected]
71+
```

0 commit comments

Comments
 (0)