Skip to content

CI: fix compile_commands.json caching #6356

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

Merged
merged 2 commits into from
Mar 12, 2025

Conversation

edwintorok
Copy link
Contributor

When the cache for compile_commands.json got reused we didn't install the OCaml compiler, which caused failures in the static analyzer, because it couldn't locate the compiler runtime headers.

Do not skip setup-xapi-environment when the cache is reused.

This could be optimized to skip installing dune packages (install just the compiler), but for now just install everything to avoid the error.

Now when the cache is used we only skip installing/running dune-compiledb.

When the cache for compile_commands.json got reused we didn't install
the OCaml compiler, which caused failures in the static analyzer,
because it couldn't locate the compiler runtime headers.

Do not skip setup-xapi-environment when the cache is reused.

This could be optimized to skip installing dune packages
(install just the compiler), but for now just install everything
to avoid the error.

Now when the cache is used we only skip installing/running
dune-compiledb.

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
We cannot skip the 'dune rules' part, because then files like
xxhash_stubs.c will be missing because we haven't run the generators
yet.

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
@edwintorok edwintorok enabled auto-merge March 12, 2025 17:29
@edwintorok
Copy link
Contributor Author

Appears to work now, I've rerun the CI job, and looking at the Summary of the job it doesn't show the warning about the analyzer failure anymore, and there are some non-empty SARIF results too:CI run

@edwintorok edwintorok added this pull request to the merge queue Mar 12, 2025
Merged via the queue into xapi-project:master with commit 80956ca Mar 12, 2025
18 checks passed
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.

3 participants