Skip to content
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
1ec3737
Enable staged native Bazel builds and validation
Evangelink Oct 29, 2026
22a3f9d
Align Bazel test tuple names with repository conventions
Evangelink Oct 29, 2026
6bc33c4
Expand native Bazel builds, packages, and runtime validation
Evangelink Nov 2, 2026
2d79cf5
Align experimental package versions and isolated validation options
Evangelink Nov 3, 2026
797eb6f
Support native C# reference aliases for Bazel test consumers
Evangelink Nov 3, 2026
7bc60a3
Package MSTest analyzers natively with Bazel
Evangelink Nov 3, 2026
bb3d555
Validate analyzer package preview identities and isolated consumers
Evangelink Nov 3, 2026
67046b4
Add native netstandard platform and MSBuild targets
Evangelink Nov 3, 2026
05c7c92
Emit exact framework metadata for native compatibility assemblies
Evangelink Nov 3, 2026
112c626
Record analyzer package counterfactual evidence
Evangelink Nov 3, 2026
325eca5
Preserve no-op removals in native JSON source selection
Evangelink Nov 3, 2026
1a4d289
Add native MSTest SDK and meta-package generation
Evangelink Nov 3, 2026
256c9f2
Align native SDK package prerelease versions
Evangelink Nov 3, 2026
0a1443c
Isolate inherited MSBuild executable selection in SDK consumers
Evangelink Nov 3, 2026
9036c23
Record native SDK package and sensitivity evidence
Evangelink Nov 3, 2026
11ae3b9
Expand SDK consumer contract and producer provenance checks
Evangelink Nov 3, 2026
99f775b
Resolve independent Bazel consumer SDKs from materialized repositories
Evangelink Nov 3, 2026
bacbfc3
Share exact framework metadata across native compatibility outputs
Evangelink Nov 3, 2026
9c78819
Add native MSTest package layouts and consumer validation
Evangelink Nov 3, 2026
aa8d2d2
Preserve SDK environment isolation in MSTest package consumers
Evangelink Nov 3, 2026
9f900a4
Match native MSTest discovery display names exactly
Evangelink Nov 3, 2026
49f7424
Carry native task runtime assets and isolate package restore
Evangelink Nov 3, 2026
3bd4f87
Expose platform constraints for native adapter package selection
Evangelink Nov 3, 2026
a7e253d
Resolve native platform dependency ranges before packing
Evangelink Nov 3, 2026
960366e
Verify native SDK and meta-package consumer boundaries
Evangelink Nov 3, 2026
aff2cf0
Preserve native public signing and friend assembly identities
Evangelink Nov 3, 2026
e09b5fe
Validate negative consumer failures from their TRX result nodes
Evangelink Nov 3, 2026
4b6fa98
Preserve quoted consumer arguments through MSBuild properties
Evangelink Nov 3, 2026
698f9ba
Prove native MSTest package consumers and satellite sensitivity
Evangelink Nov 3, 2026
3a3d939
Add native netstandard and net462 compatibility variants
Evangelink Nov 3, 2026
633efe3
Add opt-in engineering SDK registration for native Bazel
Evangelink Nov 3, 2026
bc934dc
Record native SDK 12 compiler and explorer evidence
Evangelink Nov 3, 2026
8fa0c6d
Verify bounded and expanded native SDK compiler actions
Evangelink Nov 3, 2026
6562a8a
Record verified SDK 12 package and runtime compatibility
Evangelink Nov 3, 2026
39a9567
Pin isolated native Bazel test dependencies
Evangelink Nov 3, 2026
a6c666d
Run terminal contract and self-real tests natively with Bazel
Evangelink Nov 3, 2026
fe2870b
Record signed SDK 12 package and publisher validation
Evangelink Nov 3, 2026
26b69b3
Record successful signed SDK and meta-package consumers
Evangelink Nov 3, 2026
023ae49
Preserve Arcade source-root paths in native Bazel compilation
Evangelink Nov 3, 2026
abbe8a5
Verify signed native MSTest packages across real runtime consumers
Evangelink Nov 3, 2026
e849263
Document integrated native Bazel packages and compatibility validation
Evangelink Nov 3, 2026
edccfc9
Run aliased platform suites through native Bazel hosts
Evangelink Nov 3, 2026
0f3039a
Add native Windows targeting to experimental Bazel rules
Evangelink Nov 3, 2026
96af2d8
Build native Windows library flavors and app-model controllers
Evangelink Nov 3, 2026
ac7f755
Validate signed compatibility runtime closures
Evangelink Nov 3, 2026
9bb8383
Record signed analyzer refresh contract
Evangelink Nov 3, 2026
48bc17a
Record signed analyzer compiler-host validation
Evangelink Nov 3, 2026
2e461b3
Run existing analyzer tests with a native aligned test host
Evangelink Nov 3, 2026
dcc2e17
Expose all native unit projects and document integrated Windows valid…
Evangelink Nov 3, 2026
c910ab8
Wire existing portable samples and native browser publishing
Evangelink Nov 3, 2026
5b51cb1
Record native AOT boundary and final Bazel preservation evidence
Evangelink Nov 3, 2026
0dcfbd1
Record final integrated Bazel source, consumer, and runtime validation
Evangelink Nov 3, 2026
8b4fd8b
Add an independent Bazel build and test cache dogfood pipeline
Evangelink Nov 4, 2026
9a3d23a
Respect older PowerShell environment semantics in verifier tests
Evangelink Nov 4, 2026
3256890
Merge main to align native Bazel CI with the current source graph
Evangelink Nov 5, 2026
e42e589
Fix native Bazel CI dependency and test-host parity
Evangelink Nov 5, 2026
037269f
Relaunch the compiled adapter trace host without MSBuild evaluation
Evangelink Nov 5, 2026
03e3d35
Handle ANSI-styled output in native Bazel validation
Evangelink Nov 5, 2026
3504d98
Cover central package changes and normalize trace child result paths
Evangelink Nov 5, 2026
dbcd61c
Merge current main for native server-client validation
Evangelink Nov 5, 2026
3431ca7
Align Bazel server-client sources and fixtures with main
Evangelink Nov 5, 2026
d45cf09
Fix heading spacing in Bazel validation notes
Evangelink Nov 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.dotnet
.packages
artifacts
packages
11 changes: 11 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
startup --windows_enable_symlinks
common --enable_bzlmod
common --enable_runfiles
common --incompatible_strict_action_env
build --@rules_dotnet//dotnet:target_framework=net10.0
# Preserve SDK-style transitive ProjectReference/PackageReference compilation.
build --@rules_dotnet//dotnet/settings:strict_deps=false
build --verbose_failures
test --test_output=errors

try-import %workspace%/.bazelrc.local
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9.1.1
63 changes: 63 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Experimental Bazel build

on:
pull_request:
paths:
- '.bazel*'
- 'BUILD.bazel'
- 'MODULE.bazel*'
- 'Directory.Packages.props'
- 'eng/bazel.ps1'
- 'eng/bazel/**'
- 'eng/Versions.props'
Comment thread
Evangelink marked this conversation as resolved.
Resolved
- '.editorconfig'
- 'src/**'
- 'test/**'
- 'samples/public/mstest-runner/Simple1/**'
- 'samples/public/TestingPlatformExamples/TestingPlatformExplorer/**'
- '.github/workflows/bazel.yml'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: bazel-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
baseline:
name: Native Bazel matrix (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Build, test, and validate native consumers
shell: pwsh
run: .\eng\bazel\validate.ps1
- name: Validate native packages and self-contained runtimes
shell: pwsh
run: .\eng\bazel\validate-packages.ps1
- name: Preserve native build evidence
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: bazel-${{ matrix.os }}
path: |
artifacts/bazel-validation/
artifacts/bazel-package-validation/**/*.log
artifacts/bazel-package-validation/**/*.json
artifacts/bazel-package-validation/**/*.binlog
artifacts/bazel-package-validation/**/*.trx
artifacts/bazel-package-validation/**/feed/*.nupkg
if-no-files-found: warn
- name: Stop the worktree's Bazel server
if: always()
shell: pwsh
run: .\eng\bazel.ps1 shutdown
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ ehthumbs.db
/.dotnet/
/TestAssets/

# Bazel output symlinks/junctions and local overrides
/bazel-*/
/.bazelrc.local

# Lean build artifacts
.lake/

Expand Down
290 changes: 290 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,290 @@
load("@rules_dotnet//dotnet:defs.bzl", "csharp_binary")
load("//eng/bazel:analyzer-packages.bzl", "analyzer_packages")
load("//eng/bazel:analyzer-tests.bzl", "analyzer_unit_tests")
load("//eng/bazel:analyzers.bzl", "analyzer_libraries")
load("//eng/bazel:compatibility-tests.bzl", "compatibility_reference_tests")
load("//eng/bazel:compatibility.bzl", "compatibility_libraries")
load("//eng/bazel:defs.bzl", "testfx_binary", "testfx_matrix", "testfx_test")
load("//eng/bazel:extension-tests.bzl", "extension_unit_tests")
load("//eng/bazel:extensions.bzl", "extension_libraries")
load("//eng/bazel:extra-tests.bzl", "extra_unit_tests")
load("//eng/bazel:mstest-packages.bzl", "native_mstest_packages")
load("//eng/bazel:mstest.bzl", "mstest_libraries")
load("//eng/bazel:packages.bzl", "native_packages")
load("//eng/bazel:platform.bzl", "platform_libraries")
load("//eng/bazel:reference-alias-tests.bzl", "reference_alias_tests")
load("//eng/bazel:sdk-packages.bzl", "sdk_packages")
load("//eng/bazel:server-client.bzl", "server_client_library")
load("//eng/bazel:samples.bzl", "portable_samples")
load("//eng/bazel:tests.bzl", "unit_tests")
load("//eng/bazel:windows.bzl", "windows_libraries")
load("//eng/bazel/windows:asset_selection_tests.bzl", "windows_asset_selection_tests")
load("//eng/bazel/windows:targeting_tests.bzl", "windows_targeting_test")

package(default_visibility = ["//visibility:public"])

exports_files(["LICENSE"])

platform_libraries()

mstest_libraries()

extension_libraries()

analyzer_libraries()

analyzer_packages()

server_client_library()

compatibility_libraries()

compatibility_reference_tests()

unit_tests()

extra_unit_tests()

extension_unit_tests()

analyzer_unit_tests()

native_packages()

portable_samples()

reference_alias_tests()

native_mstest_packages()

sdk_packages()

windows_libraries()

windows_asset_selection_tests()

windows_targeting_test(
name = "windows_targeting_test",
size = "small",
)

filegroup(
name = "managed",
srcs = [
":adapter",
":ai",
":analyzers",
":assert_generator",
":azdo_report",
":azure_foundry",
":codefixes",
":configuration",
":crashdump",
":ctrf",
":framework",
":framework_extensions",
":github_report",
":globalconfigs_generator",
":hangdump",
":hosting",
":hotreload",
":html",
":junit",
":logging",
":msbuild_extension",
":mstest_generator",
":mstest_hosting",
":opentelemetry",
":packaged_app",
":platform",
":platform_msbuild",
":platform_services",
":retry",
":server_client",
":telemetry",
":trx",
":trx_abstractions",
":video",
":vstest_bridge",
],
)

testfx_matrix(
name = "managed_all",
target = ":managed",
)

# Short executable labels avoid Windows' doubled runfiles batch-file paths.
# The other explorer cases intentionally demonstrate failures and skips.
csharp_binary(
name = "explorer_released",
srcs = ["//samples/public/TestingPlatformExamples/TestingPlatformExplorer:sources"],
out = "TestingPlatformExplorer",
appsetting_files = ["//samples/public/TestingPlatformExamples/TestingPlatformExplorer:TestingPlatformExplorer.testingplatformconfig.json"],
generate_documentation_file = False,
langversion = "preview",
nullable = "enable",
target_frameworks = ["net10.0"],
deps = [
"@paket.main//microsoft.testing.extensions.trxreport",
"@paket.main//microsoft.testing.extensions.trxreport.abstractions",
"@paket.main//microsoft.testing.platform",
],
)

csharp_binary(
name = "explorer",
srcs = ["//samples/public/TestingPlatformExamples/TestingPlatformExplorer:sources"],
out = "TestingPlatformExplorer",
appsetting_files = ["//samples/public/TestingPlatformExamples/TestingPlatformExplorer:TestingPlatformExplorer.testingplatformconfig.json"],
generate_documentation_file = False,
langversion = "preview",
nullable = "enable",
target_frameworks = ["net10.0"],
deps = [
":platform",
":trx",
":trx_abstractions",
],
)

testfx_test(
name = "explorer_test",
size = "small",
args = [
"--filter-uid",
"TestingPlatformExplorer.UnitTests.SomeTests.TestMethod1",
],
binary = ":explorer",
)

testfx_test(
name = "explorer_released_test",
size = "small",
args = [
"--filter-uid",
"TestingPlatformExplorer.UnitTests.SomeTests.TestMethod1",
],
binary = ":explorer_released",
)

testfx_binary(
name = "simple1",
defines = ["TESTFX_REPORTS"],
generate_documentation_file = False,
linked_srcs = ["//eng/bazel:TestMain.cs"],
polyfills = False,
project = "samples/public/mstest-runner/Simple1",
deps = [
":adapter",
":ctrf",
":framework",
":framework_extensions",
":html",
":junit",
":trx",
],
)

testfx_test(
name = "simple1_test",
size = "small",
args = [
"--minimum-expected-tests",
"1",
],
binary = ":simple1",
)

testfx_binary(
name = "framework_tests_app",
assembly_name = "Microsoft.VisualStudio.TestPlatform.TestFramework.UnitTests",
defines = ["TESTFX_INTERNAL_TESTS"],
exclude = ["test/UnitTests/TestFramework.UnitTests/Program.cs"],
generate_documentation_file = False,
linked_srcs = [
"//eng/bazel:TestMain.cs",
"test/Utilities/DiagnosticAssertionObserver.cs",
],
project = "test/UnitTests/TestFramework.UnitTests",
deps = [
":assert_generator",
":framework",
":framework_extensions",
":internal_test_framework",
":trx",
"@paket.source//awesomeassertions",
"@paket.source//moq",
"@paket.generator//microsoft.codeanalysis.csharp",
],
)

testfx_test(
name = "framework_tests",
size = "medium",
args = [
"--minimum-expected-tests",
"1",
],
binary = ":framework_tests_app",
)

testfx_test(
name = "explorer_failure_probe",
size = "small",
args = [
"--filter-uid",
"TestingPlatformExplorer.UnitTests.SomeTests.TestMethod2",
],
binary = ":explorer",
tags = ["manual"],
)

_PORTABLE_BASELINE_TESTS = [
":adapter_tests",
":build_tools_tests",
":explorer_released_test",
":explorer_test",
":framework_tests",
":simple1_test",
]

_PORTABLE_CONTRACT_TESTS = [
":protocol_contract_tests",
":source_generation_tests",
":vstest_bridge_tests",
]

test_suite(
name = "baseline_tests",
tests = _PORTABLE_BASELINE_TESTS + [":platform_services_tests"],
)

test_suite(
name = "portable_tests",
tests = [":baseline_tests"] + _PORTABLE_CONTRACT_TESTS,
)

test_suite(
name = "portable_non_windows_tests",
tests = _PORTABLE_BASELINE_TESTS + _PORTABLE_CONTRACT_TESTS,
)

test_suite(
name = "all_unit_tests",
tests = [
":adapter_tests",
":analyzer_tests",
":extension_tests",
":framework_tests",
":msbuild_tests",
":platform_services_tests",
":platform_tests",
":protocol_contract_tests",
":self_real_tests",
":server_client_tests",
":source_generation_tests",
":terminal_contract_tests",
":vstest_bridge_tests",
],
)
Loading
Loading