After a long time, it’s time to officially release setup-ocaml v2!
With the official caching functionality introduced from v2, setup is much faster. (Notable thing: we’ve spent some time with the GitHub team pulling Actions and the ecosystem itself to the level where it “actually works”.)
We hope you will enjoy this release with a lot of other functionalities that we really need to do real development, such as support for semver-style versioning (
And please report any bugs you encounter!
- Added support for 32 bits compiler variants.
- Added semver-style version matching support.
- Cache opam root (
D:\.opamon Windows), opam download-cache (
D:\.opam\download-cacheon Windows), and opam local switch (
dune-cacheenabled, install dune, automatically configure the dune cache for the most efficient use in CI (exports
DUNE_CACHE_TRANSPORT=direct. TRANSPORT must be
daemon, to speed up the opam install process and to support Windows: [Cache] Somehow it doesn't seem to hit the cache · Issue #4166 · ocaml/dune · GitHub, [Cache] Cache daemon is not Windows compatible · Issue #4167 · ocaml/dune · GitHub), and share the dune cache directory for each run.
opam-pinis enabled, pin the local packages specified by
opam-depextis enabled, install the system dependencies specified by
opam-disable-sandboxingis enabled, sandboxing is disabled for all platforms except Windows. (Sandboxing is always disabled on the Windows runners due to limitations of opam.)
- The profiling functionality allows us to check the duration of each group if debug mode is enabled. (Enabling debug logging - GitHub Docs)
opam-repositoriesinput to support multiple opam repositories.
- Added “extends” experimentally.
- The Windows runners install
mingw64-i686-gcc-g++for 32 bit compiler variant support.
- Clean the log output by grouping some operations.
- The compiler will be initialised in all platforms with an opam local switch to eliminate differences between platforms and prepare for full dependency caching in the future.
- The macOS and Ubuntu runners install and cache opam from the GitHub release directly without the system package manager.
- The macOS and Ubuntu runners install
- The Windows runners install
OPAMROOT=D:\.opamon the Windows runners.
OPAMVERBOSE=trueif the actions debug mode is enabled. (Enabling debug logging - GitHub Docs)
@actions/cacheon the Windows runners.
HOME=%USERPROFILE%for opam on the Windows runners.
- Changed to force an update of the opam cache if the week number is changed.
- Use the week number to manage Cygwin cache.
1000to avoid a timeout even if the opam solver is slow.
- Increase cache hit ratio by loosening restore keys of opam cache.
- Reduce GitHub API calls to avoid issues that can easily hit rate-limiting.
- Unlock opam 2.1 on the Ubuntu and macOS runners.
- Use 2.1 mode instead of 2.0 mode on the Ubuntu and macOS runners.
- Increase the allowed artifact cache size from 5GB to 10GB.
- Remove some hacks as
--no-depextsis now used in CLI 2.0 mode from opam 2.1.2.
- Do not install opam-depext if it’s not enabled.
- Update default runtime to node16.
ocaml-versioninput has been removed. Use the
- The simplified version specifying scheme (e.g.
4.12.0) support has been removed.
opam-repositoryinput has been removed in order to add the
- Removed the profiling functionality added in
- Use the appropriate file system behavior parameters on the Windows runners. (
ppa: avsm/muslon 18.04 and older Ubuntu runners.
opam initfixes a bug that must be run via opam exec in subsequent steps.
- The Ubuntu runners install
- Set repository priorities correctly for multiple repositories feature.
- Lock the version of opam to be installed only to < 2.1 releases until opam 2.2 is released.
- If no user-input version is found in the opam-repository, explicitly raise an error instead of implicitly breaking the workflow.
- Retrieve the base compiler version from opam-repository to use the live released compiler version.
- Return an empty array to avoid depext failure when depext flags are not passed.
- Add support for more styles for the ocamlformat configuration in lint-fmt action.
- Fallback to the version in which the assets exist if no assets exist in the latest opam release.
- Instruct Cygwin setup to use “sys” symlinks during setup (partial workaround for bug with native symlinks in Cygwin setup - some depexts may still be affected)
- Print a proper error if the version not found in the