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

Faster and more complete CI #198

Merged
merged 7 commits into from
Jan 30, 2025
Merged

Faster and more complete CI #198

merged 7 commits into from
Jan 30, 2025

Conversation

qdeslandes
Copy link
Contributor

@qdeslandes qdeslandes commented Jan 30, 2025

Refactor the CI to speed up the build process and provide better signals during the PRs.

The whole idea is to use custom Docker containers to build the project into, those containers are built from Dockerfiles in .github folder, and they're stored in the repo's registry. This allows the CI to reuse those containers as cache on the next run. Hence, while the first run (with the container creation) can be a bit slower than before the change, subsequent runs will set up the build environment in ~20 seconds instead of 1 to 2 minutes.

Another notable change is the integration of the benchmarks report and the coverage report in the project's documentation.

The BPF example programs are not used anymore, and are not maintained.
Remove the sudo usage from the end-to-end tests and the benchmark. The
user is expected to call sudo (or other) if needed. The benchmark binary
will also check for SUDO_UID and SUDO_GID environment variables to set
the proper permission to the generated file.
Modify the unit tests CMake target to follow the practices used by
benchmark and e2e. The LCOV tracefile will be located into
$BUILD/output/tests.
Add a link in the documentation to open the benchmark and the code
coverage reports generated during the build.

Both reports are generated with the `make doc` command using custom
scripts:
- benchreport: read all the benchmark results located in the
  build/output/benchmarks and summarise them into a single HTML file
  based on a template
- covreport: generate an HTML coverage report using genhtml

The key point with those scripts is they allow their input files to be
absent, in which case they print a warning and exist without any error.
Use Docker custom docker containers to build and test bpfilter, those
containers are stored into the repo's registery and used during
subsequent CI run as cache to speed up the CI.
@qdeslandes qdeslandes merged commit 6c34b95 into main Jan 30, 2025
27 checks passed
@qdeslandes qdeslandes deleted the better_ci branch January 30, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants