Skip to content

Commit

Permalink
Move to dune from jbuilder, prep 0.4.0 release (#286)
Browse files Browse the repository at this point in the history
* build: move to `dune` from `jbuilder`

Signed-off-by: Richard Mortier <mort@cantab.net>

* build: migrate `jbuild` to `dune` files

Signed-off-by: Richard Mortier <mort@cantab.net>

* src: assuage many warnings and errors for 4.06.1

Signed-off-by: Richard Mortier <mort@cantab.net>

* build: move to `dune` and `dune-release` from `jbuilder` and `topkg`

Signed-off-by: Richard Mortier <mort@cantab.net>

* changes: ready for release

Signed-off-by: Richard Mortier <mort@cantab.net>

* make: need to install before distrib build

Signed-off-by: Richard Mortier <mort@cantab.net>

* opam: temporarily break doc URL for dune-release

Signed-off-by: Richard Mortier <mort@cantab.net>

* opam: work around opam linting for docs; enable release

Signed-off-by: Richard Mortier <mort@cantab.net>

* make: fix dune-release invocation

* changes: revert to master

Signed-off-by: Richard Mortier <mort@cantab.net>

* Update owl_linalg_c.mli

* Update owl_dense_matrix_c.mli

* Update owl_dense_matrix_c.mli
  • Loading branch information
mor1 authored and ryanrhymes committed Aug 21, 2018
1 parent 189862e commit 4eab7c7
Show file tree
Hide file tree
Showing 112 changed files with 2,107 additions and 2,351 deletions.
6 changes: 3 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
* Improve the APIs of Dataframe module.
* Add more functions in Utils module.


### 0.4.0 (2018-07-25)
### 0.4.0 (2018-08-08)

* Fix some bugs and improve performance.
* Introduce computation graph into the functor stack.
Expand All @@ -16,7 +15,8 @@
* Add transposed convolution functions.
* Add more neurons into the Neural module.
* Add more unit tests for core functions.

* Move from `jbuilder` to `dune`
* Assuage many warnings

### 0.3.8 (2018-05-22)

Expand Down
62 changes: 23 additions & 39 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ all: build

.PHONY: depend depends
depend depends:
jbuilder external-lib-deps --missing @install @runtest
dune external-lib-deps --missing @install @runtest

.PHONY: build
build: depends
jbuilder build @install
dune build @install

.PHONY: test
test: depends
jbuilder runtest -j 1 --no-buffer -p owl
dune runtest -j 1 --no-buffer -p owl

.PHONY: clean
clean:
jbuilder clean
dune clean

.PHONY: install
install: build
jbuilder install
dune install
[ -f "$(OPAM_LIB)/stubslibs/dllowl_stubs.so" ] \
&& mv "$(OPAM_LIB)/stubslibs/dllowl_stubs.so" \
"$(OPAM_STUBS)/dllowl_stubs.so" || true
Expand All @@ -33,49 +33,33 @@ install: build

.PHONY: uninstall
uninstall:
jbuilder uninstall
dune uninstall
$(RM) $(OPAM_STUBS)/dllowl_stubs.so
$(RM) $(OPAM_STUBS)/dllowl_opencl_stubs.so

.PHONY: doc
doc:
jbuilder build @doc
opam install -y odoc
dune build @doc

.PHONY: cleanall
cleanall:
jbuilder uninstall && jbuilder clean
.PHONY: distclean cleanall
distclean cleanall:
dune uninstall && dune clean
$(RM) -r $(find . -name .merlin)
$(RM) $(OPAM_STUBS)/dllowl_stubs.so
$(RM) $(OPAM_STUBS)/dllowl_opencl_stubs.so

define _OWL_RELEASE_WARNING
############################################################################
# NB. To complete the release to OPAM you now need to close all but one #
# of the PRs just opened, rebase the closed PRs onto the one remaining, #
# and then force push the result to your opam-repository fork. This will #
# update the remaining PR so that all 4 interdependent packages are merged #
# into OPAM simultaneously. #
############################################################################
endef
export _OWL_RELEASE_WARNING

PKGS=owl-base,owl,owl-zoo,owl-top
.PHONY: release
release:
opam install --yes tls topkg topkg-care topkg-jbuilder opam-publish
topkg tag
topkg distrib
topkg publish

topkg opam pkg
topkg opam submit

topkg opam pkg --pkg-name owl
topkg opam submit --pkg-name owl

topkg opam pkg --pkg-name owl-zoo
topkg opam submit --pkg-name owl-zoo

topkg opam pkg --pkg-name owl-top
topkg opam submit --pkg-name owl-top

@echo "$$_OWL_RELEASE_WARNING"
make install # as package distrib steps rely on owl-base etc
opam install --yes dune-release
dune-release tag
dune-release distrib
dune-release publish

dune-release opam pkg -p owl-base
dune-release opam pkg -p owl
dune-release opam pkg -p owl-zoo
dune-release opam pkg -p owl-top
dune-release opam submit -p $(PKGS)
34 changes: 34 additions & 0 deletions bin/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
(executables
(public_names owl)
(names owl_bin_zoo)
(modules owl_bin_zoo)
(package owl-zoo)
(libraries owl
owl-zoo
)
(flags (:standard -safe-string))
(link_flags (-linkall))
(modes byte)
)


(executables
(public_names owlviz)
(names owl_bin_viz)
(modules owl_bin_viz)
(package owl-zoo)
(libraries owl)
(flags (:standard -safe-string))
(link_flags (-linkall))
(modes native)
)


(install
(section bin)
(package owl-zoo)
(files (owl_upload_gist.sh as owl_upload_gist.sh)
(owl_download_gist.sh as owl_download_gist.sh)
(owl_list_gist.sh as owl_list_gist.sh)
)
)
40 changes: 0 additions & 40 deletions bin/jbuild

This file was deleted.

2 changes: 1 addition & 1 deletion bin/owl_bin_viz.ml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ let process_dumps fnames =
let dot_name = change_cgd_suffix fname "dot" in
make_pdf_file ~dot_name fname
)
with exn ->
with _exn ->
Owl_log.error "fail to process %s" fname
) fnames

Expand Down
3 changes: 3 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(lang dune 1.0)

(name owl)
File renamed without changes.
6 changes: 3 additions & 3 deletions owl-base.opam
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ bug-reports: "https://github.com/owlbarn/owl/issues"
doc: "https://owlbarn.github.io/"

build: [
[ "jbuilder" "subst" "-n" name ] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
[ "dune" "subst" ] {pinned}
[ "dune" "build" "-p" name "-j" jobs ]
]

depends: [
"alcotest" {test}
"base-bigarray"
"jbuilder" {build}
"dune" {build}
]

available: [ ocaml-version >= "4.06.0" ]
6 changes: 3 additions & 3 deletions owl-top.opam
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ bug-reports: "https://github.com/owlbarn/owl/issues"
doc: "https://owlbarn.github.io/"

build: [
[ "jbuilder" "subst" "-n" name ] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
[ "dune" "subst" ] {pinned}
[ "dune" "build" "-p" name "-j" jobs ]
]

depends: [
"jbuilder" {build}
"dune" {build}
"ocaml-compiler-libs"
"owl"
"owl-zoo"
Expand Down
6 changes: 3 additions & 3 deletions owl-zoo.opam
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ bug-reports: "https://github.com/owlbarn/owl/issues"
doc: "https://owlbarn.github.io/"

build: [
[ "jbuilder" "subst" "-n" name ] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
[ "dune" "subst" ] {pinned}
[ "dune" "build" "-p" name "-j" jobs ]
]

depends: [
"jbuilder" {build}
"dune" {build}
"ocaml-compiler-libs"
"owl"
]
Expand Down
10 changes: 5 additions & 5 deletions owl.opam
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ license: "MIT"
homepage: "https://github.com/owlbarn/owl"
dev-repo: "git+https://github.com/owlbarn/owl.git"
bug-reports: "https://github.com/owlbarn/owl/issues"
doc: "https://owlbarn.github.io/"
doc: "https://owlbarn.github.io/owl/"

build: [
[ "jbuilder" "subst" "-n" name ] {pinned}
[ "jbuilder" "build" "-p" name "-j" jobs ]
[ "dune" "subst" ] {pinned}
[ "dune" "build" "-p" name "-j" jobs ]
]

build-test: [
[ "jbuilder" "runtest" "-p" name "-j" jobs ]
[ "dune" "runtest" "-p" name "-j" jobs ]
]

depends: [
Expand All @@ -23,8 +23,8 @@ depends: [
"conf-openblas" {>= "0.2.0"}
"configurator" {build}
"ctypes"
"dune" {build}
"eigen" {>= "0.0.3"}
"jbuilder" {build}
"owl-base"
"plplot"
"stdio" {build}
Expand Down
3 changes: 0 additions & 3 deletions pkg/.merlin

This file was deleted.

Loading

0 comments on commit 4eab7c7

Please sign in to comment.