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

Added --jobs/-j flag to compile command #2526

Merged
merged 1 commit into from
Feb 5, 2024
Merged

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Feb 5, 2024

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Adds the --jobs/-j to the command line interface to allow fine-tuning the number of parallel threads used during compilation.
The gRPC API is unchanged because it already had this parameter available.

What is the current behavior?

Using Arduino CLI as a command line app, the number of parallel jobs was fixed to the number of available CPU cores in the system.

What is the new behavior?

The maximum number of cores can be tuned with --jobs/-j flag.

Does this PR introduce a breaking change, and is titled accordingly?

No

Other information

@cmaglie cmaglie self-assigned this Feb 5, 2024
@cmaglie cmaglie added type: enhancement Proposed improvement topic: CLI Related to the command line interface labels Feb 5, 2024
Copy link

codecov bot commented Feb 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4a5585e) 0.00% compared to head (9cd0fe0) 68.96%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2526       +/-   ##
===========================================
+ Coverage        0   68.96%   +68.96%     
===========================================
  Files           0      204      +204     
  Lines           0    20523    +20523     
===========================================
+ Hits            0    14154    +14154     
- Misses          0     5216     +5216     
- Partials        0     1153     +1153     
Flag Coverage Δ
unit 68.96% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@cmaglie cmaglie merged commit ec157a8 into arduino:master Feb 5, 2024
98 checks passed
@cmaglie cmaglie deleted the jobs branch February 5, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: CLI Related to the command line interface type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants