-
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?
Changes from 17 commits
418acdd
d08f626
7d7ff7c
7fcbf2e
c5ff867
e807828
9863bda
e348f28
a21bcfb
a717133
b321c1f
aa692f5
3245a76
5696bcd
17478cd
8e7d97a
1456993
15c2f11
20e527b
47a15c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # yamllint disable rule:line-length rule:document-start rule:truthy | ||
| name: Linux Build Verification | ||
| on: | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| linux-build: | ||
| name: Verify Linux Build | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: 'Checkout' | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: recursive | ||
|
|
||
| - name: Check system dependencies | ||
| run: | | ||
| set -ex | ||
| ./system-dependencies.sh | ||
| - name: Build on Linux | ||
| run: | | ||
| set -ex | ||
| make | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,11 @@ | ||
| include $(TOP)/mk/subdirs.mk | ||
|
|
||
| # Detect if we're building on Linux | ||
| UNAME_S:=$(shell uname -s) | ||
| ifeq ($(UNAME_S),Linux) | ||
| IS_LINUX=1 | ||
| endif | ||
|
|
||
| # Common cURL command: | ||
| # --fail: return an exit code if the connection succeeded, but returned an HTTP error code. | ||
| # --location: follow redirects | ||
|
|
@@ -203,6 +209,7 @@ MACCATALYST_NUGET_VERSION_FULL=$(MACCATALYST_NUGET_VERSION_NO_METADATA)$(NUGET_B | |
| # Xcode version should have both a major and a minor version (even if the minor version is 0) | ||
| XCODE_VERSION=26.2 | ||
| XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_26.2.xip | ||
| ifndef IS_LINUX | ||
| XCODE_DEVELOPER_ROOT=/Applications/Xcode_26.2.0.app/Contents/Developer | ||
| XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist 2>/dev/null || echo " $(shell tput setaf 1 2>/dev/null)The required Xcode ($(XCODE_VERSION)) is not installed in $(basename $(basename $(XCODE_DEVELOPER_ROOT)))$(shell tput sgr0 2>/dev/null)" >&2) | ||
|
|
||
|
|
@@ -224,6 +231,12 @@ endif | |
| # Tell both Xcode and our build logic which Xcode we're using. | ||
| export DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) | ||
| export MD_APPLE_SDK_ROOT=$(abspath $(XCODE_DEVELOPER_ROOT)/../..) | ||
| else | ||
| # On Linux, set placeholder Xcode values | ||
| XCODE_PRODUCT_BUILD_VERSION= | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot the XCODE_VERSION and XCODE_URL variables don't need to be conditioned on Linux.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in commit a21bcfb. |
||
| XCODE_IS_STABLE=true | ||
| XCODE_IS_PREVIEW=false | ||
| endif | ||
|
|
||
| # We don't need to be told there are workload updates | ||
| export DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE=true | ||
|
|
||
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.
Use parallel make to speed it up.
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.
Added parallel make in commit 20e527b. The workflow now runs
make -j$(nproc)to utilize all available CPU cores.