Skip to content

Commit 4168a27

Browse files
authored
Merge pull request #21 from gridbugs/release-docs
Release docs
2 parents e37f32e + 684c71a commit 4168a27

File tree

2 files changed

+71
-26
lines changed

2 files changed

+71
-26
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,27 @@ jobs:
1111
contents: write
1212
strategy:
1313
matrix:
14-
os: [macos-14, macos-13]
15-
ocaml: ["5.2.1", "5.2.0", "5.1.1"]
1614
include:
1715
- os: macos-14
1816
version: "1.19.0"
1917
ocaml: "5.2.1"
2018
target_triple: aarch64-apple-darwin
21-
- os: macos-14
22-
version: "1.19.0"
23-
ocaml: "5.2.0"
24-
target_triple: aarch64-apple-darwin
25-
- os: macos-14
26-
version: "1.18.0"
27-
ocaml: "5.1.1"
28-
target_triple: aarch64-apple-darwin
2919
- os: macos-13
3020
version: "1.19.0"
3121
ocaml: "5.2.1"
3222
target_triple: x86_64-apple-darwin
23+
- os: macos-14
24+
version: "1.19.0"
25+
ocaml: "5.2.0"
26+
target_triple: aarch64-apple-darwin
3327
- os: macos-13
3428
version: "1.19.0"
3529
ocaml: "5.2.0"
3630
target_triple: x86_64-apple-darwin
31+
- os: macos-14
32+
version: "1.18.0"
33+
ocaml: "5.1.1"
34+
target_triple: aarch64-apple-darwin
3735
- os: macos-13
3836
version: "1.18.0"
3937
ocaml: "5.1.1"
@@ -62,8 +60,6 @@ jobs:
6260
contents: write
6361
strategy:
6462
matrix:
65-
os: [ubuntu-latest]
66-
ocaml: ["5.2.1", "5.2.0", "5.1.1"]
6763
include:
6864
- os: ubuntu-latest
6965
version: "1.19.0"
@@ -97,8 +93,6 @@ jobs:
9793
contents: write
9894
strategy:
9995
matrix:
100-
os: [macos-14, macos-13]
101-
version: ["0.26.1", "0.26.2", "0.27.0"]
10296
include:
10397
- os: macos-13
10498
version: "0.27.0"
@@ -147,8 +141,6 @@ jobs:
147141
contents: write
148142
strategy:
149143
matrix:
150-
os: [ubuntu-latest]
151-
version: ["0.26.1", "0.26.2", "0.27.0"]
152144
include:
153145
- os: ubuntu-latest
154146
version: "0.27.0"

README.md

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,69 @@ Add this repo to the current opam switch:
1313
$ opam repository add binary-packages git+https://github.com/ocaml-dune/ocaml-binary-packages
1414
```
1515

16-
## Maintenance notes
16+
## Adding a new version of a package
1717

18-
Binary packages are automatically built and released on github when a tag of
19-
this repo is pushed. The convention for naming tags is `<date>.<count>`, for
20-
example `2024-10-17.3` would be the 4th release on 2024-10-17 (the count starts
21-
at 0).
18+
We'll use the release of `ocaml-lsp-server.1.20.0` as an example here. This is
19+
a list of steps for making the binary versions of this package available.
2220

23-
The version of the compiler used to build a package is included in its version
24-
number. This is mostly so that packages that need binary versions to be
25-
available from specific compiler versions (e.g. ocaml-lsp-server) can co-exist
26-
in the repo, however it's also included for debugging purposes.
21+
1. Add entries to the `strategy.matrix.include` list for the
22+
`ocaml-lsp-server-build-script` _and_ `ocaml-lsp-server-dockerfile` jobs in
23+
the file `.github/workflows/build.yml`. Each package has two different jobs -
24+
one that builds the packages natively for MacOS, and another that builds the
25+
packages in a docker container for Linux (this makes it easier to distribute
26+
statically-linked binaries on Linux). Each entry in the `include` lists
27+
specifies a package version (`version`) and an OCaml version (`ocaml`). For
28+
ocamllsp specifically it's useful to build each version of the package with
29+
as many different versions of the compiler as possible since the ocamllsp
30+
executable can only analyze code that was compiled with the same version of
31+
the compiler as itself. Find out which versions of the compiler are
32+
supported by running `opam show ocamllsp.1.20.0`.
2733

28-
The tag of the release is also included in the version number for traceability.
34+
In this case, the new entries were:
35+
```
36+
jobs:
37+
ocaml-lsp-server-build-script:
38+
...
39+
- os: macos-14
40+
version: "1.20.0"
41+
ocaml: "5.2.1"
42+
target_triple: aarch64-apple-darwin
43+
- os: macos-13
44+
version: "1.20.0"
45+
ocaml: "5.2.1"
46+
target_triple: x86_64-apple-darwin
47+
- os: macos-14
48+
version: "1.20.0"
49+
ocaml: "5.2.0"
50+
target_triple: aarch64-apple-darwin
51+
- os: macos-13
52+
version: "1.20.0"
53+
ocaml: "5.2.0"
54+
target_triple: x86_64-apple-darwin
55+
56+
ocaml-lsp-server-dockerfile:
57+
...
58+
- os: ubuntu-latest
59+
version: "1.20.0"
60+
ocaml: "5.2.1"
61+
target_triple: x86_64-unknown-linux-musl
62+
- os: ubuntu-latest
63+
version: "1.20.0"
64+
ocaml: "5.2.0"
65+
target_triple: x86_64-unknown-linux-musl
66+
```
67+
68+
2. Trigger a build of all binary packages by pushing a new tag to [this repo](https://github.com/ocaml-dune/ocaml-binary-packages).
69+
Name the tag `<date>.<count>` where `date` is today's date in `YYYY-MM-DD`,
70+
and `count` is how many times a tag has been pushed to the repo on the
71+
current day (ie. the number of the release starting from 0). So the second
72+
release on `2024-12-12` would have a tag named `2024-12-12.1`. Push to your
73+
own fork of the repo if you want to do experiments with the build scripts.
74+
75+
3. Create the opam files for the new packages. Opam files are generated with
76+
python scripts inside the `packages/<package>` directory for each package.
77+
The scripts have a `versions` list which contains all the different opam
78+
versions of the package. There are potentially many versions of each package
79+
because a there's a different versions for each OS, arch, and package
80+
version, and in ocamllsp's case for each compiler version. Add the new
81+
versions of the package to the `versions` list (programatically of course).

0 commit comments

Comments
 (0)