816 search results for ""

Showing 751 - 800
  1. OCaml-CI

  2. OCaml-CI

    What is OCaml-CI?

    OCaml-CI is a continuous integration service specifically designed for OCaml projects hosted on GitHub (and GitLab). It's built on the OCurrent pipeline framework and is hosted at ocaml.ci.dev .

    Additional Tooling
  3. OCaml-CI

    How It Works

    This approach makes rebuilds fast because Docker reuses cached steps when opam files haven't changed. Discovers installations of the GitHub app Lists repositories to check for each installation Id

    Additional Tooling
  4. OCaml-CI

    Setting Up OCaml-CI on a Project

    Additional Tooling
  5. OCaml-CI

    Step 1: Install the GitHub App

    Add the app to your account by selecting Configure at https://github.com/apps/ocaml-ci , then select the GitHub account or organisation and click Configure .

    Additional Tooling
  6. OCaml-CI

    Step 2: Select Repositories

    Select only the repositories you want tested (starting with no more than three please). If you select All Repositories , we won't be able to build anything!

    Additional Tooling
  7. OCaml-CI

    Step 3: Get Approved

    You will need to be approved before it will start building anything. This is done by adding yourself to a list by submitting a PR to the ocaml-ci repository, specifically adding yourself to deploy

    Additional Tooling
  8. OCaml-CI

    Step 4: Add a Status Badge (Optional)

    Add this to your README:

    Additional Tooling
  9. OCaml-CI

    Project Requirements

    OCaml-CI will automatically determine which OCaml versions and platforms to test based on your opam file constraints. Valid .opam files describing your package dependencies A dune-project or du

    Additional Tooling
  10. OCaml-CI

    Testing Locally

    This runs a local web interface at http://localhost:8080 showing how your project would be built. You can test how OCaml-CI would build your project locally:

    Additional Tooling
  11. OCaml-CI

    Key Features

    Automatic multi-version testing : Tests against multiple OCaml compiler versions Multi-platform support : Tests on different operating systems Smart caching : Docker layer caching makes rebuilds fast

    Additional Tooling
  12. OCaml-CI

    The OCaml-CI CLI

    The CLI allows you to interact with OCaml-CI programmatically — checking build status, viewing logs, cancelling or rebuilding jobs.

    Additional Tooling
  13. OCaml-CI

    Requirements

    You need a capability file ( ocaml-ci.cap ) which grants access to the API. This file must be provided to you by the OCaml-CI administrators.

    Additional Tooling
  14. OCaml-CI

    Installation & Usage

    Or install it as ocaml-ci . You can run it via dune:

    Additional Tooling
  15. OCaml-CI

    Example Commands

    cancel - Cancel a running build rebuild - Trigger a rebuild status - Check build status Other actions: View the build log (follows if still running): List build variants for a specific ref:

    Additional Tooling
  16. OCaml-CI

    Shorthand Syntax

    Example: You can omit refs/ from references (e.g., heads/master instead of refs/heads/master ) For PRs, you can omit /head (e.g., pull/867 instead of refs/pull/867/head ) For commits, pro

    Additional Tooling
  17. OCaml-CI

    Further Reading

    OCaml-CI Getting Started — a brief walkthrough of the basic setup steps. OCaml-CI README — the most comprehensive reference, covering how the pipeline works, installation, setup, CLI usage, and

    Additional Tooling
  18. Formatting Your Code With OCamlFormat

  19. Creating Libraries to Structure a Project with Dune

  20. Bootstrapping a Project with Dune

  21. Bootstrapping a Project with Dune

    More Comprehensive Scaffolding

    spin drom carcass If you're looking for project templates that include more than the basics, there are other community projects that offer more comprehensive project scaffolding:

    Projects
  22. Publishing a Package with Dune

  23. Managing Dependencies With opam

  24. Managing Dependencies With opam

    Installing Existing Dependencies

    Or if you set your environment with eval $(opam env) : Once the dependencies have been installed successfully, and assuming the project uses Dune as the build system, you can compile it with:

    Projects
  25. Managing Dependencies With opam

    Adding Dependencies From the opam Repository

    However, opam remains a central piece of the ecosystem, and it's very likely that you will have to work with *.opam files at some point, so we don't take a stance on whether you should specify yo

    Projects
  26. Managing Dependencies With opam

    Adding a Dependency to Your dune-project File

    Once you have added your dependency, you can build your project with dune build which will regenerate the *.opam files. If the project generates the opam file from the dune-project (you can

    Projects
  27. Managing Dependencies With opam

    Adding a Dependency to Your .opam File

    Either way, once you have added your dependency in the appropriate file, you can run opam install . --deps-only to update your current switch dependencies. If the *.opam files are not generate

    Projects
  28. Managing Dependencies With opam

    Installing a Package Directly

    This is handy for trying out a library, but for project work you should declare the dependency in your dune-project or *.opam file (as described above) so that collaborators and CI can reproduce

    Projects
  29. Managing Dependencies With opam

    Adding Dependencies From a Git Repository

    Sometimes, you may want to install a package directly from a Git repository, e.g., when it is not available on the opam repository or when you want to use an unreleased version.

    Projects
  30. Managing Dependencies With opam

    Adding a Git Dependency to a dune-project File

    to install the new dependency you added. Then, run Next, regenerate the .opam file of your project by running For example, if your project's opam file is my_project.opam , create my_projec

    Projects
  31. Managing Dependencies With opam

    Adding a Git Dependency to Your .opam File

    Finally, use opam install to install the dependencies, including the one specified in the pin-depends field. Add the pin-depends field in the opam file if it doesn't exist. Inside this fie

    Projects
  32. Managing Dependencies With opam

    Installing a Git Dependency in Your Switch

    You can install a package in your active switch directly from a Git URL:

    Projects
  33. Managing Dependencies With opam

    Dependency Categories

    See opam documentation for more details on the opam syntax. In *.opam files: In dune-project , flags look like this: Normal (no flag): used at runtime Build ( build ): used only to buil

    Projects
  34. Using OCaml with GitHub Actions

  35. Using OCaml with GitHub Actions

    setup-ocaml

    setup-ocaml is an action that provides an OS-neutral interface to opam , and so will not add features that only work on one operating system. It is the de-facto standard for OCaml CI workflows. I

    Additional Tooling
  36. Using OCaml with GitHub Actions

    Basic Usage

    Create .github/workflows/ci.yml :

    Additional Tooling
  37. Using OCaml with GitHub Actions

    Built-in Linting Extensions

    Check documentation builds Lint opam package files Check source code formatting The action includes several linting sub-actions:

    Additional Tooling
  38. Using OCaml with GitHub Actions

    Key Features

    | Feature | Input | Description | |---------|-------|-------------| | Compiler version | ocaml-compiler: 5.2 | Supports semver syntax | | Compiler variants | ocaml-compiler: ocaml-variants.5

    Additional Tooling
  39. Using OCaml with GitHub Actions

    Cross-Platform Support

    Works on Linux, macOS, and Windows with the same workflow file. The action handles platform-specific opam setup automatically.

    Additional Tooling
  40. Using OCaml with GitHub Actions

    OCaml-CI vs GitHub Actions

    Many projects use both: OCaml-CI for comprehensive automated testing, and GitHub Actions for quick feedback and Windows support. | Aspect | OCaml-CI | GitHub Actions + setup-ocaml | |--------|--

    Additional Tooling
  41. Running Commands in an opam Switch

  42. Running Commands in an opam Switch

    Using opam env

    This command evaluates the output of opam env and sets the necessary environment variables for the currently active switch. After running this command, you'll have access to the packages installed in

    Projects
  43. Running Commands in an opam Switch

    Using opam exec

    This will launch the version of the OCaml REPL within the context of the current opam switch. Example: Replace <command> with the actual command you want to run. This ensures that the command is

    Projects
  44. Running Commands in an opam Switch

    Using direnv

    Install direnv Ensure direnv is installed on your system. You can install it using a package manager or follow the instructions on the official website. Setup direnv integration Add the follo

    Projects
  45. Installing a Specific OCaml Compiler Version

  46. OCaml Docker Images

  47. OCaml Docker Images

    Docker Hub Repository: ocaml/opam

    Note: The older repositories ocaml/opam2 , ocaml/opam2-staging , ocurrent/opam , and ocaml/ocaml are no longer updated . Use ocaml/opam for the latest images. The official OCaml Docker imag

    Additional Tooling
  48. OCaml Docker Images

    What's Inside Each Image

    /Dockerfile.opam - the first stage installing the opam binary /Dockerfile.ocaml - builds on the first stage by installing a particular opam switch Each image also includes two Dockerfiles showing h

    Additional Tooling
  49. OCaml Docker Images

    Tag Format

    The latest tag is the latest release of OCaml running on the latest version of Debian (Debian is used as it has the widest architecture support for OCaml). Images are tagged with distribution an

    Additional Tooling
  50. OCaml Docker Images

    Supported Distributions

    Debian (various versions) Ubuntu (including ubuntu-lts for latest LTS) Alpine Fedora openSUSE Arch Linux (rolling release, just archlinux tag) Windows : windows-mingw-* (MinGW-w64) and wind

    Additional Tooling