Skip to content
Snippets Groups Projects
Commit 75ca6251 authored by Julien Girard-Satabin's avatar Julien Girard-Satabin
Browse files

Added automated interface generation rule

parent 891e1cd1
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ tests:
- if [ ! -d _opam ]; then echo "no local switch in the CI cache, we setup a new switch"; opam switch create --yes --no-install . ocaml-base-compiler.4.11.1; fi
- eval $(opam env)
- sudo apt-get update
- sudo apt install -y protobuf-compiler
- opam repository add remote https://opam.ocaml.org
- opam depext --yes ocplib-endian base fmt alt-ergo.2.4.0
- opam install . --deps-only --with-test --yes
......
(library
(name onnx)
(public_name onnx)
(libraries base csv piqirun.pb)
(synopsis "ONNX parser"))
(name onnx)
(public_name onnx)
(libraries base csv piqirun.pb)
(synopsis "ONNX parser"))
(rule
(targets onnx_piqi.ml onnx_piqi.mli)
(action
(run ./generate_onnx_interface.sh)
)
(deps
onnx.proto
generate_onnx_interface.sh)
(mode
promote))
#!/bin/sh
piqi of-proto onnx.proto
sed -ie 's/-START-VERSION/START-VERSION/' onnx.proto.piqi
piqic-ocaml onnx.proto.piqi
sed -ie 's/external/externall/g' onnx_piqi.ml
ocamlfind ocamlc -package piqirun.pb -i onnx_piqi.ml > onnx_piqi.mli
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment