Skip to content

rescript-lang/setup-ocaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

rescript-lang/setup-ocaml

GitHub Action for setting up OCaml environment, but faster.

This action aggressively uses some low compatibility assumptions to boost up CI.

Optimization

Use composite actions

This action doesn't try to be standalone. Instead of doing everything, it lets users choose a better option themselves.

It should provides enough inputs/outputs context for better composiblities.

Do not install system dependecencies

By default, opam init installs system dependencies needed in OCaml development.

This action tries to skip this process or replace it with a shortcut wherever possible. According to following assumptions:

  • Some dependencies are optional.
    • E.g. rsync, git, mercurial is not needed if there is no pinnned dependecencies
  • Some are already installed in the runner.
    • E.g. g++ or Cygwin (mysys) is already installed on the GitHub hosted runners.
  • There may be faster alternative installers.

Requires most recent runners

The GitHub-hosted runners have different versions and types of pre-installed dependencies for each version, and the *-latest runners are not the latest.

This is especially significant for Windows, where the windows-2025 image includes the latest OS features such as the built-in WinGet package manager and Dev Drive with ReFS.

Use D: and Dev Drive for Windows

The default C: drive in the Windows runners is more than x10 slower than the D: drive provided for temporary files. This slows down most of the build and installation scripts that are IO intensive.

Use cache efficiently

GitHub Actions provides 10GB of cache space on public repositories.

Even optimized processes can still be slow, so this action tries to cache and skip as much work as possible.

  • Dependencies installation
  • Most of opam init
  • Project build cache

Do not use sandbox feature

Which doens't make sense for CI. It's already isolsated in the workflow level.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published