-
Notifications
You must be signed in to change notification settings - Fork 116
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
add BPF GCC support for BPF CI #7737
Conversation
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.
Overall, LGTM. Did not do a throughout review, but just dropping a few comment regarding the failed set_matrix step.
Also, please do this PR against https://github.com/kernel-patches/vmtest/ instead. kernel-patches/bpf pulls the kernel from upstream and then copies kernel-patches/vmtest
into it.
.github/scripts/matrix.py
Outdated
@@ -64,6 +71,7 @@ def to_dict(self) -> Dict[str, Union[str, int]]: | |||
class BuildConfig: | |||
arch: Arch | |||
toolchain: Toolchain | |||
bpf_toolchain: Toolchain = Toolchain(compiler=Compiler.LLVM, version=DEFAULT_LLVM_VERSION) |
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.
this is what seems to cause the set_matrix
step failure.
The error is:
Traceback (most recent call last):
File "/tmp/work/bpf/bpf/.github/scripts/matrix.py", line 70, in <module>
@dataclasses.dataclass
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/dataclasses.py", line 1268, in dataclass
return wrap(cls)
^^^^^^^^^
File "/usr/lib/python3.12/dataclasses.py", line 12[5](https://github.com/kernel-patches/bpf/actions/runs/10881506538/job/30190585441?pr=7737#step:3:6)8, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/dataclasses.py", line 994, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/dataclasses.py", line [8](https://github.com/kernel-patches/bpf/actions/runs/10881506538/job/30190585441?pr=7737#step:3:9)52, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class '__main__.Toolchain'> for field bpf_toolchain is not allowed: use default_factory
From https://stackoverflow.com/a/75677129
it seems https://gist.github.com/chantra/b4ac937f0f0e909d238bb03f7aacae49 would work.
Signed-off-by: Cupertino Miranda <[email protected]>
01cef01
to
78a307f
Compare
e1cb77d
to
6b1e4f8
Compare
866313b
to
757fcea
Compare
Automatically cleaning up stale PR; feel free to reopen if needed |
This pull requests enables BPF GCC compilation testing for the CI.
Required changes in libbpf/ci where pull requested in libbpf/ci#144