Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actions: Cache source-build executables and libraries to speed up testing #2140

Open
yardasol opened this issue Jul 28, 2022 · 2 comments · May be fixed by #3112
Open

Github Actions: Cache source-build executables and libraries to speed up testing #2140

yardasol opened this issue Jul 28, 2022 · 2 comments · May be fixed by #3112

Comments

@yardasol
Copy link
Contributor

Whenever a commit is made to a PR, the openmc executable is built and ran for 11 different cases. This takes a lot of computational resources, as well as time. This is not ideal if the commit is something small and not directly related to the C++ source code, like docstrings, docpages, and the Python API

Github Actions supports caching to speed up these kinds of processes.

I propose that we modify the ci.yml workflow to do the following:

  • create independent caches for each of the 11 different cases
  • If a commit contains no changes to src, restore from the cache for that case; otherwise, build the source code and store the new sources in the cache.

This workflow does this kind of caching, albeit in the simplest case (serial HDF5, no extra libraries).

@paulromano
Copy link
Contributor

@yardasol That's a really great idea if it can be done effectively. It's a little more complicated than just checking src. We'd also want to check: include/, CMakeLists.txt, cmake/, vendor/, and anything else that might indirectly affect builds (probably tools/ci/).

@yardasol
Copy link
Contributor Author

yardasol commented Aug 2, 2022

Good point @paulromano! And I think this can be done effectively if we are tactical about what specifically we choose to cache (only OpenMC vs OpenMC and all the extra dependencies for that specific case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants