-
Notifications
You must be signed in to change notification settings - Fork 20
Limit the parallelism of user Chromium builds to 8 using an alias #196
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
Open
phistuck
wants to merge
6
commits into
JanitorTechnology:master
Choose a base branch
from
phistuck:parallelism-limiter
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7870270
Add an alias for job-limited Ninja
phistuck 6fb8ccc
Removed the alias before building
phistuck 92bb685
Removed a stray \
phistuck 73e92fd
Removed unalias and the explicit job count
phistuck e1dae4c
Removed a stray comment
phistuck ba664d7
Added a TODO
phistuck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,10 @@ FROM janitortechnology/ubuntu-dev | |
| RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | ||
| ENV PATH $PATH:/home/user/depot_tools | ||
| RUN echo "\n# Add Chromium's depot_tools to the PATH." >> .bashrc \ | ||
| && echo "export PATH=\"\$PATH:/home/user/depot_tools\"" >> .bashrc | ||
| && echo "export PATH=\"\$PATH:/home/user/depot_tools\"" >> .bashrc \ | ||
|
||
|
|
||
| # Make default Ninja parallelism use 8 parallel jobs. | ||
| RUN echo "\nalias ninja='ninja -j8'" >> .bash_aliases | ||
|
|
||
| # Enable bash completion for git cl. | ||
| RUN echo "\n# The next line enables bash completion for git cl." >> .bashrc \ | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I'm not sure it's necessary to have two different behaviors (normal developers use half of cores vs update Dockerfile uses all cores), so I don't think you need to unalias here. Also maybe we should remove the
-j`nproc`ninja parameter below.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then the image building will be slower, or is that not a concern?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we import
*-update.dockerfileinto our admin interface, for when we want to update some project image by just building a few layers on top of it instead of pulling a brand new image (we stopped using*-update.dockerfilefor most projects, but we still do it for Chrome, because we can't pre-build the Chrome browser in the main Dockerfile as it makes CircleCI time out, so we use thechromium-update.dockerfileto pre-build Chrome on-premises in OVH1).And since the
-j`nproc`was OOM'ing OVH1, I manually edited it to-j8in our admin interface... So TL;DR we should only have one way to build Chrome, to be used everywhere by developers and CI alike.