-
Notifications
You must be signed in to change notification settings - Fork 554
Enable partial Linux builds for Copilot support #24494
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: rolfbjarne <[email protected]>
Co-authored-by: rolfbjarne <[email protected]>
rolfbjarne
left a comment
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.
@copilot the network problems have been fixed, please try again
src/bgen/ProjectInspector.csproj
Outdated
| @@ -0,0 +1,30 @@ | |||
| <!-- All msbuild target logic needs to be inside a project tag --> | |||
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.
@copilot Don't check in any version of ProjectInspector.csproj, in any directory (and remove the ones in this PR).
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.
Removed all ProjectInspector.csproj files in commit 7fcbf2e.
Make.config
Outdated
| export DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) | ||
| export MD_APPLE_SDK_ROOT=$(abspath $(XCODE_DEVELOPER_ROOT)/../..) | ||
| else | ||
| # On Linux, set dummy Xcode values |
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.
@copilot Use the word 'placeholder' instead of 'dummy'.
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.
Changed to 'placeholder' in commit 7fcbf2e.
Make.config
Outdated
| INCLUDE_IOS= | ||
| INCLUDE_MAC= | ||
| INCLUDE_TVOS= | ||
| INCLUDE_MACCATALYST= | ||
| INCLUDE_SIMULATOR= | ||
| INCLUDE_DEVICE= |
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.
@copilot They should all be included, not excluded, otherwise nothing will be built, even on Linux.
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.
Fixed - removed the override that was clearing the INCLUDE_* variables. They are now properly included on Linux in commit 7fcbf2e. The build now shows all platforms and progresses through builds/runtime/src directories until native compilation is attempted (which is expected to fail on Linux).
…holder' instead of 'dummy', keep INCLUDE_* variables Co-authored-by: rolfbjarne <[email protected]>
Tested successfully! The build now progresses much further:
The repository now builds successfully on Linux up to the point where Xcode/native tools are required. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@copilot Skip the runtime directory in the top-level Makefile when building on Linux. In fact, skip any directory that requires native compilation by skipping it in the parent directory's Makefile. |
Co-authored-by: rolfbjarne <[email protected]>
Done in commit c5ff867. The |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@copilot Add a CI job/stage to verify that this doesn't regress. |
Co-authored-by: rolfbjarne <[email protected]>
Added in commit e807828. Created a GitHub Actions workflow (
The workflow will fail if any of these Linux build capabilities regress. |
This comment has been minimized.
This comment has been minimized.
|
@copilot next error: |
Co-authored-by: rolfbjarne <[email protected]>
... Fixed in commit 1456993. The error occurred because |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💻 [CI Build #1456993] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
|
@copilot last error: |
Co-authored-by: rolfbjarne <[email protected]>
✅ [CI Build #15c2f11] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #15c2f11] Build passed (Detect API changes) ✅Pipeline on Agent |
|
🔥 Failed to compare API and create generator diff 🔥 ** Error: Working directory isn't clean - check build log for more information. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #15c2f11] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #15c2f11] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #15c2f11] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #15c2f11] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #15c2f11] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
🚀 [CI Build #15c2f11] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 120 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Plan: Enable Building on Linux
system-dependencies.shto skip macOS-only checksMake.configto handle missing Xcode variablesbuilds/Makefilefor Linux compatibility (use CP variable)makeiterates intobuildsandsrc(skipsruntime) ✅Changes Made:
cp -c, create cache directory before useruntimedirectory on Linux (requires native compilation)set -ex, and just verifiesmakesucceedsDotnetGlobals.cs→DotNetGlobals.cssed -iinstead ofsed -i '')Result: Successfully builds on Linux through .NET download and into src/msbuild/tools directories. Fixed multiple case-sensitivity, sed syntax, and git command issues. Skipped all macOS-only native tools, Windows-specific builds, Linux-incompatible validation tools, and native registrar compilation. Simplified CI workflow ensures this doesn't regress.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.