maxitg / SetReplace

C++/Wolfram Language package for exploring set and graph rewriting systems
MIT License
216 stars 43 forks source link

Paclet builds in CI #552

Closed maxitg closed 3 years ago

maxitg commented 3 years ago

The problem

Currently, paclets (e.g., for releases) are build using internal Wolfram infrastructure. That has a number of issues the main one being that these builds are inaccessible to anyone who is not a Wolfram employee. We should move the paclet building to Circle CI instead.

That will bring a number of advantages:

  1. Every collaborator will be able to access it and download paclets.
  2. We will have full access to the configuration which will be store purely in YAML files. Currently, even I don't have access to configuring the build settings.
  3. Circle CI is much faster especially with respect to the time it takes for the builds to start (due to its scale).
  4. It will be completely automatic. We can build a multi-platform paclet for every commit in every branch. Currently, one has to start the builds manually. This will even allow us to do things like CD where users will always have the paclet built from the latest master with zero work on our side.

Possible solution

Circle CI gives free Linux and Windows credits to open source projects. They appear to give Mac credits as well but there is an approval process, and we don't have access yet (I don't yet know what it will take).

Due to #547, Mathematica installation is no longer required to build the library, so we only need a compiler on Windows and Mac, which means we almost certainly can build it there. We can also publish artifacts since #540, and it's likely possible to pick up the artifacts by other steps in the build process.

So, the main issue is to configure builds on Mac and Windows #371 (ideally using CMake) and request Mac credits from Circle CI.

Alternative solutions

Install Mathematica on Mac and Windows will make the build process more consistent (since library metadata JSONs will be generated by the same script, and there will be no build code duplication). However, even on Linux Docker downloading WL image takes a long time; we will have a limited number of credits, and installing it on Mac and Windows will be even more difficult.