DkML Workflows are GitHub Actions, GitLab CI/CD and desktop scripts. Version 2.0.3 is available today by clicking here. Who is this for?
- If you want to compile and distribute binaries for Windows, Linux and macOS, then the
compilersworkflows may be a good choice for you.
- If you are a package maintainer and want to test that your package compiles with Visual Studio MSVC, the Windows
compilersworkflow is a good choice.
The problems I was trying to solve:
- It has to work with MSVC. It is really easy to distribute binaries on Windows if you use MSVC.
- I grew really really tired of debugging issues remotely in vendor locked GitHub Actions. GitLab CI/CD is not as bad but still not good. I needed the ability to easily run the CI/CD directly on PCs.
- I am not a fan of static linking. IMHO, static linking is an overly complex solution in search of a problem that is only present on Linux (probably due to the 600+ Linux distributions). And among other things it complicates security. But …
- I do like static linking’s “easy to deploy” feature: you can static link an executable on your Linux desktop and
scpto a Linux server. (See “Changes” below)
- I wanted to generate Apple Silicon binaries on Apple x86_64 CI/CD hardware.
Changes with 2.0.3:
- Finally implemented the “easy to deploy” feature. Now the steps for a working CI/CD pipeline are just: 1) edit
.gitignore, 2) edit
.gitattributesand 3) copy-and-paste into your terminal.
- Make use of the standardized, upgradable
./dkscript to do all the fetching and creation of scripts.
Nomenclature: DkML Workflows is a part of DkML, helps to maintain the Windows ecosystem, and has been supported financially by the OCaml Software Foundataion, but is separate from the DkML Installer many people are aware of. I’ll try to distinguish them going forward.
Here is a feature comparison:
compilers only supports 4.14.0 today.
setup-ocaml supports all versions and variants of OCaml including OCaml 5
|GitHub Local Action
|GitHub Marketplace Action
compilers uses local scripts to implement the GitHub build logic, while
setup-ocaml is distributed through GitHub Marketplace which is easier to use
|GitLab CI/CD Local Include
compilers supports GitLab CI/CD
|Personal Computer Scripts
compilers can generates scripts to simulate CI on your personal computer for troubleshooting
|MSVC + MSYS2
|GCC + Cygwin
compilers can let your native code use ordinary Windows libraries without ABI conflicts. You can also distribute your executables without the license headache of redistributing or statically linking
compilers cross-compiles to ARM64 with
dune -x darwin_arm64
|CentOS 7 and Linux distros from 2014
compilers builds with an old GLIBC.
compilers dynamically linked Linux executables will be highly portable as GLIBC compatibility issues should be rare, and compatible with the unmodified LGPL license used by common OCaml dependencies like GNU MP
setup-ocaml is officially supported and well-tested.
|Some pinned packages
|No packages pinned
compilers, for some packages, must pin the version so that cross-platform patches (especially for Windows) are available. With
setup-ocaml you are free to use any version of any package
|Custom patches for Windows are sometimes needed.
compilers uses a much smaller set of patches.
setup-ocaml uses a large but deprecated set of patches.