Skip to content

Commit

Permalink
update drone.yml to install a system dune
Browse files Browse the repository at this point in the history
Make SYS_DUNE_BASE_DIR configurable
  • Loading branch information
ctk21 committed Jul 24, 2019
1 parent 8870cb4 commit be4ae2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ steps:
commands:
- sudo apt-get update && sudo apt-get -y install libgmp-dev m4 libdw-dev
- sudo chown -R opam .
- eval $(opam env)
- opam install dune
- export ITER=1
- export OPAM_DISABLE_SANDBOXING=true
- make ocaml-versions/4.07.1.bench
Expand All @@ -19,6 +21,8 @@ steps:
commands:
- sudo apt-get update && sudo apt-get -y install libgmp-dev m4 libdw-dev
- sudo chown -R opam .
- eval $(opam env)
- opam install dune
- export ITER=1
- export OPAM_DISABLE_SANDBOXING=true
- export BENCH_TARGET=parallelbench
Expand All @@ -28,6 +32,8 @@ steps:
commands:
- sudo apt-get update && sudo apt-get -y install libgmp-dev m4 libdw-dev
- sudo chown -R opam .
- eval $(opam env)
- opam install dune
- export ITER=1
- export OPAM_DISABLE_SANDBOXING=true
- export BENCH_TARGET=multibench
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ export OPAMROOT=$(CURDIR)/_opam
# HACK: we are using the system installed dune to avoid breakages with
# multicore and 4.09/trunk
# This is a workaround for r14/4.09/trunk until better solutions arrive
SYS_DUNE_BASE_DIR = $(subst /bin/dune,,$(shell which dune))
SYS_DUNE_BASE_DIR ?= $(subst /bin/dune,,$(shell which dune))

setup_sys_dune:
ifeq (,$(SYS_DUNE_BASE_DIR))
$(error Could not find a system installation of dune (try `opam install dune`?))
else
@echo "Linking to system dune files found at: "$(SYS_DUNE_BASE_DIR)
rm -rf $(CURDIR)/_opam/sys_dune
mkdir -p $(CURDIR)/_opam/sys_dune/bin
mkdir -p $(CURDIR)/_opam/sys_dune/lib
Expand Down

0 comments on commit be4ae2e

Please sign in to comment.