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

feat(build-and-test-differential): if unnecessary, completely ignore cuda build #9520

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

yhisaki
Copy link
Contributor

@yhisaki yhisaki commented Nov 28, 2024

Description

Motivation

Previously, we configured PRs without CUDA-related changes to skip the build-and-test step. However, even just pulling the CUDA image or using the self-hosted runner can sometimes cause errors, which may block PRs unrelated to CUDA. This PR prevents pulling the CUDA image and using the self-hosted runner for PRs that are unrelated to CUDA.

Modified/Added jobs

  • prepare-build-and-test-differential
    • Checks if CUDA build is required and sets cuda_build output
    • Fails if tag:build-and-test-differential label is not present
  • build-and-test-differential
    • Non-CUDA build that runs on both CUDA-related and non-CUDA-related PRs
  • build-and-test-differential-cuda
    • Runs on CUDA-related PRs only
  • clang-tidy-differential
    • Runs when CUDA build is not required (cuda_build=false)
    • Uses ubuntu-latest runner and ghcr.io/autowarefoundation/autoware:universe-devel container
  • clang-tidy-differential-cuda
    • Runs when CUDA build is required (cuda_build=true)

Important

If this PR is merged, all of the jobs listed above need to be set as required. Since skipped jobs are treated as "Success", this should work correctly.

Behavior details

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added type:ci Continuous Integration (CI) processes and testing. (auto-assigned) component:common Common packages from the autoware-common repository. (auto-assigned) labels Nov 28, 2024
Copy link

github-actions bot commented Nov 28, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@yhisaki yhisaki added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 28, 2024
@yhisaki yhisaki marked this pull request as ready for review November 28, 2024 09:42
@yhisaki yhisaki marked this pull request as draft November 28, 2024 09:43
@xmfcx xmfcx closed this Nov 28, 2024
@xmfcx xmfcx reopened this Nov 28, 2024
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.48%. Comparing base (9fac554) to head (783ebe5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9520   +/-   ##
=======================================
  Coverage   29.48%   29.48%           
=======================================
  Files        1443     1443           
  Lines      108683   108683           
  Branches    41540    41540           
=======================================
  Hits        32044    32044           
  Misses      73519    73519           
  Partials     3120     3120           
Flag Coverage Δ *Carryforward flag
differential 0.00% <ø> (?)
total 29.48% <ø> (ø) Carriedforward from 42feb6a

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yhisaki yhisaki force-pushed the skip-cuda-build-and-test branch 2 times, most recently from b9beeb6 to ffac751 Compare December 2, 2024 08:09
@yhisaki yhisaki removed the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 2, 2024
@yhisaki yhisaki closed this Dec 2, 2024
@yhisaki yhisaki reopened this Dec 2, 2024
@yhisaki yhisaki closed this Dec 2, 2024
@yhisaki yhisaki reopened this Dec 2, 2024
Signed-off-by: Y.Hisaki <[email protected]>
@yhisaki yhisaki added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 2, 2024
Signed-off-by: Y.Hisaki <[email protected]>
@github-actions github-actions bot added component:perception Advanced sensor data processing and environment understanding. (auto-assigned) tag:require-cuda-build-and-test and removed component:common Common packages from the autoware-common repository. (auto-assigned) labels Dec 2, 2024
@yhisaki yhisaki closed this Dec 2, 2024
@yhisaki yhisaki reopened this Dec 2, 2024
Signed-off-by: Y.Hisaki <[email protected]>
@github-actions github-actions bot added the component:common Common packages from the autoware-common repository. (auto-assigned) label Dec 2, 2024
Signed-off-by: Y.Hisaki <[email protected]>
@yhisaki yhisaki closed this Dec 2, 2024
@github-actions github-actions bot removed component:perception Advanced sensor data processing and environment understanding. (auto-assigned) component:common Common packages from the autoware-common repository. (auto-assigned) tag:require-cuda-build-and-test labels Dec 2, 2024
@yhisaki yhisaki reopened this Dec 2, 2024
@yhisaki yhisaki requested review from youtalk, xmfcx and mitsudome-r and removed request for shmpwk and tkimura4 December 2, 2024 10:03
@yhisaki yhisaki marked this pull request as ready for review December 2, 2024 10:44
Comment on lines 57 to 66
matrix:
rosdistro:
- humble
container-suffix:
- ""
- -cuda
include:
- rosdistro: humble
container: ghcr.io/autowarefoundation/autoware:universe-devel
container-suffix: ""
build-depends-repos: build_depends.repos
- container-suffix: -cuda
runner: codebuild-autoware-us-east-1-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-large
build-pre-command: taskset --cpu-list 0-5
- container-suffix: ""
runner: ubuntu-latest
build-pre-command: ""
Copy link
Member

Choose a reason for hiding this comment

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

If we are splitting build-and-test-differential and build-and-test-differential-cuda as a job, then we probably don't have to use matrix

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the separation build-and-test-differential action made its maintenance more complex and the action logs harder to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mitsudome-r
Matrix has been removed. Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xmfcx

Thank you for your review. I see your point. Could you provide more details on how splitting build-and-test-differential makes maintenance more complex or action logs harder to read? I'll consider solutions to these issues!

Alternatively, if you have other ideas for addressing the problems described in the motivation, I'd like to hear them!

Signed-off-by: Y.Hisaki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:ci Continuous Integration (CI) processes and testing. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants