Giter Club home page Giter Club logo

ocaml-kata-template's Introduction

CI/CD

OCaml Kata-Template

Ready-to-code OCaml Dune project with some sample tests and exercises already implemented

Setup

With VS Code Remote Development Container (recommended)

Vs Code and Docker (or Docker Desktop on windows) required

  • Install Remote-Containers extension
  • Use "Remote-Containers:Open Folder in Container" from the command palette and choose this folder. Select the "Use Dockerfile in folder" option with ./Dockerfile.dev.
  • Install the 'OCaml Platform' Extension in the dev Container (the same way you would usually install a VSCode extension)
  • Now cd into project
  • Run dune build.
  • Run dune exec project. The programm should run, ouputing some lines prompting to run some tests.
  • Run dune test. All tests should succeed.
  • Try to hover over symbols in lib/setup.ml. Syntax highlights and type inference should be displayed.
  • Try to rename "lib" in line 2 of lib/dune project file (e.g in "notlib"). Run dune build. The build should fail. Now open (or close then re-open) test/setup.ml. Error highlighting should be displayed complaining about unbounded module name. Don't forget to rollback your changes in lib/dune.
  • You're good to go.

With Docker but without VS Code Remote Development Container

Docker required

  • docker build --tag ocaml:workspace --file Dockerfile.dev . ( Do not forget the '.' ;) )
  • ./dockin ocaml:workspace ocaml
  • cd /workspace/project

On Linux without Docker

Patience required

  • Refer to the OCaml Documentation

Use as template

Rename

To rename the project folder and dune project files (will replace "project" as the project name)

python rename_template.py <newname> <oldname? = "project">

ocaml-kata-template's People

Contributors

nyub avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.