jwiegley / category-theory

An axiom-free formalization of category theory in Coq for personal study and practical work
BSD 3-Clause "New" or "Revised" License
745 stars 68 forks source link

Init Coq Nix Toolbox and generate CI files. #21

Closed Zimmi48 closed 2 years ago

Zimmi48 commented 3 years ago

This infrastructure should allow you to easily test your library with the current dev version of Coq and Equations. To do so, run:

nix-shell --argstr bundle dev

By default, nix-shell will open the 8.13 version. You can also test an earlier version with, e.g.:

nix-shell --argstr bundle "8.10"

The CI files is a bonus (and doesn't have to be committed if you don't want to). It becomes really interesting when a Cachix is set up with push access because then it allows never rebuilding the same code twice, including code in PRs. We usually split out CI workflows into jobs corresponding to each dependency, but I've disabled that because without Cachix set up with push access, it introduces inefficiencies.

Zimmi48 commented 3 years ago

Since GitHub won't automatically trigger these new workflows for me, I'll trigger them on my fork to demonstrate what it does.

Zimmi48 commented 3 years ago

See https://github.com/Zimmi48/category-theory/actions?query=workflow%3ANix+ for how the generated workflows behave.

Zimmi48 commented 3 years ago

Note that the CI results when running with Nix confirm not only that category-theory is broken with dev, but also that it is broken with 8.10 (something that was already showing in the Docker-Coq CI).