Skip to content

Commit d227f56

Browse files
authored
Merge pull request #70 from mbarbin/installation-guide
Add doc installation guide
2 parents 1c7c9de + 7d33f09 commit d227f56

File tree

7 files changed

+96
-8
lines changed

7 files changed

+96
-8
lines changed

doc/docs/guides/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Installation
2+
3+
You can choose to install crs from either:
4+
5+
- The public opam-repository (most stable releases)
6+
- A custom opam-repository (more frequent releases)
7+
- From source (most recent version, PRs, etc.)
8+
9+
Releases are currently versioned using the scheme `0.0.YYYMMDD` while we are in the early stages of development.
10+
11+
## Release Process
12+
13+
The exact rate at which we publish new versions during the early stages of the project is not really established yet. We'd like to find a balance that feels right between making sure new features and bug fixes are continuously delivered to people experimenting with the project on one hand, but not publishing too many intermediate versions to the public opam repository on the other hand.
14+
15+
The way in which we propose to do this with this project is that we publish somewhat frequent releases of the project to a custom opam-repository. In particular note that not every release that is published that way will make it into a public release - we will skip some, and only publish a public release every so often.
16+
17+
Finally, if you'd like to try or test the latest current version, or the tip of an ongoing PR, you may build from source.
18+
19+
## From the Public Opam Repository
20+
21+
Public releases of crs are published to the main [opam-repository](https://github.com/ocaml/opam-repository). Install it with the [opam](https://opam.ocaml.org) package manager by running:
22+
23+
<!-- $MDX skip -->
24+
```sh
25+
opam install crs
26+
```
27+
28+
Note that crs needs to be installed in a switch with `ocaml >= 5.2`.
29+
30+
## From the Custom Opam Repository
31+
32+
Intermediate releases for this project are published to a [custom opam-repo](https://github.com/mbarbin/opam-repository.git). To add it to your current opam switch, run:
33+
34+
<!-- $MDX skip -->
35+
```sh
36+
opam repo add mbarbin https://github.com/mbarbin/opam-repository.git
37+
```
38+
39+
Then you can install crs using a normal opam workflow:
40+
41+
<!-- $MDX skip -->
42+
```sh
43+
opam install crs
44+
```
45+
46+
## Build from Sources
47+
48+
Assuming you have a working environment with `OCaml >= 5.2`, `opam` and `dune` you should be able to install the project's dependencies in your current opam switch by running:
49+
50+
<!-- $MDX skip -->
51+
```sh
52+
opam install . --deps-only
53+
```
54+
55+
And then build with:
56+
57+
<!-- $MDX skip -->
58+
```sh
59+
dune build
60+
```
61+
62+
### Unreleased Packages
63+
64+
From time to time, the project may have temporary dependencies on packages that are being worked on and perhaps not yet published to the main opam repository. When this is the case, these packages are released to the custom opam repository mentioned earlier, and you'll need to add it to the opam switch that you use to build the project.
65+
66+
For example, if you use a local opam switch, this would look like this:
67+
68+
<!-- $MDX skip -->
69+
```sh
70+
git clone https://github.com/mbarbin/crs.git
71+
cd crs
72+
opam switch create . 5.3.0 --no-install
73+
eval $(opam env)
74+
opam repo add mbarbin https://github.com/mbarbin/opam-repository.git
75+
opam install . --deps-only
76+
```
77+
78+
Once this is setup, you can build with dune:
79+
80+
<!-- $MDX skip -->
81+
```sh
82+
dune build
83+
```

doc/docs/guides/installation/dune

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(mdx
2+
(package crs-dev)
3+
(deps
4+
(package crs)
5+
(package crs-tests)
6+
(glob_files *.md))
7+
(preludes prelude.txt))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#require "crs" ;;

doc/docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const config: Config = {
121121
},
122122
{
123123
label: 'Guides',
124-
to: '/docs/guides/',
124+
to: '/docs/guides/installation/',
125125
},
126126
{
127127
label: 'Reference',

doc/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/sidebars.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const sidebars: SidebarsConfig = {
2727
type: 'category',
2828
label: 'Guides',
2929
items: [
30-
{ type: 'doc', id: 'guides/README', label: 'Introduction' },
30+
{ type: 'doc', id: 'guides/installation/README', label: 'Installation' },
3131
],
3232
},
3333
],

0 commit comments

Comments
 (0)