Skip to content

Commit da6c377

Browse files
committed
Add bench.Dockerfile
1 parent d8c4f40 commit da6c377

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

bench.Dockerfile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM ocaml/opam:debian-ocaml-5.3
2+
WORKDIR /bench-dir
3+
RUN sudo apt-get update && \
4+
sudo apt-get install -qq -yy --no-install-recommends pkg-config libgmp-dev \
5+
wget
6+
RUN sudo ln -sf /usr/bin/opam-2.1 /usr/bin/opam
7+
RUN opam remote add origin https://github.com/ocaml/opam-repository.git && \
8+
opam update
9+
RUN wget https://nodejs.org/dist/v22.14.0/node-v22.14.0-linux-x64.tar.xz && \
10+
tar xJvf node-v22.14.0-linux-x64.tar.xz && \
11+
sudo cp node-v22.14.0-linux-x64/bin/node /usr/bin/node
12+
COPY --chown=opam:opam ./*.opam ./VERSION ./
13+
RUN opam exec -- git init && \
14+
opam exec -- git add . && \
15+
opam exec -- git commit -m dummy && \
16+
opam exec -- git tag -a $(cat VERSION)-dev -m dummy
17+
RUN opam pin -yn --with-version=dev .
18+
RUN opam install -y --depext-only wasm_of_ocaml-bench && \
19+
opam install -y --deps-only js_of_ocaml-compiler && \
20+
opam install -y binaryen-bin
21+
COPY --chown=opam:opam . ./
22+
RUN opam exec -- git add . && \
23+
opam exec -- git commit -m dummy && \
24+
opam exec -- git tag -a $(cat VERSION)-dev-2 -m dummy
25+
RUN opam install -y --deps-only --with-test wasm_of_ocaml-bench
26+
WORKDIR ./benchmarks

compiler/bin-wasm_of_ocaml/compile.ml

+1-2
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,7 @@ let run
462462
ic
463463
in
464464
if times () then Format.eprintf " parsing: %a@." Timer.print t1;
465-
Fs.with_intermediate_file
466-
(Filename.temp_file (Filename.chop_extension output_file) ".wat")
465+
Fs.with_intermediate_file (Filename.temp_file "output" ".wat")
467466
@@ fun wat_file ->
468467
let dir = Filename.chop_extension output_file ^ ".assets" in
469468
Link.gen_dir dir

0 commit comments

Comments
 (0)