I am running into some major performance problems building a quite simple Haskell project using nix on Travis and CircleCI. Has anyone else run into this and have any advice about how to work around it?
To give some indication:
CircleCI: 6mins 35
CircleCI: Currently 24 minutes
You would get better debugging information with
nix-build. The new
nix build is quite terse, and works better for interactive use.
I have switched to
nix-build now and it shows that some things were not being cached which I thought would be. I’ve tried pushing them locally to the cache now so we’ll see if that improves things.
After adding everything to the cache build times are sensible. I think the long time taken to perform CI was due to some build dependencies needing to be added to the cache. Moral of the story, initialise the cache
locally if your CI machine is slow.