-
Notifications
You must be signed in to change notification settings - Fork 336
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
ci: Add a clang-ast workflow #1480
Conversation
ac000
commented
Oct 25, 2024
•
edited
Loading
edited
a4896da
to
2b671cd
Compare
FYI we have https://github.com/nginx/clang-ast/tree/unit |
Ah I see you have forked this repo :) Maybe shoot a PR for changes so we keep it in one place. |
d51aad5
to
83557d9
Compare
PR opened. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should test be included in this check? it's mostly Python code, and I am not aware of any difference it could make in the output Unit binary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify the desired outcome to this PR? I am not sure if this is supposed to be a solution to the code formatting or if this is to check some aspect of the build in each branch.
.github/workflows/clang-ast.yaml
Outdated
- name: Build Unit | ||
run: | | ||
make -j4 \ | ||
EXTRA_CFLAGS="-Xclang -load -Xclang clang-ast/ngx-ast.so -Xclang -plugin -Xclang ngx-ast" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be split across multiple lines to adhere to our repository wide 80 character line length limit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think so.
As you can see, I've split long lines where it makes sense.
This is no different to the other workflow files or the README for example.
The pytests have no bearing on this. However we do have the C tests as enabled with I was in two minds whether to include them or not. Having tried running the plugin on the tests, it did actually find a problem (in the test code)
So, OK, let's include them.. It could also be expanded out to include language modules... |
This was a check that used to run on our buildbot infrastructure, this is simply running it here now.
This has diddly-squat to do with code-formatting... |
|
0893f6b
to
107055e
Compare
Need to actually configure and build the tests!
|
d5193e3
to
f04bc68
Compare
|
2f0976e
to
a24009a
Compare
09fa063
to
37c9fdd
Compare
3b2d79d
to
9fcf602
Compare
|
|
This does compile-time type and argument checking using a clang-plugin. It was run as part of buildbot. This covers unitd, src/test and the php, perl, python, ruby, wasm, java and nodejs language modules/support. It doesn't cover Go as that doesn't build anything with clang (uses cgo) or wasm-wasi-component as that uses rustc. Link: <https://github.com/nginx/clang-ast/tree/unit> Signed-off-by: Andrew Clayton <[email protected]>
Rebase with master
|