Skip to content

Commit

Permalink
fix/chore: 🪲 / ⚙️ benchmark is now optional and only is performed on …
Browse files Browse the repository at this point in the history
…OCaml +4.07 during CI build

Signed-off-by: Marco Aurélio da Silva <marcoonroad@gmail.com>
  • Loading branch information
marcoonroad committed Sep 8, 2019
1 parent 5ed9edc commit 19dd264
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -18,7 +18,7 @@ env:
- OCAML_VERSION=4.04 POST_INSTALL_HOOK="make report"
- OCAML_VERSION=4.05 POST_INSTALL_HOOK="make report"
- OCAML_VERSION=4.06 POST_INSTALL_HOOK="make lint-format; make report"
- OCAML_VERSION=4.07 POST_INSTALL_HOOK="make lint-format; make report"
- OCAML_VERSION=4.07 POST_INSTALL_HOOK="make lint-format; make bench; make report"
os:
- linux
# - osx
33 changes: 18 additions & 15 deletions Makefile
Expand Up @@ -73,11 +73,14 @@ docs: build
@ mv ./_build/default/_doc/_html/* ./docs/apiref/

pin:
@ opam pin add nocoiner . -n --yes
@ opam pin add nocoiner . -n --yes --working-dir

unpin:
@ opam pin remove nocoiner --yes

deps:
@ opam install . --deps-only --yes
@ opam install alcotest core --yes # force such test dependences
@ opam install . --deps-only --yes --working-dir
@ opam install alcotest --yes # force such test dependences

dev-deps:
@ opam install \
Expand All @@ -91,18 +94,18 @@ dev-deps:
utop \
core_bench \
--yes
@ opam update --yes
@ opam upgrade \
odoc \
ocveralls \
alcotest \
ocp-indent \
ocamlformat \
merlin \
bisect_ppx \
utop \
core_bench \
--yes
# @ opam update --yes
# @ opam upgrade \
# odoc \
# ocveralls \
# alcotest \
# ocp-indent \
# ocamlformat \
# merlin \
# bisect_ppx \
# utop \
# core_bench \
# --yes

lint-format:
@ opam install ocamlformat --yes
Expand Down
11 changes: 5 additions & 6 deletions nocoiner.opam
Expand Up @@ -20,18 +20,17 @@ build: [
["dune" "build" "-p" name "-j" jobs]
]

run-test: ["dune" "runtest" "-p" name "-j" jobs]
run-test: ["dune" "build" "@test/spec/runtest" "-p" name "-j" jobs]

depends: [
"ocaml" {>= "4.03.0"}
"dune" {>= "1.9"}
"cmdliner" {>= "1.0.0"}
"alcotest" {with-test}
"core_bench" {with-test}
"nocrypto" {>= "0.5.4-1"}
"alcotest" {>= "0.8.0" & with-test}
"nocrypto" {>= "0.5.0"}
"scrypt-kdf" {>= "1.0.0"}
"digestif" {>= "0.7.0"}
"core" {>= "v0.9.1"}
"core" {>= "v0.9.0"}
"eqaf" {>= "0.5"}
"bisect_ppx" {>= "1.4.1"}
"bisect_ppx" {>= "1.4.0"}
]
2 changes: 1 addition & 1 deletion test/bench/dune
Expand Up @@ -5,4 +5,4 @@
(run %{test} time cycles alloc gc percentage speedup samples -all-values
-ascii -fork -no-compactions -overheads -quota 15 -stabilize-gc -width
300 -v -display tall))
(libraries core_bench nocoiner))
(libraries nocoiner.bench))
1 change: 1 addition & 0 deletions test/bench/timing.ml
@@ -1,3 +1,4 @@
open Nocoiner_bench
open Core_bench.Bench
module Command = Core.Command

Expand Down
9 changes: 9 additions & 0 deletions test/support/dune
@@ -0,0 +1,9 @@
;; wrapper library just to enable optional core_bench
;; library installation on ocaml versions >= 4.04.1

(library
(name nocoiner_bench)
(optional)
(public_name nocoiner.bench)
(modules nocoiner_bench)
(libraries core_bench nocoiner))
7 changes: 7 additions & 0 deletions test/support/nocoiner_bench.ml
@@ -0,0 +1,7 @@
module Nocoiner = struct
include Nocoiner
end

module Core_bench = struct
include Core_bench
end

0 comments on commit 19dd264

Please sign in to comment.