cpp-linter / cpp-linter-action

A Github Action for linting C/C++ code integrating clang-tidy and clang-format to collect feedback provided in the form of file-annotations, thread-comments, workflow step-summary, and Pull Request reviews.
https://cpp-linter.github.io/cpp-linter-action/
MIT License
87 stars 20 forks source link

python venv cache support #234

Open h0tw1r3 opened 2 months ago

h0tw1r3 commented 2 months ago

hashFiles currently doesn't support globs outside of the GITHUB_WORKSPACE. This works around the limitation.

2bndy5 commented 2 months ago

FYI, I think the CI failed on MacOS runners because of segfaults. This isn't anything to do with the changes here, rather we should look into this separately.

2bndy5 commented 2 months ago

I also think there should be some logic added to detect presence of a cached venv before creating a venv. https://github.com/cpp-linter/cpp-linter-action/blob/a3ed7553c695735e6d1af356a0c0211a77d42c7b/action.yml#L241 https://github.com/cpp-linter/cpp-linter-action/blob/a3ed7553c695735e6d1af356a0c0211a77d42c7b/action.yml#L277 The above lines might fail if the venv folder already exists.

2bndy5 commented 2 months ago

I guess we should also cache pip's global cache as well if this new option is enabled.