Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
348 stars 235 forks source link

caching in github workflow actions #1831

Open DanGrayson opened 3 years ago

DanGrayson commented 3 years ago

Caching the files in ~/work/M2/M2/M2/BUILD/build/usr-host doesn't provide any benefit to the autotools build, I believe, as when it decides what libraries and submodules to build, it doesn't look there. Maybe we should install the libraries to /usr/local and cache that, too.

We also need some mechanism for emptying all the caches, so, for example, flint 2.7.1 can replace flint 2.7.0.

mahrud commented 3 years ago

Caching the files in ~/work/M2/M2/M2/BUILD/build/usr-host doesn't provide any benefit to the autotools build, I believe, as when it decides what libraries and submodules to build, it doesn't look there.

The trivial fix seems to be for it to look there. Copying the files to /usr/local is just going to take extra time. Seems silly that it doesn't, since it would be very helpful for having multiple build directories that use the same usr-host directory for the libraries, rather than having to build it every time. CMake does this, and has an option -DM2_HOST_PREFIX for giving that directory.

We also need some mechanism for emptying all the caches, so, for example, flint 2.7.1 can replace flint 2.7.0.

They'll eventually do it: https://github.com/actions/cache/issues/2

mahrud commented 4 months ago

@d-torrance does autotools look in usr-host first before deciding it needs to build a library?

d-torrance commented 4 months ago

Good question! Off the top of my head, I don't think so, but I'll have to experiment to make sure