Skip to content

Conversation

@merijn
Copy link

@merijn merijn commented Aug 17, 2021

This PR is to keep the AMUSE and OMUSE setup_codes.py. In OMUSE I currently run tests against the tarballs created by python setup.py sdist instead of in place (like AMUSE), to ensure the generated sdists actually work. Unfortunately, pip will run the install in a randomized temporary directory, which breaks the ccache caching and makes the OMUSE CI really slow.

To workaround this, I changed setup_codes.py to look for AMUSE_USE_CCACHE in the environment and, if it is set, adding an appropriate CCACHE_BASEDIR before compiling the embedded code. This dramatically increases the cache hit rate of ccache on the CI.

The change only affects users who: 1) use ccache and 2) explicitly opt-in by setting AMUSE_USE_CCACHE in their environment (and even then only when there is no explicit CCACHE_BASEDIR is set), so it should be safe to merge.

Specifies the build directory (inside pip temporary directory) as ccache
basedir when requested.
@ipelupessy ipelupessy merged commit c883b88 into amusecode:main Sep 22, 2021
@merijn merijn deleted the ccache branch September 22, 2021 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants