Skip to content

Commit f59d901

Browse files
committed
update README.md, opam package and Docker CI
1 parent 198e877 commit f59d901

File tree

4 files changed

+50
-47
lines changed

4 files changed

+50
-47
lines changed

.github/workflows/ci.yml renamed to .github/workflows/docker-action.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ jobs:
1515
strategy:
1616
matrix:
1717
image:
18-
- 'coqorg/coq:8.17'
18+
- 'coqorg/coq:dev-ocaml-4.14-flambda'
19+
- 'coqorg/coq:8.17-ocaml-4.09-flambda'
1920
fail-fast: false
2021
steps:
2122
- uses: actions/checkout@v3
2223
- uses: coq-community/docker-coq-action@v1
2324
with:
2425
opam_file: 'coq-my-plugin.opam'
2526
custom_image: ${{ matrix.image }}
26-
before_install: |
27-
startGroup "Print opam config and unpin dune"
28-
opam config list; opam repo list; opam list; opam pin remove dune -y
29-
endGroup
27+
28+
# See also:
29+
# https://github.com/coq-community/docker-coq-action#readme
30+
# https://github.com/erikmd/docker-coq-github-action-demo

CHANGES

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,60 @@
1-
# Template for Coq Plugins using Dune
1+
# Coq Plugin Template using Dune
22

3-
This repository contains a template for writing a plugin for the
3+
[![Docker CI][docker-action-shield]][docker-action-link]
4+
5+
[docker-action-shield]: https://github.com/coq-community/coq-plugin-template/workflows/Docker%20CI/badge.svg?branch=v8.17
6+
[docker-action-link]: https://github.com/coq-community/coq-plugin-template/actions?query=workflow:"Docker%20CI"
7+
8+
Template repository writing a plugin in [OCaml](https://ocaml.org) for the
49
[Coq](https://coq.inria.fr) proof assistant using the [Dune](https://dune.build)
510
build system. It showcases a few advanced features such as linking to C code or
611
to external libraries.
712

8-
The current version is tested (and requires):
9-
10-
- Dune 2.9
11-
- Coq 8.16
12-
13-
Minimal historical requirements are Coq 8.9 and Dune 1.10, but they
14-
are not supported anymore. See template history / branches for
15-
changes at your own risk.
13+
## Meta
1614

17-
See the [Dune documentation](https://dune.readthedocs.io/en/latest/) for more help.
15+
- License: [Unlicense](LICENSE) (change to your license of choice)
16+
- Compatible Coq versions: 8.17 or later
17+
- Additional dependencies:
18+
- [Dune](https://dune.build) 3.8.1 or later
19+
- Coq namespace: `MyPlugin`
1820

19-
## See also
20-
21-
The [official tutorial](https://github.com/coq/coq/tree/master/doc/plugin_tutorial)
22-
for writing Coq plugins in the Coq repository, which already includes `dune` files
23-
for OCaml parts.
24-
25-
## How to build
21+
## Building instructions
2622

23+
To install dependencies via [opam](https://opam.ocaml.org/doc/Install.html):
2724
```shell
28-
$ dune build
25+
$ opam install dune.3.8.2 coq.8.17.0
2926
```
30-
and the rest of the regular Dune commands. To test your library, you can use
3127

28+
To build the plugin when all dependencies are installed:
3229
```shell
33-
$ dune exec -- coqtop -R _build/default/theories MyPlugin
30+
$ dune build
3431
```
3532

36-
or starting with Dune 3.2
33+
The plugin can be tested manually:
3734
```shell
3835
$ dune coq top theories/Test.v
39-
```
4036

41-
## Releasing OPAM packages
37+
Welcome to Coq 8.17.0
4238

43-
You can use
44-
[`dune-release`](https://github.com/ocamllabs/dune-release) to
45-
automatically release OPAM packages.
39+
Coq < Require Import MyPlugin.
40+
[Loading ML file my_plugin.cmxs (using legacy method) ... done]
4641

47-
For that, you need to update the included `.opam` file, and configure
48-
your Github tokens as described in the documentation of `dune-release`.
42+
Coq < CallC.
43+
Toplevel input, characters 0-6:
44+
> CallC.
45+
> ^^^^^^
46+
Warning: 546
47+
```
4948

50-
## Linking with external libraries
49+
See also the [Dune documentation](https://dune.readthedocs.io/en/latest/) for more help,
50+
and the [official tutorial](https://github.com/coq/coq/tree/master/doc/plugin_tutorial)
51+
for writing Coq plugins in the Coq repository which already includes `dune` files
52+
for the OCaml parts.
5153

52-
Starting with Coq 8.16, Coq will load dependencies of your
53-
plugin. This requires that your plugin is named as a findlib package.
54+
## Releasing opam packages
5455

55-
See [Coq documentation](https://coq.github.io/doc/master/refman/proof-engine/vernacular-commands.html#coq:cmd.Declare-ML-Module) for more information.
56+
You can use [`dune-release`](https://github.com/tarides/dune-release) to
57+
automatically release opam packages.
58+
59+
For that, you need to update the included `.opam` file, and configure
60+
your Github tokens as described in the documentation of `dune-release`.

coq-my-plugin.opam

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
opam-version: "2.0"
22
maintainer: "[email protected]"
3+
version: "dev"
34

4-
homepage: "https://github.com/your-github/my-plugin"
5-
dev-repo: "git+https://github.com/your-github/my-plugin.git"
6-
bug-reports: "https://github.com/your-github/my-plugin/issues"
7-
doc: "https://your-github.github.io/my-plugin"
5+
homepage: "https://github.com/coq-community/my-plugin"
6+
dev-repo: "git+https://github.com/coq-community/my-plugin.git"
7+
bug-reports: "https://github.com/coq-community/my-plugin/issues"
8+
doc: "https://coq-community.github.io/my-plugin"
89
license: "SPDX-identifier-for-your-license"
910

1011
synopsis: "One line description of your plugin"
@@ -16,7 +17,7 @@ build: ["dune" "build" "-p" name "-j" jobs]
1617
depends: [
1718
"ocaml" {>= "4.09.0"}
1819
"dune" {>= "3.8.2"}
19-
"coq" {>= "8.17"}
20+
"coq" {>= "8.17.1"}
2021
]
2122

2223
tags: [

0 commit comments

Comments
 (0)