diff --git a/docs/workflow/README.md b/docs/workflow/README.md index ed7e1ec23712b6..57c10f7a9d472d 100644 --- a/docs/workflow/README.md +++ b/docs/workflow/README.md @@ -38,7 +38,7 @@ build -h On Unix like systems, arguments can be passed in with a single `-` or double hyphen `--`. The repository currently consists of different major parts: the runtimes, the libraries, and the installer. -To build just one part you use the root build script (build.cmd/sh), and you add the `-subsetCategory` flag. +To build just one part you use the root build script (build.cmd/sh), and you add the `-subset` flag. ## Configurations diff --git a/docs/workflow/building/coreclr/README.md b/docs/workflow/building/coreclr/README.md index 8427a61aa0d0a5..c00d90a9799ac1 100644 --- a/docs/workflow/building/coreclr/README.md +++ b/docs/workflow/building/coreclr/README.md @@ -1,25 +1,25 @@ # Building -To build just CoreCLR, use the `-subsetCategory` flag to the `build.sh` (or `build.cmd`) script at the repo root: +To build just CoreCLR, use the `-subset` flag to the `build.sh` (or `build.cmd`) script at the repo root: For Linux: ``` -./build.sh -subsetCategory coreclr +./build.sh -subset clr ``` For Windows: ``` -build.cmd -subsetCategory coreclr +build.cmd -subset clr ``` By default, build generates a 'debug' build type, that includes asserts and is easier for some people to debug. If you want to make performance measurements, or just want tests to execute more quickly, you can also build the 'release' version (which does not have these checks) by adding the flag `-configuration release` (or `-c release`), for example: ``` -./build.sh -subsetCategory coreclr -configuration release +./build.sh -subset clr -configuration release ``` CoreCLR also supports a 'checked' build type which has asserts enabled like 'debug', but is built with the native compiler optimizer enabled, so it runs much faster. This is the usual mode used for running tests in the CI system. You can build that using, for example: ``` -./build.sh -subsetCategory coreclr -configuration checked +./build.sh -subset clr -configuration checked ``` This will produce outputs as follows: diff --git a/docs/workflow/building/coreclr/cross-building.md b/docs/workflow/building/coreclr/cross-building.md index 438d6acfe898bf..ef2eab62d3243a 100644 --- a/docs/workflow/building/coreclr/cross-building.md +++ b/docs/workflow/building/coreclr/cross-building.md @@ -13,7 +13,7 @@ Cross compiling CoreCLR Build using "arm" as the architecture. For example: - C:\runtime> build.cmd -subsetCategory CoreClr -subset Runtime -arch arm -c debug + C:\runtime> build.cmd -subset clr.runtime -arch arm -c debug -or- @@ -101,7 +101,7 @@ Cross compiling CoreCLR ----------------------- `ROOTFS_DIR` must be set when running `build-runtime.sh`. - ~/runtime/ $ ROOTFS_DIR=/home/arm ./build.sh --subsetCategory CoreClr --subset Runtime --arch arm -c debug -v verbose --cross + ~/runtime/ $ ROOTFS_DIR=/home/arm ./build.sh --subset clr.runtime --arch arm -c debug -v verbose --cross -or- @@ -144,7 +144,7 @@ The following instructions assume you are on a Linux machine such as Ubuntu 14.0 To build System.Private.CoreLib for Linux, run the following command: ``` - lgs@ubuntu ~/git/runtime/ $ ./build.sh --subsetCategory CoreClr --subset CoreLib-NativeCoreLib --arch arm -c debug -v verbose + lgs@ubuntu ~/git/runtime/ $ ./build.sh --subset clr.corelib+clr.nativecorelib --arch arm -c debug -v verbose ``` The output is at `artifacts/bin/coreclr/.arm.Debug/IL/System.Private.CoreLib.dll`. diff --git a/docs/workflow/building/coreclr/linux-instructions.md b/docs/workflow/building/coreclr/linux-instructions.md index ee0e4fdb4e6c39..06977543d9d57b 100644 --- a/docs/workflow/building/coreclr/linux-instructions.md +++ b/docs/workflow/building/coreclr/linux-instructions.md @@ -127,7 +127,7 @@ Build the Runtime and System.Private.CoreLib To build the runtime on Linux, run build.sh to build the CoreCLR subset category of the runtime: ``` -./build.sh -subsetCategory coreclr +./build.sh -subset clr ``` After the build is completed, there should some files placed in `artifacts/bin/coreclr/Linux.x64.Debug`. The ones we are most interested in are: diff --git a/docs/workflow/building/coreclr/osx-instructions.md b/docs/workflow/building/coreclr/osx-instructions.md index 9be2f9c90b3893..ddcaeda8eb3c35 100644 --- a/docs/workflow/building/coreclr/osx-instructions.md +++ b/docs/workflow/building/coreclr/osx-instructions.md @@ -46,7 +46,7 @@ Build the Runtime and System.Private.CoreLib To Build CoreCLR, run build.sh to build the CoreCLR subset category of the runtime: ``` -./build.sh -subsetCategory coreclr +./build.sh -subset clr ``` After the build has completed, there should some files placed in `artifacts/bin/coreclr/OSX.x64.Debug`. The ones we are interested in are: diff --git a/docs/workflow/building/libraries/README.md b/docs/workflow/building/libraries/README.md index eecbcfe337c96d..d3d463aa4a3201 100644 --- a/docs/workflow/building/libraries/README.md +++ b/docs/workflow/building/libraries/README.md @@ -9,7 +9,7 @@ Here is one example of a daily workflow for a developer working mainly on the li git clean -xdf git pull upstream master & git push origin master :: Build Debug libraries on top of Release runtime: -build -subsetCategory coreclr-libraries -runtimeConfiguration Release +build -subset clr+libs -runtimeConfiguration Release :: The above you may only perform once in a day, or when you pull down significant new changes. :: If you use Visual Studio, you might open System.Text.RegularExpressions.sln here. @@ -33,7 +33,7 @@ The instructions for Linux and macOS are essentially the same: git clean -xdf git pull upstream master & git push origin master # Build Debug libraries on top of Release runtime: -./build.sh -subsetCategory coreclr-libraries -runtimeconfiguration Release +./build.sh -subset clr+libs -runtimeconfiguration Release # The above you may only perform once in a day, or when you pull down significant new changes. # Switch to working on a given library (RegularExpressions in this case) @@ -83,33 +83,28 @@ For more details on the build settings see [project-guidelines](../../../coding- If you invoke the `build` script without any actions, the default action chain `-restore -build` is executed. -By default the `build` script only builds the product libraries and none of the tests. If you want to include tests, you want to add the subset `-subset libtests`. If you want to run the tests you want to use the `-test` action instead of the `-build`, e.g. `build.cmd/sh -subsetcategory libraries -test`. To specify just the libraries, use `-subcategory libraries`. +By default the `build` script only builds the product libraries and none of the tests. If you want to include tests, you want to add the subset `-subset libtests`. If you want to run the tests you want to use the `-test` action instead of the `-build`, e.g. `build.cmd/sh -subset libs.tests -test`. To specify just the libraries, use `-subset libs`. **Examples** - Building in release mode for platform x64 (restore and build are implicit here as no actions are passed in) ```bash -./build.sh -subsetCategory libraries -c Release -arch x64 +./build.sh -subset libs -c Release -arch x64 ``` - Building the src assemblies and build and run tests (running all tests takes a considerable amount of time!) ```bash -./build.sh -subsetCategory libraries -restore -build -test +./build.sh -subset libs -test ``` - Building for different target frameworks (restore and build are implicit again as no action is passed in) ```bash -./build.sh -subsetCategory libraries -framework netcoreapp5.0 -./build.sh -subsetCategory libraries -framework net472 -``` - -- Build only managed components and skip the native build -```bash -./build.sh -subsetCategory libraries /p:BuildNative=false +./build.sh -subset libs -framework netcoreapp5.0 +./build.sh -subset libs -framework net472 ``` - Clean the entire solution ```bash -./build.sh -subsetCategory libraries -clean +./build.sh -clean ``` For Windows, replace `./build.sh` with `build.cmd`. @@ -141,17 +136,17 @@ Similar to building the entire repo with `build.cmd` or `build.sh` in the root y - Build all projects for a given library (e.g.: System.Collections) including running the tests ```bash - ./build.sh -subsetCategory libraries src/libraries/System.Collections + ./build.sh -projects src/libraries/*/System.Collections.sln ``` - Build just the tests for a library project ```bash - ./build.sh -subsetCategory libraries src/libraries/System.Collections/tests + ./build.sh -projects src/libraries/System.Collections/tests/*.csproj ``` - All the options listed above like framework and configuration are also supported (note they must be after the directory) ```bash - ./build.sh -subsetCategory libraries System.Collections -f net472 -c Release + ./build.sh -projects src/libraries/*/System.Collections.sln -f net472 -c Release ``` As `dotnet build` works on both Unix and Windows and calls the restore target implicitly, we will use it throughout this guide. @@ -185,24 +180,24 @@ dotnet build -c Release System.Net.NetworkInformation.csproj By default the libraries will attempt to build using the CoreCLR version of `System.Private.CoreLib.dll`. In order to build against the Mono version you need to use the `/p:RuntimeFlavor=Mono` argument. ``` -.\build.cmd -subsetCategory libraries /p:RuntimeFlavor=Mono +.\build.cmd -subset libs /p:RuntimeFlavor=Mono ``` ### Building all for other OSes By default, building from the root will only build the libraries for the OS you are running on. One can -build for another OS by specifying `./build.sh -subsetCategory libraries -os [value]`. +build for another OS by specifying `./build.sh -subset libs -os [value]`. Note that you cannot generally build native components for another OS but you can for managed components so if you need to do that you can do it at the individual project level or build all via passing `/p:BuildNative=false`. ### Building in Release or Debug By default, building from the root or within a project will build the libraries in Debug mode. -One can build in Debug or Release mode from the root by doing `./build.sh -subsetCategory libraries -c Release` or `./build.sh -subsetCategory libraries -c Debug`. +One can build in Debug or Release mode from the root by doing `./build.sh -subset libs -c Release` or `./build.sh -subset libs -c Debug`. ### Building other Architectures -One can build 32- or 64-bit binaries or for any architecture by specifying in the root `./build.sh -subsetCategory libraries -arch [value]` or in a project `/p:TargetArchitecture=[value]` after the `dotnet build` command. +One can build 32- or 64-bit binaries or for any architecture by specifying in the root `./build.sh -subset libs -arch [value]` or in a project `/p:TargetArchitecture=[value]` after the `dotnet build` command. ## Working in Visual Studio diff --git a/docs/workflow/building/mono/README.md b/docs/workflow/building/mono/README.md index 020173a3f052bf..a7cfa158e03e07 100644 --- a/docs/workflow/building/mono/README.md +++ b/docs/workflow/building/mono/README.md @@ -15,11 +15,11 @@ Note that the debug configuration is the default option. It generates a 'debug' Once you've built the whole runtime and assuming you want to work with just mono, you want to use the following command: ```bash -./build.sh --subsetCategory mono +./build.sh --subset mono ``` or on Windows, ```bat -build.cmd -subsetCategory mono +build.cmd -subset mono ``` When the build completes, product binaries will be dropped in the `artifacts\bin\mono\..` folder. @@ -44,11 +44,11 @@ The build has a number of options that you can learn about using build -?. To generate nuget packages: ```bash -./build.sh --subsetCategory mono -pack (with optional release configuration) +./build.sh --subset mono -pack (with optional release configuration) ``` or on Windows, ```bat -build.cmd -subsetCategory mono -pack (with optional release configuration) +build.cmd -subset mono -pack (with optional release configuration) ``` The following packages will be created under `artifacts\packages\\Shipping`: diff --git a/docs/workflow/testing/libraries/testing.md b/docs/workflow/testing/libraries/testing.md index 5a2228f277208c..a221d849330c64 100644 --- a/docs/workflow/testing/libraries/testing.md +++ b/docs/workflow/testing/libraries/testing.md @@ -7,28 +7,28 @@ To build the tests and run them you can call the libraries build script. **Examples** - The following shows how to build only the tests but not run them: ``` -libraries -subset libtests +build.cmd/sh -subset libs.tests ``` - The following builds and runs all tests in release configuration: ``` -libraries -test -c Release +build.cmd/sh -subset libs -test -c Release ``` - The following example shows how to pass extra msbuild properties to ignore tests ignored in CI: ``` -libraries -test /p:WithoutCategories=IgnoreForCI +build.cmd/sh -subset libs -test /p:WithoutCategories=IgnoreForCI ``` Unless you specifiy `-testnobuild`, test assemblies are implicitly built when invoking the `Test` action. - The following shows how to only test the libraries without building them ``` -libraries -test -testnobuild +build.cmd/sh -subset libs -test -testnobuild ``` ## Running tests on the command line -To build tests you need to specify the `test` subset when invoking build.cmd/sh: `libraries -subset libtests`. +To build tests you need to specify the `test` subset when invoking build.cmd/sh: `build.cmd/sh -subset libs.tests`. The easiest (and recommended) way to build and run the tests for a specific library, is to invoke the `Test` target on that library: ```cmd diff --git a/eng/SubsetValidation.targets b/eng/SubsetValidation.targets index deca513d3f4cc4..293cbfd455dff8 100644 --- a/eng/SubsetValidation.targets +++ b/eng/SubsetValidation.targets @@ -15,7 +15,7 @@ - + @@ -29,9 +29,7 @@ - - - + diff --git a/eng/Subsets.props b/eng/Subsets.props index 298555f95fe2e7..135e0e59038e4d 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -5,31 +5,20 @@ situations, you should perform a full build by running 'build.cmd' or './build.sh'. This ensures the projects are sequenced correctly so the outputs and test results are what you would expect. - If you know you only want to run a subset of the build, however, use the Subset property. - - Syntax: - - (build.cmd/sh) /p:Subset=(-)* - - - For a description of each subset, use '/p:Subset=help'. - - Subset names are case insensitive. - - 'Subset' is case insensitive. (That is, '/p:subset' works.) - - Order doesn't affect the result. - Examples: - ./build.sh /p:Subset=CoreHost + ./build.sh CoreHost This builds only the .NET Core Host. - ./build.sh /p:Subset=CoreHost-Managed + ./build.sh corehost installer.managed - This builds the CoreHost and also the Managed (e.g. Microsoft.DotNet.PlatformAbstractions) - projects. A '-' is the delimiter between multiple subsets to build. + This builds the CoreHost and also the Managed installer portion (e.g. Microsoft.DotNet.PlatformAbstractions) + projects. A space ' ' or '+' are the delimiters between multiple subsets to build. - ./build.sh -test /p:Subset=Test + ./build.sh -test installer.tests - This builds and executes the test projects. (The '-test' argument is an Arcade SDK argument + This builds and executes the installer test projects. (The '-test' argument is an Arcade SDK argument that indicates tests should be run. Otherwise, they'll only be built.) Quirks: @@ -48,75 +37,76 @@ --> - libraries-installer-coreclr-mono - libraries-installer-mono + clr+mono+libs+installer + mono+libs+installer - runtime-linuxdac-corelib-nativecorelib-tools-packages + clr.runtime+linuxdac+clr.corelib+clr.nativecorelib+clr.tools+clr.packages - llvm- - $(DefaultMonoSubsets)runtime-corelib + mono.llvm+ + $(DefaultMonoSubsets)mono.runtime+mono.corelib - depprojs-native-ref-src-pretest-packages - $(DefaultLibrariesSubsets)-libtests + libs.depprojs+libs.native+libs.ref+libs.src+libs.pretest+libs.packages - corehost-managed-depproj-pkgproj-bundle-installers-test - depproj-pkgproj + corehost+installer.managed+installer.depprojs+installer.pkgprojs+bundles+installers+installer.tests + installer.depprojs+installer.pkgprojs - <_subsetCategory Condition="'$(SubsetCategory)' != ''">$(SubsetCategory.ToLowerInvariant()) - <_subsetCategory Condition="'$(SubsetCategory)' == ''">$(DefaultSubsetCategories) - <_subset Condition="'$(Subset)' != ''">$(Subset.ToLowerInvariant()) - <_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('libraries'))">$(DefaultLibrariesSubsets) - <_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('installer'))">$(_subset)-$(DefaultInstallerSubsets) - <_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('coreclr'))">$(_subset)-$(DefaultCoreClrSubsets) - <_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('mono'))">$(_subset)-$(DefaultMonoSubsets) + <_subset Condition="'$(Subset)' != ''">+$(Subset.ToLowerInvariant())+ + <_subset Condition="'$(Subset)' == ''">+$(DefaultSubsets)+ + <_subset>$(_subset.Replace('+clr+', '+$(DefaultCoreClrSubsets)+')) + <_subset>$(_subset.Replace('+mono+', '+$(DefaultMonoSubsets)+')) + <_subset>$(_subset.Replace('+libs+', '+$(DefaultLibrariesSubsets)+')) + <_subset>$(_subset.Replace('+installer+', '+$(DefaultInstallerSubsets)+')) - <_subset>-$(_subset)- + <_subset>+$(_subset.Trim('+'))+ Mono - Mono + Mono CoreCLR - - - - - - - - - - - - - - - - + + + + + + + + - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + @@ -150,27 +140,27 @@ - + - + - + - + - + - + @@ -178,67 +168,67 @@ - + - + - + - + - + Configuration=$(LibrariesConfiguration) - + - + - + - + - + - + - + - + - + @@ -246,25 +236,25 @@ - + - + - + - + @@ -274,7 +264,7 @@ - + diff --git a/eng/build.ps1 b/eng/build.ps1 index 17c61ae492d9ec..363c76645e8ad5 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -11,8 +11,7 @@ Param( [string]$testscope, [switch]$testnobuild, [string[]][Alias('a')]$arch = @([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant()), - [string]$subsetCategory, - [string]$subset, + [Parameter(Position=0)][string]$subset, [ValidateSet("Debug","Release","Checked")][string]$runtimeConfiguration, [ValidateSet("Debug","Release")][string]$librariesConfiguration, [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties @@ -21,7 +20,6 @@ Param( function Get-Help() { Write-Host "Common settings:" Write-Host " -subset Build a subset, print available subsets with -subset help" - Write-Host " -subsetCategory Build a subsetCategory, print available subsetCategories with -subset help" Write-Host " -vs Open the solution with VS for Test Explorer support. Path or solution name (ie -vs Microsoft.CSharp)" Write-Host " -os Build operating system: Windows_NT or Unix" Write-Host " -arch Build platform: x86, x64, arm or arm64 (short: -a). Pass a comma-separated list to build for multiple architectures." @@ -61,8 +59,6 @@ if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $ exit 0 } -$subsetCategory = $subsetCategory.ToLowerInvariant() - # VS Test Explorer support for libraries if ($vs) { . $PSScriptRoot\common\tools.ps1 @@ -124,20 +120,6 @@ if (!$actionPassedIn) { $arguments = "-restore -build" } -$solutionLeaf = if($properties.Length -gt 0) { $properties[0]; } else { $null } - -if ($null -ne $solutionLeaf) { - if (Test-Path $solutionLeaf) { - $properties[0] = "-projects $(Resolve-Path $solutionLeaf)" - } - else { - $dtb = Join-Path "$PSSCriptRoot\..\src\libraries" $solutionLeaf | Join-Path -ChildPath "$solutionLeaf.sln" - if (Test-Path $dtb) { - $properties[0] = "-projects $(Resolve-Path $dtb)" - } - } -} - foreach ($argument in $PSBoundParameters.Keys) { switch($argument) @@ -177,4 +159,4 @@ if ($failedBuilds.Count -ne 0) { exit 1 } -exit 0 +exit 0 \ No newline at end of file diff --git a/eng/build.sh b/eng/build.sh index 56a095edb829ec..0a9feb9b775166 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -18,12 +18,12 @@ usage() { echo "Common settings:" echo " --subset Build a subset, print available subsets with -subset help" - echo " --subsetCategory Build a subsetCategory, print available subsetCategories with -subset help" echo " --os Build operating system: Windows_NT, Linux, FreeBSD, OSX, tvOS, iOS or Android" echo " --arch Build platform: x86, x64, arm, armel or arm64" echo " --configuration Build configuration: Debug, Release or [CoreCLR]Checked (short: -c)" echo " --runtimeConfiguration Runtime build configuration: Debug, Release or [CoreCLR]Checked" echo " --librariesConfiguration Libraries build configuration: Debug or Release" + echo " --projects Project or solution file(s) to build" echo " --verbosity MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)" echo " --binaryLog Output binary log (short: -bl)" echo " --cross Optional argument to signify cross compilation" @@ -82,9 +82,6 @@ initDistroRid() arguments='' cmakeargs='' extraargs='' -build=false -subsetCategory='' -checkedSolutionBuild=false crossBuild=0 source $scriptroot/native/init-os-and-arch.sh @@ -100,11 +97,6 @@ while [[ $# > 0 ]]; do usage exit 0 ;; - -subsetcategory) - subsetCategory="$(echo "$2" | awk '{print tolower($0)}')" - arguments="$arguments /p:SubsetCategory=$subsetCategory" - shift 2 - ;; -subset) arguments="$arguments /p:Subset=$2" shift 2 @@ -132,11 +124,6 @@ while [[ $# > 0 ]]; do arguments="$arguments /p:BuildAllConfigurations=true" shift 1 ;; - -build) - build=true - arguments="$arguments -build" - shift 1 - ;; -testscope) arguments="$arguments /p:TestScope=$2" shift 2 @@ -176,19 +163,7 @@ while [[ $# > 0 ]]; do shift 1 ;; *) - ea=$1 - - if [[ $checkedSolutionBuild == false ]]; then - checkedSolutionBuild=true - - if [[ -d "$1" ]]; then - ea="-projects $1" - elif [[ -d "$scriptroot/../src/libraries/$1/$1.sln" ]]; then - ea="-projects $scriptroot/../src/libraries/$1/$1.sln" - fi - fi - - extraargs="$extraargs $ea" + extraargs="$extraargs $1" shift 1 ;; esac diff --git a/eng/docker/build-docker-sdk.ps1 b/eng/docker/build-docker-sdk.ps1 index c1669d6ef11216..ed0181887c1480 100755 --- a/eng/docker/build-docker-sdk.ps1 +++ b/eng/docker/build-docker-sdk.ps1 @@ -19,7 +19,7 @@ if ($buildWindowsContainers) # Due to size concerns, we don't currently do docker builds on windows. # Build on the host machine, then simply copy artifacts to the target docker image. # This should result in significantly lower build times, for now. - & "$REPO_ROOT_DIR/build.cmd" -ci -subsetcategory coreclr-libraries -runtimeconfiguration release -c $configuration + & "$REPO_ROOT_DIR/build.cmd" -ci -subset clr+libs -runtimeconfiguration release -c $configuration # Dockerize the build artifacts if($privateAspNetCore) diff --git a/eng/docker/libraries-sdk.linux.Dockerfile b/eng/docker/libraries-sdk.linux.Dockerfile index fce6381e71028a..bbfaef49a39d12 100644 --- a/eng/docker/libraries-sdk.linux.Dockerfile +++ b/eng/docker/libraries-sdk.linux.Dockerfile @@ -8,7 +8,7 @@ WORKDIR /repo COPY . . ARG CONFIGURATION=Release -RUN ./build.sh -ci -subsetcategory coreclr-libraries -runtimeconfiguration release -c $CONFIGURATION +RUN ./build.sh -ci -subset clr+libs -runtimeconfiguration release -c $CONFIGURATION FROM $SDK_BASE_IMAGE as target diff --git a/eng/pipelines/coreclr/templates/build-corelib-job.yml b/eng/pipelines/coreclr/templates/build-corelib-job.yml index bfb91cb4d9095d..b846bb3d0cb099 100644 --- a/eng/pipelines/coreclr/templates/build-corelib-job.yml +++ b/eng/pipelines/coreclr/templates/build-corelib-job.yml @@ -84,7 +84,7 @@ jobs: installDotnet: true # Build Private CoreLib - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subsetCategory coreclr -subset corelib $(crossArg) -arch $(archType) -c $(buildConfig) $(officialBuildIdArg) -ci + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib $(crossArg) -arch $(archType) -c $(buildConfig) $(officialBuildIdArg) -ci displayName: Build System.Private.CoreLib diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index c20d4fb300bdf3..d59b8da6a1fb2e 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -137,7 +137,7 @@ jobs: displayName: Build Cross OS Linux DAC for Windows # Build CoreCLR Managed Components - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subsetCategory coreclr -subset corelib-nativecorelib-tools-packages $(crossArg) -arch $(archType) -c $(buildConfig) $(officialBuildIdArg) -ci + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.corelib+clr.nativecorelib+clr.tools+clr.packages $(crossArg) -arch $(archType) -c $(buildConfig) $(officialBuildIdArg) -ci displayName: Build managed product components and packages # Build native test components diff --git a/eng/pipelines/global-build.yml b/eng/pipelines/global-build.yml index eeac5e708a53a5..8006c888ee00c2 100644 --- a/eng/pipelines/global-build.yml +++ b/eng/pipelines/global-build.yml @@ -91,4 +91,4 @@ jobs: jobParameters: testGroup: innerloop nameSuffix: Mono_Libraries - buildArgs: -subsetCategory libraries-mono /p:RuntimeFlavor=Mono \ No newline at end of file + buildArgs: -subset mono+libs /p:RuntimeFlavor=Mono \ No newline at end of file diff --git a/eng/pipelines/installer/jobs/base-job.yml b/eng/pipelines/installer/jobs/base-job.yml index ca4f9536f9a2e9..acc8c930dd848e 100644 --- a/eng/pipelines/installer/jobs/base-job.yml +++ b/eng/pipelines/installer/jobs/base-job.yml @@ -106,7 +106,7 @@ jobs: - name: BaseJobBuildCommand value: >- - build.cmd -subsetcategory installer -restore -build -test -ci + build.cmd -subset installer -test -ci -configuration $(_BuildConfig) $(LiveOverridePathArgs) $(CommonMSBuildArgs) @@ -121,7 +121,7 @@ jobs: - name: BaseJobBuildCommand value: >- - $(Build.SourcesDirectory)/build.sh -subsetcategory installer -restore -build -test -ci + $(Build.SourcesDirectory)/build.sh -subset installer -test -ci -configuration $(_BuildConfig) $(LiveOverridePathArgs) $(CommonMSBuildArgs) @@ -136,7 +136,7 @@ jobs: - name: BaseJobBuildCommand value: >- - $(Build.SourcesDirectory)/build.sh -subsetcategory installer --restore --build --ci --test + $(Build.SourcesDirectory)/build.sh -subset installer --ci --test -configuration $(_BuildConfig) -os ${{ parameters.osGroup }} -arch ${{ parameters.archType }} @@ -175,7 +175,7 @@ jobs: - ${{ if eq(parameters.isOfficialBuild, true) }}: - name: BuildScript - value: ./eng/install-nuget-credprovider-then-build.sh --subsetCategory installer + value: ./eng/install-nuget-credprovider-then-build.sh --subset installer - name: MSBuildScript value: /root/runtime/eng/install-nuget-credprovider-then-msbuild.sh @@ -198,7 +198,7 @@ jobs: - name: BuildArguments value: >- - -subsetcategory installer -restore -build -test -ci + -subset installer -test -ci /p:CrossBuild=${{ ne(parameters.crossrootfsDir, '') }} /p:PortableBuild=$(_PortableBuild) /p:SkipTests=$(SkipTests) diff --git a/eng/pipelines/libraries/base-job.yml b/eng/pipelines/libraries/base-job.yml index 915708ce7822e3..c1d343e6b8da56 100644 --- a/eng/pipelines/libraries/base-job.yml +++ b/eng/pipelines/libraries/base-job.yml @@ -119,7 +119,7 @@ jobs: - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - _buildScript: ./$(_buildScriptFileName)$(scriptExt) - - _buildArguments: -subsetcategory libraries -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_testScopeArg) $(_runtimeOSArg) $(_msbuildCommonParameters) $(_runtimeArtifactsPathArg) $(_crossBuildPropertyArg) + - _buildArguments: -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_testScopeArg) $(_runtimeOSArg) $(_msbuildCommonParameters) $(_runtimeArtifactsPathArg) $(_crossBuildPropertyArg) - ${{ parameters.variables }} dependsOn: diff --git a/eng/pipelines/libraries/build-job.yml b/eng/pipelines/libraries/build-job.yml index 402b2aefadf0d2..6fa4b12c852e69 100644 --- a/eng/pipelines/libraries/build-job.yml +++ b/eng/pipelines/libraries/build-job.yml @@ -59,12 +59,14 @@ jobs: - ${{ format('coreclr_corelib_build_{1}{2}_{3}_{4}', parameters.runtimeFlavor, 'linux', parameters.osSubgroup, 'x64', parameters.liveRuntimeBuildConfig) }} variables: + - _subset: libs - _addtionalBuildArguments: '' - ${{ parameters.variables }} - ${{ if eq(parameters.osGroup, 'WebAssembly') }}: - EMSDK_PATH: $(Build.BinariesDirectory)/emsdk - ${{ if eq(parameters.runTests, true) }}: - - _addtionalBuildArguments: /p:IncludeLibrariesTestSubset=true /p:ArchiveTests=true + - _subset: libs+libs.tests + - _addtionalBuildArguments: /p:ArchiveTests=true - ${{ parameters.variables }} @@ -93,6 +95,7 @@ jobs: installDotnet: true - script: $(_buildScript) + -subset $(_subset) $(_buildArguments) $(_addtionalBuildArguments) displayName: Restore and Build Product diff --git a/eng/pipelines/libraries/build-test-job.yml b/eng/pipelines/libraries/build-test-job.yml index b75fd1de036928..82da2388581bf7 100644 --- a/eng/pipelines/libraries/build-test-job.yml +++ b/eng/pipelines/libraries/build-test-job.yml @@ -56,7 +56,7 @@ jobs: cleanUnpackFolder: false - script: $(_buildScript) - -subset pretest-libtests + -subset libs.pretest+libs.tests $(_buildArguments) $(_archiveTestsParameter) displayName: Restore and Build diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index f2f2db16c8ee17..caf5d91164ee71 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -50,7 +50,7 @@ steps: displayName: Test linuxclient connection to web server - bash: | - docker exec linuxclient bash -c '/repo/build.sh -subsetcategory coreclr-libraries -runtimeconfiguration release -ci' + docker exec linuxclient bash -c '/repo/build.sh -subset clr+libs -runtimeconfiguration release -ci' displayName: Build product sources - bash: | diff --git a/eng/pipelines/libraries/run-test-job.yml b/eng/pipelines/libraries/run-test-job.yml index 951164f8cc21c5..7d982c09e72024 100644 --- a/eng/pipelines/libraries/run-test-job.yml +++ b/eng/pipelines/libraries/run-test-job.yml @@ -73,7 +73,7 @@ jobs: - ${{ if ne(parameters.liveRuntimeBuildConfig, '') }}: - script: $(_buildScript) - -subset pretest + -subset libs.pretest $(_buildArguments) /p:RuntimeFlavor=${{ parameters.runtimeFlavor }} /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/overrideRuntimeFromLiveDrop.binlog diff --git a/eng/pipelines/mono/templates/build-job.yml b/eng/pipelines/mono/templates/build-job.yml index b26aec83e30627..0b430280ceabbb 100644 --- a/eng/pipelines/mono/templates/build-job.yml +++ b/eng/pipelines/mono/templates/build-job.yml @@ -92,10 +92,10 @@ jobs: # Build - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - - script: ./build$(scriptExt) -subsetcategory mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci /p:MonoEnableLLVM=${{ parameters.llvm }} + - script: ./build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci /p:MonoEnableLLVM=${{ parameters.llvm }} displayName: Build product - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - - script: build$(scriptExt) -subsetcategory mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci /p:MonoEnableLLVM=${{ parameters.llvm }} + - script: build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci /p:MonoEnableLLVM=${{ parameters.llvm }} displayName: Build product # Publish product output directory for consumption by tests. @@ -111,10 +111,10 @@ jobs: # Build packages - ${{ if and(ne(parameters.llvm, true), ne(parameters.osGroup, 'Windows_NT')) }}: - - script: ./build$(scriptExt) -subsetcategory mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) /p:MonoEnableLLVM=${{ parameters.llvm }} -pack $(OutputRidArg) + - script: ./build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) /p:MonoEnableLLVM=${{ parameters.llvm }} -pack $(OutputRidArg) displayName: Build nupkg - ${{ if and(ne(parameters.llvm, true), eq(parameters.osGroup, 'Windows_NT')) }}: - - script: build$(scriptExt) -subsetcategory mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) /p:MonoEnableLLVM=${{ parameters.llvm }} -pack $(OutputRidArg) + - script: build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) /p:MonoEnableLLVM=${{ parameters.llvm }} -pack $(OutputRidArg) displayName: Build nupkg # Save packages using the prepare-signed-artifacts format. diff --git a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml b/eng/pipelines/official/jobs/prepare-signed-artifacts.yml index b7a5b60ee1ba19..42c8bb69b73f61 100644 --- a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml +++ b/eng/pipelines/official/jobs/prepare-signed-artifacts.yml @@ -43,7 +43,7 @@ jobs: - script: >- build.cmd -ci - -subsetcategory installer -subset publish + -subset installer.publish -configuration Release /p:PublishRidAgnosticPackagesFromPlatform=${{ parameters.PublishRidAgnosticPackagesFromPlatform }} /p:OfficialBuildId=$(Build.BuildNumber) diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/ReadMe.SharedCode.md b/src/libraries/Common/src/System/Net/Http/aspnetcore/ReadMe.SharedCode.md index f24980b8a22e61..eb86cd931280ec 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/ReadMe.SharedCode.md +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/ReadMe.SharedCode.md @@ -14,7 +14,7 @@ dotnet/AspNetCore code paths: ## Building dotnet/runtime code: - https://github.com/dotnet/runtime/tree/master/docs/workflow -- Run *build.cmd* from the root once: `PS D:\github\runtime> .\build.cmd -runtimeConfiguration Release -subsetCategory coreclr-libraries` +- Run *build.cmd* from the root once: `PS D:\github\runtime> .\build.cmd -runtimeConfiguration Release -subset clr+libs` - Build the individual projects: - `PS D:\github\dotnet\src\libraries\Common\tests> dotnet build` - `PS D:\github\dotnet\src\libraries\System.Net.Http\src> dotnet build` diff --git a/src/libraries/Common/tests/StaticTestGenerator/README.md b/src/libraries/Common/tests/StaticTestGenerator/README.md index 30e03369fb8594..657decbad1eb88 100644 --- a/src/libraries/Common/tests/StaticTestGenerator/README.md +++ b/src/libraries/Common/tests/StaticTestGenerator/README.md @@ -9,7 +9,7 @@ generated per theory input. ## Prereqs -- Build runtime from root to ensure that the testhost directory of assemblies is published, e.g. `cd d:\repos\runtime & .\build.cmd -subsetCategory libraries`. +- Build runtime from root to ensure that the testhost directory of assemblies is published, e.g. `cd d:\repos\runtime & .\build.cmd -subset libs`. - Build the test assembly desired, e.g `cd src\libraries\System.Runtime\tests & dotnet build`. ## Running the StaticTestGenerator utility diff --git a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/README.md b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/README.md index c8f216c4977b7f..0ce6f23b282567 100644 --- a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/README.md +++ b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/README.md @@ -49,7 +49,7 @@ Now build the repo as you would on a regular dev machine: ```bash cd /repo -./build.sh --subsetCategory libraries +./build.sh --subset libs ``` Now you can run the enterprise tests. Currently, there are tests for System.Net.Http and System.Net.Security. You can run them in the same way you already run tests in the repo.