[build] Make it possible to only build Objective-Sharpie.#24788
[build] Make it possible to only build Objective-Sharpie.#24788rolfbjarne merged 3 commits intomainfrom
Conversation
rolfbjarne
commented
Feb 25, 2026
- Add a --only-sharpie option to configure.
- Automatically enable --only-sharpie for the release/sharpie and release-test/only-sharpie branches.
- Cut away parts from the build that don't work when we're not building any platform.
- Ignore tests that don't have the desired platform available.
- For CI, some parts depend on having build artifacts from at least one platform. We now generate those build artifacts for iOS, and use those when no platforms are enabled.
- Enable symbol packages for sharpie, the publishing logic expects symbol packages to be present.
* Add a --only-sharpie option to configure. * Automatically enable --only-sharpie for the release/sharpie and release-test/only-sharpie branches. * Cut away parts from the build that don't work when we're not building any platform. * Ignore tests that don't have the desired platform available. * For CI, some parts depend on having build artifacts from at least one platform. We now generate those build artifacts for iOS, and use those when no platforms are enabled. * Enable symbol packages for sharpie, the publishing logic expects symbol packages to be present.
There was a problem hiding this comment.
Pull request overview
This PR updates the build, CI, and test infrastructure to support a “Sharpie-only” build mode (no Apple platform builds), primarily for the release/sharpie and related branches.
Changes:
- Add/build support for an
--only-sharpie/ONLY_SHARPIEmode and adjust Makefile subdirs accordingly. - Update CI templates/scripts to skip platform-dependent stages/tests when no platforms are enabled, and add fallbacks needed for release/publishing.
- Adjust Sharpie tests and packaging so they can run/publish in the no-platform configuration.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/sharpie/Sharpie.Bind.Tool/Sharpie.Bind.Tool.csproj | Enables symbol inclusion for the Sharpie tool package. |
| tools/sharpie/Makefile | Adjusts packaging/copy behavior for Sharpie tool outputs. |
| tools/devops/automation/templates/tests-stage.yml | Skips macOS test build stage when no platforms are configured. |
| tools/devops/automation/templates/release/vs-insertion-prep.yml | Makes release insertion/publishing resilient when platform builds are skipped. |
| tools/devops/automation/templates/common/configure.yml | Adds support for no-platform test configs and adjusts APIScan matrix persistence. |
| tools/devops/automation/templates/api-diff-stage.yml | Skips API diff generation when no platforms are configured. |
| tools/devops/automation/scripts/bash/install-workloads.sh | Makes artifact copying tolerant of missing .pkg/.zip artifacts. |
| tools/devops/automation/scripts/bash/configure-decisions.sh | Disables Windows tests when no dotnet platforms are enabled. |
| tools/devops/automation/scripts/bash/build-nugets.sh | Changes symbol package collection behavior during CI artifact assembly. |
| tools/devops/automation/scripts/TestConfiguration.psm1 | Adds logic to skip tests when no platforms are enabled unless explicitly allowed. |
| tools/devops/automation/scripts/TestConfiguration.Tests.ps1 | Updates unit tests to validate new no-platform test-matrix behavior. |
| tools/devops/automation/scripts/Governance.psm1 | Filters out empty platform entries when building APIScan configuration. |
| tests/test-libraries/nugets/Makefile | Skips building platform-dependent nuget test libraries when no platforms are enabled. |
| tests/test-libraries/frameworks/Makefile | Guards XCFramework-related targets behind enabled platforms. |
| tests/test-libraries/Makefile | Guards XCFramework build/zip targets behind available XCFramework platforms. |
| tests/sharpie/Sharpie.Bind.Tests/SdkDbTest.cs | Skips Sharpie tests for platforms that are not available in the current configuration. |
| tests/sharpie/Sharpie.Bind.Tests/OnDiskTests.cs | Skips Sharpie tests for platforms that are not available in the current configuration. |
| tests/sharpie/Sharpie.Bind.Tests/ObjectiveCClass.cs | Skips Sharpie tests for platforms that are not available in the current configuration. |
| tests/Makefile | Avoids building test-libraries and related artifacts in Sharpie-only mode. |
| scripts/generate-vs-workload/generate-vs-workload.cs | Handles empty platform lists by providing a fallback manifest build version. |
| dotnet/Makefile | Generates minimal iOS version props in Sharpie-only mode for downstream publishing steps. |
| configure | Adds --only-sharpie and disables all platforms when the option is selected. |
| Makefile | Skips building msbuild subdir in Sharpie-only mode. |
| Make.config | Auto-enables ONLY_SHARPIE for specific branches and disables platform includes in that mode. |
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 #abaa80e] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 11 tests failed, 145 tests passed. Failures❌ monotouch tests (iOS)11 tests failed, 0 tests passed.Failed tests
|
This comment has been minimized.
This comment has been minimized.
- build-nugets.sh: Use 'compgen -G' instead of 'test -f' with glob,
which is unsafe when multiple files match.
- TestConfiguration.psm1: Accept both string and boolean values for
supportsNoPlatforms, since YAML booleans become $true after JSON
conversion.
- configure.yml: Emit empty JSON object '{}' for APISCAN_MATRIX when
no platforms are enabled, so downstream matrix consumers get valid
JSON.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
The APIScan governance stage requires platform-specific variables from the matrix. When no platforms are enabled (ONLY_SHARPIE builds), skip the stage entirely to avoid failures from missing PLATFORM variable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ [CI Build #7c5c0a1] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #7c5c0a1] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #7c5c0a1] Build passed (Build macOS tests) ✅Pipeline on Agent |
🔥 [CI Build #7c5c0a1] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 12 tests failed, 144 tests passed. Failures❌ monotouch tests (iOS)11 tests failed, 0 tests passed.Failed tests
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #7c5c0a1] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 156 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Pipeline on Agent |