I've been moving many of my personal projects to Azure CI, for the following reasons:
- Cross-platform support
- Consistent language for builds on all platforms
- Concurrent builds in free tier
And I've been using essentially the same config for most platforms.
- Copy
azure-pipelines.yml
andesy-build-steps.yml
to your project's directory - Create a new build pipeline for your project in Azure DevOps
- Copy the
.yml
files to your project's directory
You can see the example pipeline in action here.
This is the minimal esy
pipeline that builds cross-platform. It simply spins up a windows, linux, and mac machine, and runs esy install
and esy build
.
This is a slightly more advanced variation of the basic-esy-project
pipeline, that incorporates caching the esy
store. This is really helpful for Windows, as the ocaml
compiler can take ~15 minutes to build.
You can enable the restoration of the cache once you have a green build (and the artifacts have been published) - just uncomment the lines in azure-pipelines.yml
that reference restore-build-cache.yml
.
- For steps that need to be run on all platforms, modify
esy-build-steps.yml
. - For steps that need to be run on a single machine / platform, modify
azure-pipelines.yml
- Azure DevOps for the great tooling!
- @ulrikstrid for teaching me everything I know about Azure CI :)