Skip to content

Commit

Permalink
Update to dune and opam 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
hcarty committed Jun 26, 2019
1 parent f73127f commit f744482
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 39 deletions.
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
.PHONY: all test benchmark doc repl clean gh-pages

all:
jbuilder build --dev
dune build

test:
jbuilder runtest --dev
dune runtest

benchmark:
jbuilder build benchmark/bench.exe
_build/default/benchmark/bench.exe
dune exec benchmark/bench.exe

doc:
jbuilder build @doc
dune build @doc

repl:
jbuilder utop src
dune utop src

clean:
jbuilder clean
dune clean

gh-pages: doc
git clone `git config --get remote.origin.url` .gh-pages --reference .
Expand Down
3 changes: 3 additions & 0 deletions benchmark/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(executable
(name bench)
(libraries ezgzip benchmark))
5 changes: 0 additions & 5 deletions benchmark/jbuild

This file was deleted.

2 changes: 2 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(lang dune 1.0)
(name ezgzip)
25 changes: 14 additions & 11 deletions ezgzip.opam
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
opam-version: "1.2"
opam-version: "2.0"
maintainer: "Hezekiah M. Carty <[email protected]>"
authors: [ "Hezekiah M. Carty <[email protected]>" ]
license: "MIT"
synopsis: "Simple gzip (de)compression library"
homepage: "https://github.com/hcarty/ezgzip"
dev-repo: "https://github.com/hcarty/ezgzip.git"
dev-repo: "git+https://github.com/hcarty/ezgzip.git"
bug-reports: "https://github.com/hcarty/ezgzip/issues"
build: ["jbuilder" "build" "-p" name "-j" jobs]
build-test: ["jbuilder" "runtest" "-p" name]
build-doc: [ "jbuilder" "build" "@doc" "-p" name]
build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
["dune" "build" "-p" name "-j" jobs] {with-doc}
]
depends: [
"alcotest" {test & >= "0.8.1"}
"alcotest" {with-test & >= "0.8.1"}
"astring"
"benchmark" {test & >= "1.4"}
"jbuilder" {build & >= "1.0+beta13"}
"benchmark" {with-test & >= "1.4"}
"dune" {>= "1.0"}
"ocplib-endian"
"odoc" {doc & >= "1.1.1"}
"qcheck" {test & >= "0.7"}
"odoc" {with-doc & >= "1.1.1"}
"qcheck" {with-test & >= "0.7"}
"rresult"
"camlzip"
"ocaml" {>= "4.03.0"}
]
available: [ ocaml-version >= "4.03.0" ]
4 changes: 4 additions & 0 deletions src/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(library
(name ezgzip)
(public_name ezgzip)
(libraries astring ocplib-endian rresult camlzip))
6 changes: 0 additions & 6 deletions src/jbuild

This file was deleted.

10 changes: 10 additions & 0 deletions test/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(executable
(name test)
(libraries alcotest ezgzip qcheck))

(alias
(name runtest)
(deps
(:< test.exe))
(action
(run %{<} --color=always)))
10 changes: 0 additions & 10 deletions test/jbuild

This file was deleted.

0 comments on commit f744482

Please sign in to comment.