Skip to content
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

Use Clang from cilium-builder image to build BPF code in CI #31754

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

gentoo-root
Copy link
Contributor

Many workflows in the CI use a hardcoded Clang 10.0 version, which in addition differs from the actual Clang used by Cilium, because the latter has some patches on top. Migrate to building inside cilium-builder or extracting clang from cilium-builder where possible in a straightforward way. Some gaps remain for the future work.

Also clean up a duplicating workflow and some leftovers from #31526 (previous work on integrating cilium-builder into the workflow that runs make run_bpf_tests).

Field-tested in #31729, where an LLVM upgrade revealed workflows that were tied to Clang 10.

Use Clang from cilium-builder image to build BPF code in CI

@gentoo-root gentoo-root added the release-note/ci This PR makes changes to the CI. label Apr 3, 2024
@gentoo-root
Copy link
Contributor Author

/test

1 similar comment
@gentoo-root
Copy link
Contributor Author

/test

@gentoo-root gentoo-root marked this pull request as ready for review April 3, 2024 18:28
@gentoo-root gentoo-root requested review from a team as code owners April 3, 2024 18:28
Copy link
Member

@joestringer joestringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to get some input from developers who run macOS, particularly for the docs change here - We may be able to tweak the bash script to be more portable. But otherwise this PR LGTM from build and github-sec angles.

I'm still on the fence about the timeout, but I don't feel strongly enough to push back / request changes on that front.

@joestringer joestringer added the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Apr 5, 2024
@gentoo-root
Copy link
Contributor Author

/test

@gentoo-root gentoo-root removed the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Apr 5, 2024
@gentoo-root gentoo-root marked this pull request as draft April 8, 2024 19:17
Remove the hardcoded LLVM 10.0 version. Move to building documentation
and running CI actions in a reproducible way using the cilium-builder
image with the appropriate version of LLVM. Remove the now unneeded step
set_clang_dir from lint-bpf-checks.yaml.

Unfortunately, ginkgo build test in lint-build-commits.yaml can't be
converted that simply (because cilium-builder images don't contain an
LLVM toolchain for the host, only for BPF), so leave it as is for now
and keep in mind to upgrade the LLVM version there on upgrades.

Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
Currently, the verifier test is using Clang from Cilium release images,
and the integration tests use hardcoded Clang 10.0.0 releases. Convert
the verifier test to extract Clang from the relevant cilium-builder
image instead.

Unfortunately, the integration tests can't be converted that simply
(because cilium-builder images don't contain an LLVM toolchain for the
host, only for BPF), so leave it as is for now and keep in mind to
upgrade the LLVM version there on upgrades.

Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
@gentoo-root
Copy link
Contributor Author

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Apr 9, 2024
@gentoo-root gentoo-root marked this pull request as ready for review April 9, 2024 16:25
@lmb lmb added this pull request to the merge queue Apr 10, 2024
@lmb
Copy link
Contributor

lmb commented Apr 10, 2024

🎉

Merged via the queue into main with commit 726a93b Apr 10, 2024
253 checks passed
@lmb lmb deleted the pr/max/ci-clang-builder branch April 10, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants