Skip to content

Conversation

@ntsemah
Copy link

@ntsemah ntsemah commented Nov 17, 2025

Description

What

Add parallel compilation flag (-j) to DEB builds to improve compile time.

Why ?

HPCINFRA-1736

How ?

It is optional but for complex PRs please provide information about the design,
architecture, approach, etc.

Change type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Check list

  • Code follows the style de facto guidelines of this project
  • Comments have been inserted in hard to understand places
  • Documentation has been updated (if necessary)
  • Test has been added (if possible)

@greptile-apps
Copy link

greptile-apps bot commented Nov 17, 2025

Greptile Summary

  • Adds parallel compilation flag (make_opt) to DEB build process to improve compile time by passing -j${NPROC} flag to make commands
  • Updates debian/rules to use ${make_opt} in both debug and production builds, and modifies rpm.sh and build_pkg.sh to propagate the variable through environment

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward and only add parallel compilation flags to DEB builds. The implementation correctly propagates make_opt through the build chain without affecting RPM builds (which already use RPM_BUILD_NCPUS). No functional or logic changes to the actual code.
  • No files require special attention

Important Files Changed

Filename Overview
debian/rules Added ${make_opt} to both debug build and production build via override_dh_auto_build
contrib/jenkins_tests/rpm.sh Passes make_opt environment variable to DEB builds via dpkg-buildpackage and build_pkg.sh
contrib/build_pkg.sh Accepts make_opt environment variable and passes it to dpkg-buildpackage for parallel builds

Sequence Diagram

sequenceDiagram
    participant CI as "CI System"
    participant rpm.sh as "rpm.sh"
    participant build_pkg.sh as "build_pkg.sh"
    participant dpkg as "dpkg-buildpackage"
    participant make as "make"
    
    CI->>rpm.sh: "Execute with make_opt=-j8"
    rpm.sh->>dpkg: "env make_opt=${make_opt} dpkg-buildpackage"
    dpkg->>make: "make ${make_opt} (from debian/rules)"
    make-->>dpkg: "Parallel compilation complete"
    dpkg-->>rpm.sh: "DEB package built"
    
    CI->>rpm.sh: "Execute build_pkg.sh"
    rpm.sh->>build_pkg.sh: "env make_opt=${make_opt} build_pkg.sh"
    build_pkg.sh->>dpkg: "env make_opt=${make_opt} dpkg-buildpackage"
    dpkg->>make: "make ${make_opt} (from debian/rules)"
    make-->>dpkg: "Parallel compilation complete"
    dpkg-->>build_pkg.sh: "Package built"
    build_pkg.sh-->>rpm.sh: "Build complete"
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Additional Comments (1)

  1. debian/rules, line 9-13 (link)

    logic: The main build: target doesn't include a make command, so the parallel compilation flag ${make_opt} won't be used here. After configuration, debhelper's dh_auto_build will run make, but it won't see ${make_opt}. Consider adding override_dh_auto_build to use the parallel flag:

    override_dh_auto_build:
    	$(MAKE) ${make_opt}
    

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

@ntsemah ntsemah changed the title [CI] issue: HPCINFRA-1736 improve RPM/DEB build time [CI] issue: HPCINFRA-1736 improve DEB build time Nov 17, 2025
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Additional Comments (1)

  1. debian/rules, line 9-13 (link)

    logic: parallel compilation flag missing from production build. The ${make_opt} is only applied to the debug build on line 19, but the production build (after this configure step) will be executed by debhelper's automatic dh_auto_build without parallel flags. need to override dh_auto_build to pass ${make_opt} there too

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

@ntsemah ntsemah force-pushed the HPCINFRA-1736 branch 4 times, most recently from b8a5269 to 39db8d5 Compare November 18, 2025 14:24
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Additional Comments (2)

  1. contrib/jenkins_tests/rpm.sh, line 50 (link)

    logic: $make_opt won't expand inside single quotes. Use double quotes.

  2. contrib/jenkins_tests/rpm.sh, line 52 (link)

    logic: $make_opt won't expand inside single quotes. Use double quotes.

4 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Add parallel compilation flag (-j) to DEB builds to improve compile time.

Signed-off-by: Noam Tsemah <[email protected]>
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

@ntsemah
Copy link
Author

ntsemah commented Nov 19, 2025

bot:retest

@galnoam galnoam merged commit 63cd548 into Mellanox:vNext Nov 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants