Minoru/plentyfs

Set up CI

Closed this issue · 1 comments

We have some tests now (#1), so it's time to add CI and make sure this thing works not just on developer's machines.

Can't use Docker because mounting FUSE filesystem from a Docker container requires elevated privileges and access to the /dev/fuse on the host device: docker/for-linux#321 Cirrus CI provides --add-cap ALL, but probably doesn't pass the device.

That leaves us with using a virtual machine. For PlentyFS, I wanted the CI to just run ./check; this way, CI would do exactly the same thing as a contributor can do locally. But ./check generates HTML and PDF, which requires Pandoc and TeX; both are heavy dependencies, weighting at hundreds of megabytes. In fact, the Docker image with all the dependencies is 2 gigabytes!

I briefly looked for CI providers that would let us snapshot or cache a VM after installing the packages, but apparently no-one does it: GitLab, Cirrus, Azure, CircleCI all have the common "cache" and "artifact" abstractions, but don't have what I'm looking for.

I see three paths forward:

  1. just stomach the problems that VMs bring (slower provisioning, periodic breakage due to changes made by providers);
  2. split ./check in two. Run the documentation part in Docker (where we can benefit from Docker image caching), use VMs to run the testing part (which luckily only depends on a modest set of packages);
  3. modify ./check to skip integration testing most of the time. Run it only for merges, for example. This is suboptimal because we might miss some bugs that way.

I need to sleep on this.