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

build: fix/speed-up build graph dependencies #924

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

mjcheetham
Copy link
Collaborator

When building the entire solution, we need to ensure the various "Installer." and "Packaging." projects are not built at the same time as other projects, especially on Windows, where we may hit file locking problems.

The installer projects call a build script internally that calls a dotnet publish on various projects. By making the installer projects reference (but not consume) the dependent projects we ensure MSBuild won't build them until the end, and prevent file access errors.

At the same time, we can probably remove the "-m:1" flags that tell MSBuild to only build one project at a time.

When building the entire solution, we need to ensure the various
"Installer.<OS>" and "Packaging.<OS>" projects are not built at the same
time as other projects, especially on Windows, where we may hit file
locking problems.

The installer projects call a build script internally that calls a
`dotnet publish` on various projects. By making the installer projects
reference (but not consume) the dependent projects we ensure MSBuild
won't build them until the end, and prevent file access errors.

At the same time, we can probably remove the "-m:1" flags that tell
MSBuild to only build one project at a time.
@mjcheetham mjcheetham added the engineering Refactoring or build changes label Oct 24, 2022
Copy link
Contributor

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

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

I took a quick glance at our CI history to see how things improved. The end-to-end time seems to have a moderate speedup of 10-15 seconds (based on very limited samples) but individual jobs do get a lot faster. Windows seems to speed up by a minute. The macOS build seems to be the limiter in the build I saw.

Still, the logic here is sound. Thanks!

@mjcheetham mjcheetham merged commit 8261c81 into git-ecosystem:main Nov 1, 2022
@mjcheetham mjcheetham deleted the fix-buildgraph branch November 1, 2022 16:28
@ldennington ldennington mentioned this pull request Nov 3, 2022
ldennington added a commit that referenced this pull request Nov 3, 2022
Changes:

- Check for broken links in documentation (#700)
- Support macOS `arm64` installs via Homebrew (#798) 
- Validate installers before publishing (#813)
- Auto-generate maintainer away notification issues (#842)
- Install dotnet via Jammy feeds on Ubuntu 22.04 and greater (#839)
- Access Azure storage account using service principle credentials
(#851)
- Update documentation to use reference-style links (#680)
- Unify documentation line length (#862)
- Add generic username/password UI (#871)
- Bitbucket DC OAuth support (#607)
- Distribute GCM as a dotnet tool (#886)
- Drop `-core` suffix from entry executable #551 
- Speed up build graph (#924)
@Favourjacobmudiaga

This comment has been minimized.

@Favourjacobmudiaga

This comment has been minimized.

1 similar comment
@Favourjacobmudiaga

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Refactoring or build changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants