From 062e30f3f7002500def18284dd054a280c562a29 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 6 May 2024 21:26:59 +0100 Subject: [PATCH] [ml] ocaml init --- ml/.gitignore | 1 + ml/bin/dune | 4 ++++ ml/bin/main.ml | 1 + ml/build.sh | 3 +++ ml/dune-project | 26 ++++++++++++++++++++++++++ ml/lib/dune | 2 ++ ml/rosettaboy.opam | 31 +++++++++++++++++++++++++++++++ ml/test/dune | 2 ++ ml/test/test_rosettaboy.ml | 0 utils/Dockerfile | 4 ++++ 10 files changed, 74 insertions(+) create mode 100644 ml/.gitignore create mode 100644 ml/bin/dune create mode 100644 ml/bin/main.ml create mode 100755 ml/build.sh create mode 100644 ml/dune-project create mode 100644 ml/lib/dune create mode 100644 ml/rosettaboy.opam create mode 100644 ml/test/dune create mode 100644 ml/test/test_rosettaboy.ml diff --git a/ml/.gitignore b/ml/.gitignore new file mode 100644 index 00000000..e35d8850 --- /dev/null +++ b/ml/.gitignore @@ -0,0 +1 @@ +_build diff --git a/ml/bin/dune b/ml/bin/dune new file mode 100644 index 00000000..8da493b3 --- /dev/null +++ b/ml/bin/dune @@ -0,0 +1,4 @@ +(executable + (public_name rosettaboy) + (name main) + (libraries rosettaboy)) diff --git a/ml/bin/main.ml b/ml/bin/main.ml new file mode 100644 index 00000000..7bf6048f --- /dev/null +++ b/ml/bin/main.ml @@ -0,0 +1 @@ +let () = print_endline "Hello, World!" diff --git a/ml/build.sh b/ml/build.sh new file mode 100755 index 00000000..53a04bf1 --- /dev/null +++ b/ml/build.sh @@ -0,0 +1,3 @@ +#!/bin/sh +opam exec -- dune build +mv ./_build/default/bin/main.exe ./rosettaboy-release \ No newline at end of file diff --git a/ml/dune-project b/ml/dune-project new file mode 100644 index 00000000..6111a7e3 --- /dev/null +++ b/ml/dune-project @@ -0,0 +1,26 @@ +(lang dune 3.15) + +(name rosettaboy) + +(generate_opam_files true) + +(source + (github shish/rosettaboy)) + +(authors "Shish") + +(maintainers "Shish") + +(license LICENSE) + +(documentation https://github.com/shish/rosettaboy) + +(package + (name rosettaboy) + (synopsis "A short synopsis") + (description "A longer description") + (depends ocaml dune) + (tags + (topics "to describe" your project))) + +; See the complete stanza docs at https://dune.readthedocs.io/en/stable/dune-files.html#dune-project diff --git a/ml/lib/dune b/ml/lib/dune new file mode 100644 index 00000000..e1b730cd --- /dev/null +++ b/ml/lib/dune @@ -0,0 +1,2 @@ +(library + (name rosettaboy)) diff --git a/ml/rosettaboy.opam b/ml/rosettaboy.opam new file mode 100644 index 00000000..d21042b7 --- /dev/null +++ b/ml/rosettaboy.opam @@ -0,0 +1,31 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +synopsis: "A short synopsis" +description: "A longer description" +maintainer: ["Shish"] +authors: ["Shish"] +license: "LICENSE" +tags: ["topics" "to describe" "your" "project"] +homepage: "https://github.com/shish/rosettaboy" +doc: "https://github.com/shish/rosettaboy" +bug-reports: "https://github.com/shish/rosettaboy/issues" +depends: [ + "ocaml" + "dune" {>= "3.15"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://github.com/shish/rosettaboy.git" diff --git a/ml/test/dune b/ml/test/dune new file mode 100644 index 00000000..45120066 --- /dev/null +++ b/ml/test/dune @@ -0,0 +1,2 @@ +(test + (name test_rosettaboy)) diff --git a/ml/test/test_rosettaboy.ml b/ml/test/test_rosettaboy.ml new file mode 100644 index 00000000..e69de29b diff --git a/utils/Dockerfile b/utils/Dockerfile index 52f3e345..7f486d9e 100644 --- a/utils/Dockerfile +++ b/utils/Dockerfile @@ -24,6 +24,10 @@ ENV PATH="/home/dev/.go/bin:$PATH" COPY --from=shish2k/rosettaboy-devkit-nim:2.0.2 --chown=${USER_ID}:${GROUP_ID} /home/dev/.nim /home/dev/.nim ENV PATH="/home/dev/.nim/bin:$PATH" +# Install Ocaml tools +COPY --from=shish2k/rosettaboy-devkit-ocaml:5.1.1 --chown=${USER_ID}:${GROUP_ID} /home/dev/.opam /home/dev/.opam +ENV PATH="/home/dev/.opam/bin:$PATH" + # Install PHP tools COPY --from=shish2k/rosettaboy-devkit-php:8.3.4 --chown=${USER_ID}:${GROUP_ID} /home/dev/.php /home/dev/.php ENV PATH="/home/dev/.php/bin:$PATH"