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 (-j8) to DEB builds by passing make_opt environment variable through the build chain
  • Changes flow through rpm.shbuild_pkg.shdpkg-buildpackagedebian/rules where make_opt is used in both debug and production builds
  • Includes minor whitespace cleanup (trailing whitespace and tabs)

Confidence Score: 5/5

  • This PR is safe to merge with no functional risks
  • The changes correctly implement parallel builds for DEB packages by properly threading the make_opt variable through the build system. The implementation mirrors the existing RPM parallel build pattern (RPM_BUILD_NCPUS) and is well-contained to the build infrastructure with no impact on runtime code
  • No files require special attention

Sequence Diagram

sequenceDiagram
    participant CI as "CI System"
    participant globals as "globals.sh"
    participant rpm as "rpm.sh"
    participant build_pkg as "build_pkg.sh"
    participant dpkg as "dpkg-buildpackage"
    participant rules as "debian/rules"
    participant make as "make"
    
    CI->>globals: "source globals.sh"
    globals-->>CI: "make_opt=-j8"
    CI->>rpm: "execute rpm.sh"
    rpm->>build_pkg: "env make_opt=${make_opt} build_pkg.sh"
    build_pkg->>dpkg: "env make_opt=${make_opt} dpkg-buildpackage"
    dpkg->>rules: "invoke debian/rules with make_opt env var"
    rules->>make: "make ${make_opt} (debug build)"
    rules->>make: "dh_auto_build -- ${make_opt} (production build)"
    make-->>rules: "parallel compilation complete"
    rules-->>dpkg: "build complete"
    dpkg-->>build_pkg: "packages created"
    build_pkg-->>rpm: "success"
    rpm-->>CI: "DEB 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

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


# Use parallel build for production build
override_dh_auto_build:
dh_auto_build -- ${make_opt}
Copy link
Collaborator

Choose a reason for hiding this comment

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

check if this package can be built without having this variable like it will in UBS

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.

2 participants