-
Notifications
You must be signed in to change notification settings - Fork 668
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: introduce build-test-tidy-pr #9709
Conversation
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
52a2670
to
91dfe88
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9709 +/- ##
==========================================
- Coverage 29.67% 29.67% -0.01%
==========================================
Files 1450 1450
Lines 108795 108781 -14
Branches 42683 42668 -15
==========================================
- Hits 32281 32276 -5
+ Misses 73071 73064 -7
+ Partials 3443 3441 -2
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
5e6dc98
to
31b06f6
Compare
Signed-off-by: M. Fatih Cırıt <[email protected]>
31b06f6
to
110ace5
Compare
Signed-off-by: M. Fatih Cırıt <[email protected]>
Signed-off-by: M. Fatih Cırıt <[email protected]>
Signed-off-by: M. Fatih Cırıt <[email protected]>
Testing after changes... CUDA package changed🟢 Good change🔴 Bad change |
Signed-off-by: M. Fatih Cırıt <[email protected]>
Signed-off-by: M. Fatih Cırıt <[email protected]>
Signed-off-by: M. Fatih Cırıt <[email protected]>
Description
These workflows have quite a history in autoware. They have been modified in many ways to make sure everything builds and is tested correctly. Sometimes they didn't fit into their machines, sometimes they were bound to labels to function.
Lately I had some complaints about the way they were structured:
Complaints
build-and-test-differential
was extracted as a composite actionTo overcome these issues, I've extracted it as a reusable workflow.
Checking
cuda
packages required an additional labelThis meant, pr-labeler added the label with these rules:
This required adding the label and re-running the other steps. And it was also possible to add this label by hand and confuse the system.
Also
prepare-build-and-test-differential
job and its downstream logic was too complicated and hard to maintain.clang-tidy-differential
andclang-tidy-differential-cuda
jobs were inbuild-and-test-differential
jobAnd
clang-tidy-differential
was duplicated. Also itscache-key-element:
was not set up correctly, it was missing cache and had to rebuild from scratch.There was no clear success condition
We used to have 4 actual jobs:
But also if cuda jobs were skipped due to not having cuda related files changed, we also wanted them count as success.
Solution
tag:require-cuda-build-and-test
and instead usetj-actions/changed-files@v45
in a simple way.build-test-tidy-pr.yaml
which contains these jobs:require-label
🚪 Nothing below won't run without the label, ❌ Will fail if label is missing.check-if-cuda-job-is-needed
↪️ Checks if PR modified perception/sensing foldersbuild-and-test-differential
build-and-test-differential-cuda
clang-tidy-differential
clang-tidy-differential-cuda
This top level workflow doesn't contain any implementation details. It is for orchestrating the other workflows by reusing those workflows.
The implementation is simple and the logic is easily readable.
build-and-test-differential
andclang-tidy-differential
are made into reusable workflows.This way we can see all the steps easily and can reuse more steps in them.
I hope you like how it was simplified and cleaned.
Other changes:
ubuntu-24.04
public runners. They provide 10GB more empty space, we can run all on them.tag:run-build-and-test-differential
torun:build-and-test-differential
Related links
Links from
main
, before this PR:A very old version of this workflow
How was this PR tested?
I've ran these tests from scratch sequentially after finishing up my changes, they are all tested on the latest version before review. 🪟
No relevant files changed to build-and-test
Normal package changed
🟢 Good change
🔴 Bad change
CUDA package changed
🟢 Good change
🔴 Bad change