Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate opam file with Dune #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 40 additions & 16 deletions .github/workflows/deploy-doc.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,54 @@
name: Deploy odoc
name: Deploy odoc to GitHub Pages

on:
push:
branches:
- master

permissions: read-all

concurrency:
group: deploy-odoc
cancel-in-progress: true

jobs:
deploy-doc:
deploy-odoc:
name: Deploy odoc to GitHub Pages

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

permissions:
contents: read
id-token: write
pages: write

runs-on: ubuntu-latest
steps:
- name: Install system packages
run: sudo apt-get install -y libgdbm-compat-dev

- name: Checkout code
uses: actions/checkout@v3
steps:
- name: Checkout tree
uses: actions/checkout@v4

- name: Use OCaml 4.12.x
uses: ocaml/setup-ocaml@v2
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 4.12.x
opam-pin: false
opam-depext: false
dune-cache: true
ocaml-compiler: 5

- name: Install dependencies
run: opam install . --deps-only --with-doc

- name: Build documentation
run: opam exec -- dune build @doc

- name: Install libgdbm-dev
run: sudo apt-get install libgdbm-dev
- name: Set-up Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: _build/default/_doc/_html

- name: Deploy odoc to GitHub Pages
uses: ocaml/setup-ocaml/deploy-doc@v2
id: deployment
uses: actions/deploy-pages@v4
87 changes: 86 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,2 +1,87 @@
(lang dune 2.9)
(lang dune 2.8)
(name ocsipersist)

(generate_opam_files true)

(maintainers "Jan Rochel <[email protected]>")
(authors "Ocsigen team <[email protected]>")
(license "LGPL-2.1-only WITH OCaml-LGPL-linking-exception")
(source (github ocsigen/ocsipersist))

(package
(name ocsipersist)
(synopsis "Persistent key-value storage for OCaml using multiple backends")
(description "This is an virtual library defining a unified frontend for a number of key-value storage implementations. Implementations of the following backends currently exist: DBM, PostgreSQL, SQLite.")
(depends
(ocsipersist-lib (= :version))
(lwt (>= 4.2.0)))
(conflicts
(ocsipersist-dbm (<> :version))
(ocsipersist-pgsql (<> :version))
(ocsipersist-sqlite (<> :version))))

(package
(name ocsipersist-dbm)
(synopsis "Persistent key/value storage for OCaml using DBM")
(description "This library provides a DBM backend for the unified key/value storage frontend as defined in the ocsipersist package.")
(depends
(ocsipersist (= :version))
(lwt (>= 4.2.0))
lwt_log
dbm))

(package
(name ocsipersist-dbm-config)
(synopsis "Ocsigen Server configuration file extension for ocsipersist-dbm")
(description "Load this package from Ocsigen Server's configuration file if you want to use the DBM storage backend.")
(depends
(ocsipersist-dbm (= :version))
(ocsigenserver (>= 3.0.0))
xml-light))

(package
(name ocsipersist-lib)
(synopsis "Persistent key/value storage for OCaml - support library")
(description "This library defines signatures and auxiliary tools for defining backends for the Ocsipersist frontent. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library. Implementations of the following backends currently exist: DBM, PostgreSQL, SQLite.")
(depends
(lwt (>= 4.2.0))
(lwt_ppx (>= 2.0.0))))

(package
(name ocsipersist-pgsql)
(synopsis "Persistent key/value storage for OCaml using PostgreSQL")
(description "This library provides a PostgreSQL backend for the unified key/value storage frontend as defined in the ocsipersist package.")
(depends
(ocaml (>= 4.08))
(ocsipersist (= :version))
(lwt (>= 4.2.0))
lwt_log
pgocaml))

(package
(name ocsipersist-pgsql-config)
(synopsis "Ocsigen Server configuration file extension for ocsipersist-pgsql")
(description "Load this package from Ocsigen Server's configuration file if you want to use the PostgreSQL storage backend.")
(depends
(ocsipersist-pgsql (= :version))
(ocsigenserver (>= 3.0.0))
xml-light))

(package
(name ocsipersist-sqlite)
(synopsis "Persistent key/value storage for OCaml using SQLite")
(description "This library provides a SQLite backend for the unified key/value storage frontend as defined in the ocsipersist package.")
(depends
(lwt (>= 4.2.0))
lwt_log
ocsipersist
sqlite3))

(package
(name ocsipersist-sqlite-config)
(synopsis "Ocsigen Server configuration file extension for ocsipersist-sqlite")
(description "Load this package from Ocsigen Server's configuration file if you want to use the SQLite storage backend.")
(depends
(ocsipersist-sqlite (= :version))
(ocsigenserver (>= 3.0.0))
xml-light))
41 changes: 26 additions & 15 deletions ocsipersist-dbm-config.opam
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
name: "ocsipersist-dbm-config"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
synopsis: "Ocsigen Server configuration file extension for ocsipersist-dbm"
description: "Load this package from Ocsigen Server's configuration file if you want to use the DBM storage backend."

synopsis: "Ocsigen Server configuration file extension for ocsipersist-dbm"
description:
"Load this package from Ocsigen Server's configuration file if you want to use the DBM storage backend."
maintainer: ["Jan Rochel <[email protected]>"]
authors: ["Ocsigen team <[email protected]>"]
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "https://github.com/ocsigen/ocsipersist"
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
build: [ "dune" "build" "-p" name "-j" jobs ]

available: [ os != "macos" ]
depends: [
"dune" {>= "2.9"}
"xml-light"
"dune" {>= "2.8"}
"ocsipersist-dbm" {= version}
"ocsigenserver" {>= "3.0.0"}
"ocsipersist-dbm" {>= "2.0.0" & < "2.1.0"}
"xml-light"
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
40 changes: 26 additions & 14 deletions ocsipersist-dbm.opam
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
name: "ocsipersist-dbm"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
synopsis: "Persistent key/value storage for OCaml using DBM"
description: "This library provides a DBM backend for the unified key/value storage frontend as defined in the ocsipersist package."

synopsis: "Persistent key/value storage for OCaml using DBM"
description:
"This library provides a DBM backend for the unified key/value storage frontend as defined in the ocsipersist package."
maintainer: ["Jan Rochel <[email protected]>"]
authors: ["Ocsigen team <[email protected]>"]
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "https://github.com/ocsigen/ocsipersist"
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
build: [ "dune" "build" "-p" name "-j" jobs ]

available: [ os != "macos" ]
depends: [
"dune" {>= "2.9"}
"dune" {>= "2.8"}
"ocsipersist" {= version}
"lwt" {>= "4.2.0"}
"lwt_log"
"ocsipersist" {>= "2.0.0" & < "2.1.0"}
"dbm"
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
available: [os != "macos"]
1 change: 1 addition & 0 deletions ocsipersist-dbm.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
available: [os != "macos"]
36 changes: 24 additions & 12 deletions ocsipersist-lib.opam
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
name: "ocsipersist-lib"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
synopsis: "Persistent key/value storage for OCaml - support library"
description: "This library defines signatures and auxiliary tools for defining backends for the Ocsipersist frontent. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library. Implementations of the following backends currently exist: DBM, PostgreSQL, SQLite."

synopsis: "Persistent key/value storage for OCaml - support library"
description:
"This library defines signatures and auxiliary tools for defining backends for the Ocsipersist frontent. Ocsipersist is used pervasively in Eliom/Ocsigen to handle sessions and references. It can be used as an extension for ocsigenserver or as a library. Implementations of the following backends currently exist: DBM, PostgreSQL, SQLite."
maintainer: ["Jan Rochel <[email protected]>"]
authors: ["Ocsigen team <[email protected]>"]
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "https://github.com/ocsigen/ocsipersist"
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
build: [ "dune" "build" "-p" name "-j" jobs ]

depends: [
"dune" {>= "2.9"}
"dune" {>= "2.8"}
"lwt" {>= "4.2.0"}
"lwt_ppx" {>= "2.0.0"}
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
41 changes: 26 additions & 15 deletions ocsipersist-pgsql-config.opam
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
name: "ocsipersist-pgsql-config"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
synopsis: "Ocsigen Server configuration file extension for ocsipersist-pgsql"
description: "Load this package from Ocsigen Server's configuration file if you want to use the PostgreSQL storage backend."

synopsis: "Ocsigen Server configuration file extension for ocsipersist-pgsql"
description:
"Load this package from Ocsigen Server's configuration file if you want to use the PostgreSQL storage backend."
maintainer: ["Jan Rochel <[email protected]>"]
authors: ["Ocsigen team <[email protected]>"]
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "https://github.com/ocsigen/ocsipersist"
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
build: [ "dune" "build" "-p" name "-j" jobs ]

depends: [
"ocaml" {>= "4.08"}
"dune" {>= "2.9"}
"xml-light"
"dune" {>= "2.8"}
"ocsipersist-pgsql" {= version}
"ocsigenserver" {>= "3.0.0"}
"ocsipersist-pgsql" {>= "2.0.0" & < "2.1.0"}
"xml-light"
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
38 changes: 25 additions & 13 deletions ocsipersist-pgsql.opam
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
name: "ocsipersist-pgsql"
version: "2.0.0"
authors: "The Ocsigen team <[email protected]>"
maintainer: "Jan Rochel <[email protected]>"
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
synopsis: "Persistent key/value storage for OCaml using PostgreSQL"
description: "This library provides a PostgreSQL backend for the unified key/value storage frontend as defined in the ocsipersist package."

synopsis: "Persistent key/value storage for OCaml using PostgreSQL"
description:
"This library provides a PostgreSQL backend for the unified key/value storage frontend as defined in the ocsipersist package."
maintainer: ["Jan Rochel <[email protected]>"]
authors: ["Ocsigen team <[email protected]>"]
license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
homepage: "https://github.com/ocsigen/ocsipersist"
bug-reports: "https://github.com/ocsigen/ocsipersist/issues"
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
build: [ "dune" "build" "-p" name "-j" jobs ]

depends: [
"dune" {>= "2.8"}
"ocaml" {>= "4.08"}
"dune" {>= "2.9"}
"ocsipersist" {= version}
"lwt" {>= "4.2.0"}
"lwt_log"
"ocsipersist" {>= "2.0.0" & < "2.1.0"}
"pgocaml"
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/ocsipersist.git"
Loading