diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 0fc31e809..f77cfc433 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "microsoft.dotnet.darc": { - "version": "1.1.0-beta.22554.2", + "version": "1.1.0-beta.23053.1", "commands": [ "darc" ] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 30953897c..000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,23 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/dotnet -{ - "name": "Source-Build w/ Built Tarball", - "image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36", - // A completely built .NET source-tarball is >64 GB - "hostRequirements": { - "storage": "128gb" - }, - // Configure tool-specific properties. - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "ms-dotnettools.csharp", - "eamodio.gitlens" - ] - } - }, - // Use 'onCreateCommand' to run pre-build commands inside the codespace. - "onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/source-build-scripts/buildTarball.sh" -} \ No newline at end of file diff --git a/.devcontainer/source-build-scripts/buildTarball.sh b/.devcontainer/source-build-scripts/buildTarball.sh deleted file mode 100755 index d1b714e77..000000000 --- a/.devcontainer/source-build-scripts/buildTarball.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -./.devcontainer/source-build-scripts/createTarball.sh - -cd $(realpath ..)/dotnet-source/ - -./prep.sh - -# GitHub Codespaces automatically sets RepositoryName, which conflicts with source-build scripts. -unset RepositoryName - -./build.sh --online --clean-while-building || true diff --git a/.devcontainer/source-build-scripts/createTarball.sh b/.devcontainer/source-build-scripts/createTarball.sh deleted file mode 100755 index c66753b16..000000000 --- a/.devcontainer/source-build-scripts/createTarball.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -# Always return exit code 0 so that we can use the codespaces prebuild to diagnose build errors. -./build.sh /p:ArcadeBuildTarball=true /p:TarballDir=$(realpath ..)/dotnet-source/ /p:PreserveTarballGitFolders=true || true - -# Save the commit hash of the currently built repo, so developers know which version was built -git rev-parse HEAD > ./artifacts/prebuild.sha \ No newline at end of file diff --git a/.devcontainer/source-build-tarball/devcontainer.json b/.devcontainer/source-build-tarball/devcontainer.json deleted file mode 100644 index 4fa2238bf..000000000 --- a/.devcontainer/source-build-tarball/devcontainer.json +++ /dev/null @@ -1,20 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/dotnet -{ - "name": "Source-Build w/ Tarball", - "image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36", - // A completely built .NET source tarball is >64 GB - "hostRequirements": { - "storage": "128gb" - }, - "customizations": { - "vscode": { - "extensions": [ - "ms-dotnettools.csharp", - "eamodio.gitlens" - ] - } - }, - // Use 'onCreateCommand' to run pre-build commands inside the codespace. - "onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/createTarball.sh" -} \ No newline at end of file diff --git a/.devcontainer/source-build/devcontainer.json b/.devcontainer/source-build/devcontainer.json deleted file mode 100644 index e38bc27f0..000000000 --- a/.devcontainer/source-build/devcontainer.json +++ /dev/null @@ -1,5 +0,0 @@ -// Use this devcontainer if you don't need the full context of a source-build tarball -{ - "name": "Source-Build", - "image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36" -} \ No newline at end of file diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 78fc837c2..59526b0ca 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -10,6 +10,19 @@ trigger: - internal/release/6.* - internal/release/7.* +resources: + repositories: + - repository: vmr + type: github + name: dotnet/dotnet + endpoint: dotnet + +parameters: +- name: vmrBranch + displayName: dotnet/dotnet branch to push to + type: string + default: $(Build.SourceBranchName) + variables: - name: _PublishUsingPipelines value: false @@ -20,6 +33,8 @@ variables: - name: PostBuildSign value: true - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - name: Codeql.Enabled + value: true - group: DotNet-DotNetCli-Storage - group: DotNet-Installer-SDLValidation-Params - name: _PublishUsingPipelines @@ -58,7 +73,7 @@ stages: ## Windows - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Windows_NT jobName: Build_Debug_x64 @@ -69,7 +84,7 @@ stages: ## Linux - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Ubuntu_22_04_Debug_x64 @@ -78,7 +93,7 @@ stages: buildArchitecture: x64 linuxPortable: true runTests: true - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Fedora_36_Debug_x64 @@ -87,7 +102,7 @@ stages: buildArchitecture: x64 linuxPortable: true runTests: true - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_CentOS_7_Debug_x64 @@ -96,7 +111,7 @@ stages: buildArchitecture: x64 linuxPortable: false runTests: true - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Debian_Stretch_Debug_x64 @@ -106,7 +121,7 @@ stages: additionalBuildParameters: '/p:BuildSdkDeb=true' linuxPortable: false runTests: true - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Arm64_Debug @@ -116,7 +131,7 @@ stages: linuxPortable: true # Never run tests on arm64 runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Linux_musl_Debug_x64 @@ -128,7 +143,7 @@ stages: additionalBuildParameters: '/p:HostOSName="linux-musl"' linuxPortable: false runTests: true - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_LinuxPortable_Release_x64 @@ -139,7 +154,7 @@ stages: # MacOS - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Darwin jobName: Build_Release_x64 @@ -153,7 +168,7 @@ stages: ## Windows - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Windows_NT jobName: Build_Release_x64 @@ -161,14 +176,14 @@ stages: buildArchitecture: x64 additionalBuildParameters: '/p:PublishInternalAsset=true' runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Windows_NT jobName: Build_Release_x86 buildConfiguration: Release buildArchitecture: x86 runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Windows_NT jobName: Build_Release_arm64 @@ -178,7 +193,7 @@ stages: ## Linux - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Arm_Release @@ -187,7 +202,7 @@ stages: runtimeIdentifier: 'linux-arm' linuxPortable: true runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Arm64_Release @@ -196,7 +211,7 @@ stages: runtimeIdentifier: 'linux-arm64' linuxPortable: true runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Linux_musl_Release_arm @@ -207,7 +222,7 @@ stages: additionalBuildParameters: '/p:OSName="linux-musl"' linuxPortable: false runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Linux_musl_Release_arm64 @@ -217,7 +232,7 @@ stages: additionalBuildParameters: '/p:OSName="linux-musl"' linuxPortable: false runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Linux_musl_Release_x64 @@ -229,7 +244,7 @@ stages: additionalBuildParameters: '/p:HostOSName="linux-musl"' linuxPortable: false runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Linux_Portable_Deb_Release_x64 @@ -241,7 +256,7 @@ stages: additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:BuildSdkDeb=true' linuxPortable: true runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Linux_Portable_Rpm_Release_x64 @@ -253,7 +268,7 @@ stages: additionalBuildParameters: '/p:PublishBinariesAndBadge=false' linuxPortable: true runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_Linux_Portable_Rpm_Release_Arm64 @@ -266,7 +281,7 @@ stages: additionalBuildParameters: '/p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true' linuxPortable: true runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux jobName: Build_LinuxPortable_Release_x64 @@ -277,14 +292,14 @@ stages: # MacOS - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Darwin jobName: Build_Release_x64 buildConfiguration: Release buildArchitecture: x64 runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Darwin jobName: Build_Release_arm64 @@ -295,7 +310,7 @@ stages: ## Windows PGO Instrumentation builds - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Windows_NT pgoInstrument: true @@ -304,7 +319,7 @@ stages: buildArchitecture: x64 additionalBuildParameters: '/p:PublishInternalAsset=true' runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Windows_NT pgoInstrument: true @@ -312,7 +327,7 @@ stages: buildConfiguration: Release buildArchitecture: x86 runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Windows_NT pgoInstrument: true @@ -323,7 +338,7 @@ stages: ## Linux PGO Instrumentation builds - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux pgoInstrument: true @@ -333,7 +348,7 @@ stages: linuxPortable: true runTests: false - - template: /eng/build.yml + - template: eng/build.yml parameters: agentOs: Linux pgoInstrument: true @@ -345,12 +360,24 @@ stages: - template: /eng/common/templates/jobs/source-build.yml - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml - - - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml +- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}: + - stage: Synchronize_VMR + displayName: Synchronize VMR + dependsOn: [] + jobs: + - template: eng/pipelines/templates/jobs/vmr-synchronization.yml parameters: - dependsOn: Source_Build_Create_Tarball + vmrBranch: ${{ parameters.vmrBranch }} + +# In case the VMR Build stage needs to be temporarily disabled, please make sure that +# the VMR synchronization step is run to validate that the PR can be merged and later +# synchronized into the VMR without problems. +# You can do this by allowing the Synchronize_VMR stage from above in PRs. +- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + - template: eng/pipelines/templates/stages/vmr-build.yml + parameters: + vmrBranch: ${{ parameters.vmrBranch }} + isBuiltFromVmr: false - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - stage: Publish diff --git a/NuGet.config b/NuGet.config index e6b233c39..cb866adcb 100644 --- a/NuGet.config +++ b/NuGet.config @@ -7,7 +7,6 @@ - @@ -33,6 +32,8 @@ + + diff --git a/README.md b/README.md index 8dcbcec66..83cceea51 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# .NET Core SDK +# .NET SDK Installers [![Join the chat at https://gitter.im/dotnet/cli](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dotnet/cli?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GitHub release](https://img.shields.io/github/release/dotnet/installer.svg)](https://GitHub.com/dotnet/installer/releases/) @@ -11,13 +11,22 @@ [![GitHub contributors](https://img.shields.io/github/contributors/dotnet/installer.svg)](https://GitHub.com/dotnet/installer/graphs/contributors/) [![Commit Activity](https://img.shields.io/github/commit-activity/m/dotnet/installer)]() +This repo contains the source code for the cross-platform [.NET](http://github.com/dotnet/core) SDK. It aggregates the .NET toolchain, the .NET runtime, the templates, and the .NET Windows Desktop runtime. It produces zip, tarballs, and native packages for various supported platforms. -This repo contains the source code for the cross-platform [.NET Core](http://github.com/dotnet/core) SDK. It aggregates the .NET Toolchain, the .NET Core runtime, the templates, and the .NET Core Windows Desktop runtime. It produces zip, tarballs, and native packages for various supported platforms. - -Looking for released versions of the .NET Core tooling? +Looking for released versions of the .NET tooling? ---------------------------------------- -Download released versions of the .NET Core tools (CLI, MSBuild and the new csproj) at https://dot.net/core. +The links below are for preview versions of .NET tooling. Prefer to use released versions of the .NET tools? Go to https://dot.net/download. + +Looking for .NET Framework downloads? +---------------------------------------- + +.NET Framework is the product from which the .NET Core project originated. .NET Core (mostly just called ".NET" here) adds many features and improvements and supports many more platforms than .NET Framework. .NET Framework remains fully supported and you can find the downloads on the [.NET website](https://dotnet.microsoft.com/download/dotnet-framework). For new projects, we recommend you use .NET Core. + +Want to contribute or find out more about the .NET project? +---------------------------------------- + +This repo is for the installers. Most of the implementation is in other repos, such as the [dotnet/runtime repo](https://github.com/dotnet/runtime) or the [dotnet/aspnetcore repo](https://github.com/dotnet/aspnetcore) and [many others](https://github.com/dotnet/core/blob/main/Documentation/core-repos.md). We welcome you to join us there! Found an issue? --------------- @@ -25,7 +34,7 @@ You can consult the [Documents Index for the SDK repo](https://github.com/dotnet This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/) to clarify expected behavior in our community. For more information, see the [.NET Foundation Code of Conduct](http://www.dotnetfoundation.org/code-of-conduct). -# Build .NET installer +# Build .NET installer The repository contains native code project required for the Windows installer. If you intend to build it locally on Windows, you will need to ensure that you have the following items installed. - Install CMAKE 3.21.0 is required if you're building VS 17.0. Make sure to add CMAKE to your PATH (the installer will prompt you). @@ -43,8 +52,8 @@ Please see the [dotnet/source-build](https://github.com/dotnet/source-build) rep ## Support -.NET Source-Build is supported on the oldest available .NET SDK feature update, and on Linux only. -For example, if both .NET 6.0.1XX and 6.0.2XX feature updates are available from [dotnet.microsoft.com](https://dotnet.microsoft.com/en-us/download/dotnet/6.0), Source-Build will only support 6.0.1XX. +.NET Source-Build is supported on the oldest available .NET SDK feature update for each major release, and on Linux only. +For example, if .NET 6.0.1xx, 6.0.2xx, and 7.0.1xx feature updates are available from [dotnet.microsoft.com](https://dotnet.microsoft.com/en-us/download/dotnet/6.0), Source-Build will support 6.0.1xx and 7.0.1xx. For the latest information about Source-Build support for new .NET versions, please check our [GitHub Discussions page](https://github.com/dotnet/source-build/discussions) for announcements. ## Prerequisites @@ -79,7 +88,7 @@ The dependencies for building .NET from source can be found [here](https://githu ``` This builds the entire .NET SDK from source. - The resulting SDK is placed at `artifacts/x64/Release/dotnet-sdk-6.0.100-fedora.33-x64.tar.gz`. + The resulting SDK is placed at `artifacts/x64/Release/dotnet-sdk-7.0.100-your-RID.tar.gz`. Optionally add the `--online` flag to add online NuGet restore sources to the build. This is useful for testing unsupported releases that don't yet build without downloading pre-built binaries from the internet. @@ -90,7 +99,7 @@ The dependencies for building .NET from source can be found [here](https://githu ```bash mkdir -p $HOME/dotnet - tar zxf artifacts/x64/Release/dotnet-sdk-6.0.100-fedora.33-x64.tar.gz -C $HOME/dotnet + tar zxf artifacts/x64/Release/dotnet-sdk-7.0.100-your-RID.tar.gz -C $HOME/dotnet ln -s $HOME/dotnet/dotnet /usr/bin/dotnet ``` @@ -109,7 +118,7 @@ Visibility|All legs| ## Installers and Binaries -You can download the .NET Core SDK as either an installer (MSI, PKG) or a zip (zip, tar.gz). The .NET Core SDK contains both the .NET Core runtime and CLI tools. +You can download the .NET SDK as either an installer (MSI, PKG) or a zip (zip, tar.gz). The .NET SDK contains both the .NET runtime and CLI tools. **Note:** Be aware that the following installers are the **latest bits**. If you want to install the latest released versions, check out the [preceding section](#looking-for-released-versions-of-the-net-core-tooling). @@ -135,33 +144,33 @@ With development builds, internal NuGet feeds are necessary for some scenarios ( ``` -Please do not directly edit the table below. Use https://github.com/dotnet/installer/tree/main/tools/sdk-readme-table-generator to help you generate it. Make sure to run the table generator test and make any changes to the generator along with your changes to the table. Daily servicing builds have been removed as all servicing is done in private repos to avoid disclosure of critical security fixes. All public servicing builds can be downloaded at http://aka.ms/dotnet-download. +Do not directly edit the table below. Use https://github.com/dotnet/installer/tree/main/tools/sdk-readme-table-generator to help you generate it. Make sure to run the table generator test and make any changes to the generator along with your changes to the table. Daily servicing builds aren't shown here because they may contain upcoming security fixes. All public servicing builds can be downloaded at http://aka.ms/dotnet-download. ### Table *Note* the 7.0.100 build will be finished internally. Below is the last public version available from that branch but is not fully updated with the final runtime. -| Platform | main
(8.0.x Runtime) | Release/7.0.2xx
(7.0.x Runtime) | Release/7.0.1xx
(7.0.x Runtime) | -| :--------- | :----------: | :----------: | :----------: | -| **Windows x64** | [![][win-x64-badge-main]][win-x64-version-main]
[Installer][win-x64-installer-main] - [Checksum][win-x64-installer-checksum-main]
[zip][win-x64-zip-main] - [Checksum][win-x64-zip-checksum-main] | [![][win-x64-badge-7.0.2XX]][win-x64-version-7.0.2XX]
[Installer][win-x64-installer-7.0.2XX] - [Checksum][win-x64-installer-checksum-7.0.2XX]
[zip][win-x64-zip-7.0.2XX] - [Checksum][win-x64-zip-checksum-7.0.2XX] | [![][win-x64-badge-7.0.1XX]][win-x64-version-7.0.1XX]
[Installer][win-x64-installer-7.0.1XX] - [Checksum][win-x64-installer-checksum-7.0.1XX]
[zip][win-x64-zip-7.0.1XX] - [Checksum][win-x64-zip-checksum-7.0.1XX] | -| **Windows x86** | [![][win-x86-badge-main]][win-x86-version-main]
[Installer][win-x86-installer-main] - [Checksum][win-x86-installer-checksum-main]
[zip][win-x86-zip-main] - [Checksum][win-x86-zip-checksum-main] | [![][win-x86-badge-7.0.2XX]][win-x86-version-7.0.2XX]
[Installer][win-x86-installer-7.0.2XX] - [Checksum][win-x86-installer-checksum-7.0.2XX]
[zip][win-x86-zip-7.0.2XX] - [Checksum][win-x86-zip-checksum-7.0.2XX] | [![][win-x86-badge-7.0.1XX]][win-x86-version-7.0.1XX]
[Installer][win-x86-installer-7.0.1XX] - [Checksum][win-x86-installer-checksum-7.0.1XX]
[zip][win-x86-zip-7.0.1XX] - [Checksum][win-x86-zip-checksum-7.0.1XX] | -| **Windows arm** | **N/A** | **N/A** | **N/A** | -| **Windows arm64** | [![][win-arm64-badge-main]][win-arm64-version-main]
[Installer][win-arm64-installer-main] - [Checksum][win-arm64-installer-checksum-main]
[zip][win-arm64-zip-main] | [![][win-arm64-badge-7.0.2XX]][win-arm64-version-7.0.2XX]
[Installer][win-arm64-installer-7.0.2XX] - [Checksum][win-arm64-installer-checksum-7.0.2XX]
[zip][win-arm64-zip-7.0.2XX] | [![][win-arm64-badge-7.0.1XX]][win-arm64-version-7.0.1XX]
[Installer][win-arm64-installer-7.0.1XX] - [Checksum][win-arm64-installer-checksum-7.0.1XX]
[zip][win-arm64-zip-7.0.1XX] | -| **macOS x64** | [![][osx-x64-badge-main]][osx-x64-version-main]
[Installer][osx-x64-installer-main] - [Checksum][osx-x64-installer-checksum-main]
[tar.gz][osx-x64-targz-main] - [Checksum][osx-x64-targz-checksum-main] | [![][osx-x64-badge-7.0.2XX]][osx-x64-version-7.0.2XX]
[Installer][osx-x64-installer-7.0.2XX] - [Checksum][osx-x64-installer-checksum-7.0.2XX]
[tar.gz][osx-x64-targz-7.0.2XX] - [Checksum][osx-x64-targz-checksum-7.0.2XX] | [![][osx-x64-badge-7.0.1XX]][osx-x64-version-7.0.1XX]
[Installer][osx-x64-installer-7.0.1XX] - [Checksum][osx-x64-installer-checksum-7.0.1XX]
[tar.gz][osx-x64-targz-7.0.1XX] - [Checksum][osx-x64-targz-checksum-7.0.1XX] | -| **macOS arm64** | [![][osx-arm64-badge-main]][osx-arm64-version-main]
[Installer][osx-arm64-installer-main] - [Checksum][osx-arm64-installer-checksum-main]
[tar.gz][osx-arm64-targz-main] - [Checksum][osx-arm64-targz-checksum-main] | [![][osx-arm64-badge-7.0.2XX]][osx-arm64-version-7.0.2XX]
[Installer][osx-arm64-installer-7.0.2XX] - [Checksum][osx-arm64-installer-checksum-7.0.2XX]
[tar.gz][osx-arm64-targz-7.0.2XX] - [Checksum][osx-arm64-targz-checksum-7.0.2XX] | [![][osx-arm64-badge-7.0.1XX]][osx-arm64-version-7.0.1XX]
[Installer][osx-arm64-installer-7.0.1XX] - [Checksum][osx-arm64-installer-checksum-7.0.1XX]
[tar.gz][osx-arm64-targz-7.0.1XX] - [Checksum][osx-arm64-targz-checksum-7.0.1XX] | -| **Linux x64** | [![][linux-badge-main]][linux-version-main]
[DEB Installer][linux-DEB-installer-main] - [Checksum][linux-DEB-installer-checksum-main]
[RPM Installer][linux-RPM-installer-main] - [Checksum][linux-RPM-installer-checksum-main]
_see installer note below_1
[tar.gz][linux-targz-main] - [Checksum][linux-targz-checksum-main] | [![][linux-badge-7.0.2XX]][linux-version-7.0.2XX]
[DEB Installer][linux-DEB-installer-7.0.2XX] - [Checksum][linux-DEB-installer-checksum-7.0.2XX]
[RPM Installer][linux-RPM-installer-7.0.2XX] - [Checksum][linux-RPM-installer-checksum-7.0.2XX]
_see installer note below_1
[tar.gz][linux-targz-7.0.2XX] - [Checksum][linux-targz-checksum-7.0.2XX] | [![][linux-badge-7.0.1XX]][linux-version-7.0.1XX]
[DEB Installer][linux-DEB-installer-7.0.1XX] - [Checksum][linux-DEB-installer-checksum-7.0.1XX]
[RPM Installer][linux-RPM-installer-7.0.1XX] - [Checksum][linux-RPM-installer-checksum-7.0.1XX]
_see installer note below_1
[tar.gz][linux-targz-7.0.1XX] - [Checksum][linux-targz-checksum-7.0.1XX] | -| **Linux arm** | [![][linux-arm-badge-main]][linux-arm-version-main]
[tar.gz][linux-arm-targz-main] - [Checksum][linux-arm-targz-checksum-main] | [![][linux-arm-badge-7.0.2XX]][linux-arm-version-7.0.2XX]
[tar.gz][linux-arm-targz-7.0.2XX] - [Checksum][linux-arm-targz-checksum-7.0.2XX] | [![][linux-arm-badge-7.0.1XX]][linux-arm-version-7.0.1XX]
[tar.gz][linux-arm-targz-7.0.1XX] - [Checksum][linux-arm-targz-checksum-7.0.1XX] | -| **Linux arm64** | [![][linux-arm64-badge-main]][linux-arm64-version-main]
[tar.gz][linux-arm64-targz-main] - [Checksum][linux-arm64-targz-checksum-main] | [![][linux-arm64-badge-7.0.2XX]][linux-arm64-version-7.0.2XX]
[tar.gz][linux-arm64-targz-7.0.2XX] - [Checksum][linux-arm64-targz-checksum-7.0.2XX] | [![][linux-arm64-badge-7.0.1XX]][linux-arm64-version-7.0.1XX]
[tar.gz][linux-arm64-targz-7.0.1XX] - [Checksum][linux-arm64-targz-checksum-7.0.1XX] | -| **Linux-musl-x64** | [![][linux-musl-x64-badge-main]][linux-musl-x64-version-main]
[tar.gz][linux-musl-x64-targz-main] - [Checksum][linux-musl-x64-targz-checksum-main] | [![][linux-musl-x64-badge-7.0.2XX]][linux-musl-x64-version-7.0.2XX]
[tar.gz][linux-musl-x64-targz-7.0.2XX] - [Checksum][linux-musl-x64-targz-checksum-7.0.2XX] | [![][linux-musl-x64-badge-7.0.1XX]][linux-musl-x64-version-7.0.1XX]
[tar.gz][linux-musl-x64-targz-7.0.1XX] - [Checksum][linux-musl-x64-targz-checksum-7.0.1XX] | -| **Linux-musl-arm** | [![][linux-musl-arm-badge-main]][linux-musl-arm-version-main]
[tar.gz][linux-musl-arm-targz-main] - [Checksum][linux-musl-arm-targz-checksum-main] | [![][linux-musl-arm-badge-7.0.2XX]][linux-musl-arm-version-7.0.2XX]
[tar.gz][linux-musl-arm-targz-7.0.2XX] - [Checksum][linux-musl-arm-targz-checksum-7.0.2XX] | [![][linux-musl-arm-badge-7.0.1XX]][linux-musl-arm-version-7.0.1XX]
[tar.gz][linux-musl-arm-targz-7.0.1XX] - [Checksum][linux-musl-arm-targz-checksum-7.0.1XX] | -| **Linux-musl-arm64** | [![][linux-musl-arm64-badge-main]][linux-musl-arm64-version-main]
[tar.gz][linux-musl-arm64-targz-main] - [Checksum][linux-musl-arm64-targz-checksum-main] | [![][linux-musl-arm64-badge-7.0.2XX]][linux-musl-arm64-version-7.0.2XX]
[tar.gz][linux-musl-arm64-targz-7.0.2XX] - [Checksum][linux-musl-arm64-targz-checksum-7.0.2XX] | [![][linux-musl-arm64-badge-7.0.1XX]][linux-musl-arm64-version-7.0.1XX]
[tar.gz][linux-musl-arm64-targz-7.0.1XX] - [Checksum][linux-musl-arm64-targz-checksum-7.0.1XX] | -| **RHEL 6** | **N/A** | **N/A** | **N/A** | +| Platform | main
(8.0.x Runtime) | Release/7.0.2xx
(7.0.x Runtime) | +| :--------- | :----------: | :----------: | +| **Windows x64** | [![][win-x64-badge-main]][win-x64-version-main]
[Installer][win-x64-installer-main] - [Checksum][win-x64-installer-checksum-main]
[zip][win-x64-zip-main] - [Checksum][win-x64-zip-checksum-main] | [![][win-x64-badge-7.0.2XX]][win-x64-version-7.0.2XX]
[Installer][win-x64-installer-7.0.2XX] - [Checksum][win-x64-installer-checksum-7.0.2XX]
[zip][win-x64-zip-7.0.2XX] - [Checksum][win-x64-zip-checksum-7.0.2XX] | +| **Windows x86** | [![][win-x86-badge-main]][win-x86-version-main]
[Installer][win-x86-installer-main] - [Checksum][win-x86-installer-checksum-main]
[zip][win-x86-zip-main] - [Checksum][win-x86-zip-checksum-main] | [![][win-x86-badge-7.0.2XX]][win-x86-version-7.0.2XX]
[Installer][win-x86-installer-7.0.2XX] - [Checksum][win-x86-installer-checksum-7.0.2XX]
[zip][win-x86-zip-7.0.2XX] - [Checksum][win-x86-zip-checksum-7.0.2XX] | +| **Windows arm** | **N/A** | **N/A** | +| **Windows arm64** | [![][win-arm64-badge-main]][win-arm64-version-main]
[Installer][win-arm64-installer-main] - [Checksum][win-arm64-installer-checksum-main]
[zip][win-arm64-zip-main] | [![][win-arm64-badge-7.0.2XX]][win-arm64-version-7.0.2XX]
[Installer][win-arm64-installer-7.0.2XX] - [Checksum][win-arm64-installer-checksum-7.0.2XX]
[zip][win-arm64-zip-7.0.2XX] | +| **macOS x64** | [![][osx-x64-badge-main]][osx-x64-version-main]
[Installer][osx-x64-installer-main] - [Checksum][osx-x64-installer-checksum-main]
[tar.gz][osx-x64-targz-main] - [Checksum][osx-x64-targz-checksum-main] | [![][osx-x64-badge-7.0.2XX]][osx-x64-version-7.0.2XX]
[Installer][osx-x64-installer-7.0.2XX] - [Checksum][osx-x64-installer-checksum-7.0.2XX]
[tar.gz][osx-x64-targz-7.0.2XX] - [Checksum][osx-x64-targz-checksum-7.0.2XX] | +| **macOS arm64** | [![][osx-arm64-badge-main]][osx-arm64-version-main]
[Installer][osx-arm64-installer-main] - [Checksum][osx-arm64-installer-checksum-main]
[tar.gz][osx-arm64-targz-main] - [Checksum][osx-arm64-targz-checksum-main] | [![][osx-arm64-badge-7.0.2XX]][osx-arm64-version-7.0.2XX]
[Installer][osx-arm64-installer-7.0.2XX] - [Checksum][osx-arm64-installer-checksum-7.0.2XX]
[tar.gz][osx-arm64-targz-7.0.2XX] - [Checksum][osx-arm64-targz-checksum-7.0.2XX] | +| **Linux x64** | [![][linux-badge-main]][linux-version-main]
[DEB Installer][linux-DEB-installer-main] - [Checksum][linux-DEB-installer-checksum-main]
[RPM Installer][linux-RPM-installer-main] - [Checksum][linux-RPM-installer-checksum-main]
_see installer note below_1
[tar.gz][linux-targz-main] - [Checksum][linux-targz-checksum-main] | [![][linux-badge-7.0.2XX]][linux-version-7.0.2XX]
[DEB Installer][linux-DEB-installer-7.0.2XX] - [Checksum][linux-DEB-installer-checksum-7.0.2XX]
[RPM Installer][linux-RPM-installer-7.0.2XX] - [Checksum][linux-RPM-installer-checksum-7.0.2XX]
_see installer note below_1
[tar.gz][linux-targz-7.0.2XX] - [Checksum][linux-targz-checksum-7.0.2XX] | +| **Linux arm** | [![][linux-arm-badge-main]][linux-arm-version-main]
[tar.gz][linux-arm-targz-main] - [Checksum][linux-arm-targz-checksum-main] | [![][linux-arm-badge-7.0.2XX]][linux-arm-version-7.0.2XX]
[tar.gz][linux-arm-targz-7.0.2XX] - [Checksum][linux-arm-targz-checksum-7.0.2XX] | +| **Linux arm64** | [![][linux-arm64-badge-main]][linux-arm64-version-main]
[tar.gz][linux-arm64-targz-main] - [Checksum][linux-arm64-targz-checksum-main] | [![][linux-arm64-badge-7.0.2XX]][linux-arm64-version-7.0.2XX]
[tar.gz][linux-arm64-targz-7.0.2XX] - [Checksum][linux-arm64-targz-checksum-7.0.2XX] | +| **Linux-musl-x64** | [![][linux-musl-x64-badge-main]][linux-musl-x64-version-main]
[tar.gz][linux-musl-x64-targz-main] - [Checksum][linux-musl-x64-targz-checksum-main] | [![][linux-musl-x64-badge-7.0.2XX]][linux-musl-x64-version-7.0.2XX]
[tar.gz][linux-musl-x64-targz-7.0.2XX] - [Checksum][linux-musl-x64-targz-checksum-7.0.2XX] | +| **Linux-musl-arm** | [![][linux-musl-arm-badge-main]][linux-musl-arm-version-main]
[tar.gz][linux-musl-arm-targz-main] - [Checksum][linux-musl-arm-targz-checksum-main] | [![][linux-musl-arm-badge-7.0.2XX]][linux-musl-arm-version-7.0.2XX]
[tar.gz][linux-musl-arm-targz-7.0.2XX] - [Checksum][linux-musl-arm-targz-checksum-7.0.2XX] | +| **Linux-musl-arm64** | [![][linux-musl-arm64-badge-main]][linux-musl-arm64-version-main]
[tar.gz][linux-musl-arm64-targz-main] - [Checksum][linux-musl-arm64-targz-checksum-main] | [![][linux-musl-arm64-badge-7.0.2XX]][linux-musl-arm64-version-7.0.2XX]
[tar.gz][linux-musl-arm64-targz-7.0.2XX] - [Checksum][linux-musl-arm64-targz-checksum-7.0.2XX] | +| **RHEL 6** | **N/A** | **N/A** | Reference notes: > **1**: Our Debian packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing the SDK from the .deb file (via dpkg or similar), then you'll need to install the corresponding dependencies first: > * [Host, Host FX Resolver, and Shared Framework](https://github.com/dotnet/runtime/blob/main/docs/project/dogfooding.md#nightly-builds-table) > * [ASP.NET Core Shared Framework](https://github.com/aspnet/AspNetCore/blob/main/docs/DailyBuilds.md) -.NET Core SDK 2.x downloads can be found here: [.NET Core SDK 2.x Installers and Binaries](Downloads2.x.md) +.NET Core SDK 2.x downloads can be found at [.NET Core SDK 2.x Installers and Binaries](Downloads2.x.md) but they are [out of support](https://dotnet.microsoft.com/platform/support/policy/dotnet-core). [win-x64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/win_x64_Release_version_badge.svg?no-cache [win-x64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-win-x64.txt @@ -177,14 +186,7 @@ Reference notes: [win-x64-zip-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-win-x64.zip [win-x64-zip-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-win-x64.zip.sha -[win-x64-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/win_x64_Release_version_badge.svg?no-cache -[win-x64-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-win-x64.txt -[win-x64-installer-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-x64.exe -[win-x64-installer-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-x64.exe.sha -[win-x64-zip-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-x64.zip -[win-x64-zip-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-x64.zip.sha - -[win-x86-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/win_x86_Release_version_badge.svg?no-cache +[win-x86-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/win_x86_Release_version_badge.svg [win-x86-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-win-x86.txt [win-x86-installer-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-x86.exe [win-x86-installer-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-x86.exe.sha @@ -198,14 +200,7 @@ Reference notes: [win-x86-zip-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-win-x86.zip [win-x86-zip-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-win-x86.zip.sha -[win-x86-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/win_x86_Release_version_badge.svg?no-cache -[win-x86-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-win-x86.txt -[win-x86-installer-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-x86.exe -[win-x86-installer-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-x86.exe.sha -[win-x86-zip-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-x86.zip -[win-x86-zip-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-x86.zip.sha - -[osx-x64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/osx_x64_Release_version_badge.svg?no-cache +[osx-x64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/osx_x64_Release_version_badge.svg [osx-x64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-osx-x64.txt [osx-x64-installer-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-osx-x64.pkg [osx-x64-installer-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-osx-x64.pkg.sha @@ -219,14 +214,7 @@ Reference notes: [osx-x64-targz-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-osx-x64.tar.gz [osx-x64-targz-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-osx-x64.pkg.tar.gz.sha -[osx-x64-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/osx_x64_Release_version_badge.svg?no-cache -[osx-x64-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-osx-x64.txt -[osx-x64-installer-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-osx-x64.pkg -[osx-x64-installer-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-osx-x64.pkg.sha -[osx-x64-targz-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-osx-x64.tar.gz -[osx-x64-targz-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-osx-x64.pkg.tar.gz.sha - -[osx-arm64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/osx_arm64_Release_version_badge.svg?no-cache +[osx-arm64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/osx_arm64_Release_version_badge.svg [osx-arm64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-osx-arm64.txt [osx-arm64-installer-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-osx-arm64.pkg [osx-arm64-installer-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-osx-arm64.pkg.sha @@ -240,14 +228,7 @@ Reference notes: [osx-arm64-targz-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-osx-arm64.tar.gz [osx-arm64-targz-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-osx-arm64.pkg.tar.gz.sha -[osx-arm64-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/osx_arm64_Release_version_badge.svg?no-cache -[osx-arm64-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-osx-arm64.txt -[osx-arm64-installer-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-osx-arm64.pkg -[osx-arm64-installer-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-osx-arm64.pkg.sha -[osx-arm64-targz-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-osx-arm64.tar.gz -[osx-arm64-targz-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-osx-arm64.pkg.tar.gz.sha - -[linux-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_x64_Release_version_badge.svg?no-cache +[linux-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_x64_Release_version_badge.svg [linux-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-linux-x64.txt [linux-DEB-installer-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-x64.deb [linux-DEB-installer-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-x64.deb.sha @@ -265,16 +246,7 @@ Reference notes: [linux-targz-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-linux-x64.tar.gz [linux-targz-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-linux-x64.tar.gz.sha -[linux-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/linux_x64_Release_version_badge.svg?no-cache -[linux-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-linux-x64.txt -[linux-DEB-installer-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-x64.deb -[linux-DEB-installer-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-x64.deb.sha -[linux-RPM-installer-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-x64.rpm -[linux-RPM-installer-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-x64.rpm.sha -[linux-targz-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-linux-x64.tar.gz -[linux-targz-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-linux-x64.tar.gz.sha - -[linux-arm-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_arm_Release_version_badge.svg?no-cache +[linux-arm-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_arm_Release_version_badge.svg [linux-arm-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-linux-arm.txt [linux-arm-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-arm.tar.gz [linux-arm-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-arm.tar.gz.sha @@ -284,12 +256,7 @@ Reference notes: [linux-arm-targz-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-linux-arm.tar.gz [linux-arm-targz-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-linux-arm.tar.gz.sha -[linux-arm-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/linux_arm_Release_version_badge.svg?no-cache -[linux-arm-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-linux-arm.txt -[linux-arm-targz-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-linux-arm.tar.gz -[linux-arm-targz-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-linux-arm.tar.gz.sha - -[linux-arm64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_arm64_Release_version_badge.svg?no-cache +[linux-arm64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_arm64_Release_version_badge.svg [linux-arm64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-linux-arm64.txt [linux-arm64-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-arm64.tar.gz [linux-arm64-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-arm64.tar.gz.sha @@ -299,12 +266,7 @@ Reference notes: [linux-arm64-targz-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-linux-arm64.tar.gz [linux-arm64-targz-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-linux-arm64.tar.gz.sha -[linux-arm64-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/linux_arm64_Release_version_badge.svg?no-cache -[linux-arm64-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-linux-arm64.txt -[linux-arm64-targz-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-linux-arm64.tar.gz -[linux-arm64-targz-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-linux-arm64.tar.gz.sha - -[rhel-6-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/rhel.6_x64_Release_version_badge.svg?no-cache +[rhel-6-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/rhel.6_x64_Release_version_badge.svg [rhel-6-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-rhel.6-x64.txt [rhel-6-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-rhel.6-x64.tar.gz [rhel-6-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-rhel.6-x64.tar.gz.sha @@ -314,12 +276,7 @@ Reference notes: [rhel-6-targz-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-rhel.6-x64.tar.gz [rhel-6-targz-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-rhel.6-x64.tar.gz.sha -[rhel-6-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/rhel.6_x64_Release_version_badge.svg?no-cache -[rhel-6-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-rhel.6-x64.txt -[rhel-6-targz-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-rhel.6-x64.tar.gz -[rhel-6-targz-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-rhel.6-x64.tar.gz.sha - -[linux-musl-x64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_musl_x64_Release_version_badge.svg?no-cache +[linux-musl-x64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_musl_x64_Release_version_badge.svg [linux-musl-x64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-linux-musl-x64.txt [linux-musl-x64-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-musl-x64.tar.gz [linux-musl-x64-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-musl-x64.tar.gz.sha @@ -329,12 +286,7 @@ Reference notes: [linux-musl-x64-targz-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-linux-musl-x64.tar.gz [linux-musl-x64-targz-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-linux-musl-x64.tar.gz.sha -[linux-musl-x64-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/linux_musl_x64_Release_version_badge.svg?no-cache -[linux-musl-x64-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-linux-musl-x64.txt -[linux-musl-x64-targz-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-linux-musl-x64.tar.gz -[linux-musl-x64-targz-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-linux-musl-x64.tar.gz.sha - -[linux-musl-arm-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_musl_arm_Release_version_badge.svg?no-cache +[linux-musl-arm-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_musl_arm_Release_version_badge.svg [linux-musl-arm-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-linux-musl-arm.txt [linux-musl-arm-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-musl-arm.tar.gz [linux-musl-arm-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-musl-arm.tar.gz.sha @@ -344,12 +296,7 @@ Reference notes: [linux-musl-arm-targz-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-linux-musl-arm.tar.gz [linux-musl-arm-targz-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-linux-musl-arm.tar.gz.sha -[linux-musl-arm-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/linux_musl_arm_Release_version_badge.svg?no-cache -[linux-musl-arm-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-linux-musl-arm.txt -[linux-musl-arm-targz-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-linux-musl-arm.tar.gz -[linux-musl-arm-targz-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-linux-musl-arm.tar.gz.sha - -[linux-musl-arm64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_musl_arm64_Release_version_badge.svg?no-cache +[linux-musl-arm64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/linux_musl_arm64_Release_version_badge.svg [linux-musl-arm64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-linux-musl-arm64.txt [linux-musl-arm64-targz-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-musl-arm64.tar.gz [linux-musl-arm64-targz-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-linux-musl-arm64.tar.gz.sha @@ -359,12 +306,7 @@ Reference notes: [linux-musl-arm64-targz-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-linux-musl-arm64.tar.gz [linux-musl-arm64-targz-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-linux-musl-arm64.tar.gz.sha -[linux-musl-arm64-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/linux_musl_arm64_Release_version_badge.svg?no-cache -[linux-musl-arm64-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-linux-musl-arm64.txt -[linux-musl-arm64-targz-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-linux-musl-arm64.tar.gz -[linux-musl-arm64-targz-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-linux-musl-arm64.tar.gz.sha - -[win-arm-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/win_arm_Release_version_badge.svg?no-cache +[win-arm-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/win_arm_Release_version_badge.svg [win-arm-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-win-arm.txt [win-arm-zip-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-arm.zip [win-arm-zip-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-arm.zip.sha @@ -374,12 +316,7 @@ Reference notes: [win-arm-zip-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-win-arm.zip [win-arm-zip-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-win-arm.zip.sha -[win-arm-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/win_arm_Release_version_badge.svg?no-cache -[win-arm-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-win-arm.txt -[win-arm-zip-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-arm.zip -[win-arm-zip-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-arm.zip.sha - -[win-arm64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/win_arm64_Release_version_badge.svg?no-cache +[win-arm64-badge-main]: https://aka.ms/dotnet/8.0.1xx/daily/win_arm64_Release_version_badge.svg [win-arm64-version-main]: https://aka.ms/dotnet/8.0.1xx/daily/productCommit-win-arm64.txt [win-arm64-installer-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-arm64.exe [win-arm64-installer-checksum-main]: https://aka.ms/dotnet/8.0.1xx/daily/dotnet-sdk-win-arm64.exe.sha @@ -393,16 +330,8 @@ Reference notes: [win-arm64-zip-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-win-arm64.zip [win-arm64-zip-checksum-7.0.2XX]: https://aka.ms/dotnet/7.0.2xx/daily/dotnet-sdk-win-arm64.zip.sha -[win-arm64-badge-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/win_arm64_Release_version_badge.svg?no-cache -[win-arm64-version-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/productCommit-win-arm64.txt -[win-arm64-installer-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-arm64.exe -[win-arm64-installer-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-arm64.exe.sha -[win-arm64-zip-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-arm64.zip -[win-arm64-zip-checksum-7.0.1XX]: https://aka.ms/dotnet/7.0.1xx/daily/dotnet-sdk-win-arm64.zip.sha - [sdk-shas-2.2.1XX]: https://github.com/dotnet/versions/tree/master/build-info/dotnet/product/cli/release/2.2#built-repositories - Looking for dotnet-install sources? ----------------------------------- diff --git a/eng/Build.props b/eng/Build.props index ed33d0bbf..7e501b9fc 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -1,17 +1,8 @@ - - - - - - - - - diff --git a/eng/ManualVersions.props b/eng/ManualVersions.props index 7707ace1a..2bf456f30 100644 --- a/eng/ManualVersions.props +++ b/eng/ManualVersions.props @@ -9,11 +9,11 @@ Basically: In this file, choose the highest version when resolving merge conflicts. --> - 10.0.17763.27 - 10.0.18362.27 - 10.0.19041.27 - 10.0.20348.27 - 10.0.22000.27 - 10.0.22621.27 + 10.0.17763.28 + 10.0.18362.28 + 10.0.19041.28 + 10.0.20348.28 + 10.0.22000.28 + 10.0.22621.28 diff --git a/eng/Signing.props b/eng/Signing.props index 3a2373f9e..0d49f78d1 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -7,12 +7,9 @@ - - - - - - + + + diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index a2831d574..9ebca97ff 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -11,6 +11,7 @@ $(InnerBuildArgs) /p:IncludeNuGetPackageArchive=false $(InnerBuildArgs) /p:IncludeAdditionalSharedFrameworks=false $(InnerBuildArgs) /p:IncludeSharedFrameworksForBackwardsCompatibilityTests=false + $(InnerBuildArgs) /p:DISABLE_CROSSGEN=true diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ab801caa7..68f953edd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,46 +1,46 @@ - + https://github.com/dotnet/windowsdesktop - 9162860562ca3b6a02d2d5683c12a668058727d8 + c3b86bdbd46ba1dcb6d59b5c92120636065d9ebb - + https://github.com/dotnet/windowsdesktop - 9162860562ca3b6a02d2d5683c12a668058727d8 + c3b86bdbd46ba1dcb6d59b5c92120636065d9ebb - + https://github.com/dotnet/windowsdesktop - 9162860562ca3b6a02d2d5683c12a668058727d8 + c3b86bdbd46ba1dcb6d59b5c92120636065d9ebb - + https://github.com/dotnet/windowsdesktop - 9162860562ca3b6a02d2d5683c12a668058727d8 + c3b86bdbd46ba1dcb6d59b5c92120636065d9ebb - + https://github.com/dotnet/runtime - bdd67af67dbf43c0f5e9151b98dc100b9555898a + 1a37caf773a3b857ccff49a31be3333d4fdc491f - + https://github.com/dotnet/runtime - bdd67af67dbf43c0f5e9151b98dc100b9555898a + 1a37caf773a3b857ccff49a31be3333d4fdc491f - + https://github.com/dotnet/runtime - bdd67af67dbf43c0f5e9151b98dc100b9555898a + 1a37caf773a3b857ccff49a31be3333d4fdc491f - + https://github.com/dotnet/runtime - bdd67af67dbf43c0f5e9151b98dc100b9555898a + 1a37caf773a3b857ccff49a31be3333d4fdc491f - + https://github.com/dotnet/runtime - bdd67af67dbf43c0f5e9151b98dc100b9555898a + 1a37caf773a3b857ccff49a31be3333d4fdc491f - + https://github.com/dotnet/runtime - bdd67af67dbf43c0f5e9151b98dc100b9555898a + 1a37caf773a3b857ccff49a31be3333d4fdc491f @@ -48,141 +48,141 @@ https://github.com/dotnet/core-setup 7d57652f33493fa022125b7f63aad0d70c52d810 - + https://github.com/dotnet/runtime - bdd67af67dbf43c0f5e9151b98dc100b9555898a + 1a37caf773a3b857ccff49a31be3333d4fdc491f - + https://github.com/dotnet/aspnetcore - fb6b2e25211f9d310aa03edfbda9e38a066960b1 + 232ec2e3a48b0c1f60dd02617891ca84b87aa9bf - + https://github.com/dotnet/aspnetcore - fb6b2e25211f9d310aa03edfbda9e38a066960b1 + 232ec2e3a48b0c1f60dd02617891ca84b87aa9bf - + https://github.com/dotnet/aspnetcore - fb6b2e25211f9d310aa03edfbda9e38a066960b1 + 232ec2e3a48b0c1f60dd02617891ca84b87aa9bf - + https://github.com/dotnet/aspnetcore - fb6b2e25211f9d310aa03edfbda9e38a066960b1 + 232ec2e3a48b0c1f60dd02617891ca84b87aa9bf - + https://github.com/dotnet/aspnetcore - fb6b2e25211f9d310aa03edfbda9e38a066960b1 + 232ec2e3a48b0c1f60dd02617891ca84b87aa9bf - + https://github.com/dotnet/aspnetcore - fb6b2e25211f9d310aa03edfbda9e38a066960b1 + 232ec2e3a48b0c1f60dd02617891ca84b87aa9bf - + https://github.com/dotnet/aspnetcore - fb6b2e25211f9d310aa03edfbda9e38a066960b1 + 232ec2e3a48b0c1f60dd02617891ca84b87aa9bf https://github.com/dotnet/test-templates 0385265f4d0b6413d64aea0223172366a9b9858c - + https://github.com/dotnet/test-templates - ca9eef3c1518234d96cc1c2828f1bdf90fc708f8 + bb3695688177f5f80eeb3c0498168612e31549d5 - + https://github.com/dotnet/test-templates - ca9eef3c1518234d96cc1c2828f1bdf90fc708f8 + bb3695688177f5f80eeb3c0498168612e31549d5 - + https://github.com/dotnet/test-templates - ca9eef3c1518234d96cc1c2828f1bdf90fc708f8 + bb3695688177f5f80eeb3c0498168612e31549d5 - + https://github.com/dotnet/test-templates - ca9eef3c1518234d96cc1c2828f1bdf90fc708f8 + bb3695688177f5f80eeb3c0498168612e31549d5 - + https://github.com/dotnet/sdk - d609699901b0d25bf939553b342ea887f8d7ef7f + 99c01747309cac187b8999f23291555b1607337c - + https://github.com/dotnet/sdk - d609699901b0d25bf939553b342ea887f8d7ef7f + 99c01747309cac187b8999f23291555b1607337c - + https://github.com/dotnet/sdk - d609699901b0d25bf939553b342ea887f8d7ef7f + 99c01747309cac187b8999f23291555b1607337c - + https://github.com/dotnet/sdk - d609699901b0d25bf939553b342ea887f8d7ef7f + 99c01747309cac187b8999f23291555b1607337c - + https://github.com/dotnet/winforms - 8f1be5d8453763501aea20070bb6cabf97a49b34 + 4f4829de9a3b4c56496a60ec18d774ca40956b53 - + https://github.com/dotnet/wpf - 959913ec4f81cc388928fad0c95840bf3ee4962b + ca0aecdb68840ba5d66ade7414e0ad5ee0cd73a5 - + https://github.com/dotnet/fsharp - a934894437658f001c6388d33859da73a1ba2ba9 + 3130e06ce88bc3d6171f5127cdb9972e776af911 - + https://github.com/dotnet/fsharp - a934894437658f001c6388d33859da73a1ba2ba9 + 3130e06ce88bc3d6171f5127cdb9972e776af911 - + https://github.com/microsoft/vstest - eb9fca1710b0430741b279fccdfb24a72151a45b + d7b66728d22dd5cdee5fb1e2bc385f9f2cd03171 - + https://github.com/dotnet/linker - 391ac60bbfb2c618b82f08af728d2d4d259d584e + 2db841fc5f6bc7592b66ffe3bd0e1c888d022f93 linker - + https://github.com/dotnet/roslyn - c9a6d5cf04904ebd2b1aaab0adb33df16c8e76a6 + c80d6495d55ebbd64372755d236d0e5971b2dfc7 - + https://github.com/dotnet/msbuild - 3777dcaf7edb3e86a070037ba53e742dd1872873 + eb5ebc23a99af31731a6b6c403ceda0b44aa9966 - + https://github.com/nuget/nuget.client - 41c08c5549ac3c738d5bf369014da059eff53fbd + 0e7accb78d0df80cda1bffbcf1d522945e8a1112 https://github.com/Microsoft/ApplicationInsights-dotnet 53b80940842204f78708a538628288ff5d741a1d - + https://github.com/dotnet/emsdk - 43618b75f5db5c38a8649c4511fd5e768b200ad7 + 66b984594a008151bdb14dc60589373e3d44be83 - + https://github.com/dotnet/emsdk - 43618b75f5db5c38a8649c4511fd5e768b200ad7 + 66b984594a008151bdb14dc60589373e3d44be83 https://github.com/dotnet/deployment-tools c3ad00ae84489071080a606f6a8e43c9a91a5cc2 - + https://github.com/dotnet/source-build-externals - 4d37f75b11b8613594fcb38bd9b965a75877c49f + 0c829ba73b00f015ab35d14f3cc974e79eb79ef0 @@ -192,34 +192,34 @@ - + https://github.com/dotnet/arcade - 5be556106f26f171f32187951b9a141f9580d03a + cb37e1f67041bfc6484ec47525bda461606efe92 - + https://github.com/dotnet/arcade - 5be556106f26f171f32187951b9a141f9580d03a + cb37e1f67041bfc6484ec47525bda461606efe92 - + https://github.com/dotnet/arcade - 5be556106f26f171f32187951b9a141f9580d03a + cb37e1f67041bfc6484ec47525bda461606efe92 - + https://github.com/dotnet/arcade-services - 7a093e86507405b990f0e6aa5c634c9a5585319f + 11dfc0ff33280c18db03a2108673a41ade41fd55 - + https://github.com/dotnet/arcade-services - 7a093e86507405b990f0e6aa5c634c9a5585319f + 11dfc0ff33280c18db03a2108673a41ade41fd55 - + https://github.com/dotnet/runtime - 06aceb7015f3bd2ff019ef5920d2354eb2ea2c92 + af841c8b33cecc92d74222298f1e45bf7bf3d90a - + https://github.com/dotnet/source-build-reference-packages - dab1b0db4f4937b9213c5aecc5a5279d88180741 + 9e4ae1f23e429bd64744dc71b202a5f1f4d822ce @@ -227,9 +227,9 @@ d047202874ad79d72c75b6354c0f8a9a12d1b054 - + https://github.com/dotnet/xliff-tasks - 366ad9b9f7af7d0eddbd36d1e13d8fcff0ac99db + e3a6aaa38a3ad2284de2d50ff65ae4a8916db003 diff --git a/eng/Versions.props b/eng/Versions.props index 5df8c8b93..bc9ec2b98 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -26,27 +26,31 @@ - 8.0.0-beta.22552.1 + 8.0.0-beta.22612.4 - 1.1.0-beta.22554.2 + 1.1.0-beta.23053.1 - 8.0.0-alpha.1.22531.9 + 8.0.0-alpha.1.22602.3 - 8.0.0-alpha.1.22551.2 + 8.0.0-alpha.1.22603.1 + + 1.0.2-beta4.22406.1 1.0.2-beta4.22406.1 - 1.1.0-rc.22551.3 - 1.1.0-rc.22551.3 - 1.1.0-rc.22551.3 - 1.1.0-rc.22551.3 + + 1.1.0-rc.22558.1 + 1.1.0-rc.22558.1 + 1.1.0-rc.22558.1 + 1.1.0-rc.22558.1 + 1.1.0-rc.22558.1 @@ -54,46 +58,46 @@ - 8.0.0-alpha.1.22552.16 - 8.0.0-alpha.1.22552.16 - 8.0.0-alpha.1.22552.16 - 8.0.0-alpha.1.22552.16 - 8.0.0-alpha.1.22552.16 - 8.0.0-alpha.1.22552.16 - 8.0.0-alpha.1.22552.16 + 8.0.0-alpha.1.22615.1 + 8.0.0-alpha.1.22615.1 + 8.0.0-alpha.1.22615.1 + 8.0.0-alpha.1.22615.1 + 8.0.0-alpha.1.22615.1 + 8.0.0-alpha.1.22615.1 + 8.0.0-alpha.1.22615.1 0.2.0 - 8.0.100 - 8.0.100-alpha.1.22553.26 - 8.0.100-alpha.1.22553.26 + 8.0.100-alpha.1.22615.13 + 8.0.100-alpha.1.22615.13 + 8.0.100-alpha.1.22615.13 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) - 8.0.0-alpha.1.22551.9 + 8.0.0-alpha.1.22605.1 - 8.0.0-alpha.1.22551.9 - 8.0.0-alpha.1.22551.9 - 8.0.0-alpha.1.22551.9 - 8.0.0-alpha.1.22551.9 - 8.0.0-alpha.1.22551.9 - 8.0.0-alpha.1.22551.9 + 8.0.0-alpha.1.22605.1 + 8.0.0-alpha.1.22605.1 + 8.0.0-alpha.1.22605.1 + 8.0.0-alpha.1.22605.1 + 8.0.0-alpha.1.22605.1 + 8.0.0-alpha.1.22605.1 2.1.0 - 8.0.0-alpha.1.22552.1 - 8.0.0-alpha.1.22552.1 - 8.0.0-alpha.1.22552.1 - 8.0.0-alpha.1.22552.1 + 8.0.0-alpha.1.22614.1 + 8.0.0-alpha.1.22614.1 + 8.0.0-alpha.1.22614.1 + 8.0.0-alpha.1.22614.1 @@ -111,16 +115,16 @@ 5.0.403 6.0.302 - 7.0.100-rc.1.22429.2 - 5.0.13 - 6.0.1 - 7.0.0-rc.1.22427.2 + 7.0.100 + 5.0.17 + 6.0.11 + 7.0.0 5.0.17-servicing.22215.4 5.0.17-servicing.22218.2 6.0.7-servicing.22322.3 6.0.7-servicing.22322.2 - 7.0.0-rc.1.22426.4 - 7.0.0-rc.1.22427.1 + 7.0.0-rtm.22518.7 + 7.0.0-rtm.22518.2 $(MicrosoftNETCoreAppRuntimePackageVersion) @@ -138,19 +142,19 @@ $(MicrosoftDotNetCommonItemTemplatesPackageVersion) $(MicrosoftAspNetCoreAppRuntimePackageVersion) - 7.0.0-rc.1.22426.4 - 7.0.0-rc.1.22427.1 + $(MicrosoftWinFormsProjectTemplates70PackageVersion) + $(MicrosoftWPFProjectTemplates70PackageVersion) $(NUnit3DotNetNewTemplatePackageVersion) - 7.0.100-rc.1.22429.2 - 7.0.100-rc.1.22429.2 - 7.0.0-rc.1.22427.2 + $(MicrosoftDotNetCommonItemTemplates70PackageVersion) + $(MicrosoftDotNetCommonItemTemplates70PackageVersion) + 7.0.0 $(MicrosoftWinFormsProjectTemplates60PackageVersion) $(MicrosoftWPFProjectTemplates60PackageVersion) $(NUnit3DotNetNewTemplatePackageVersion) $(MicrosoftDotNetCommonItemTemplates60PackageVersion) $(MicrosoftDotNetCommonItemTemplates60PackageVersion) - 6.0.10 + 6.0.11 $(MicrosoftWinFormsProjectTemplates50PackageVersion) $(MicrosoftWPFProjectTemplates50PackageVersion) @@ -164,8 +168,7 @@ 1.7.2 3.1.27 $(MicrosoftDotNetCommonItemTemplates31PackageVersion) - $(MicrosoftDotNetTestProjectTemplates50PackageVersion) - 3.1.30 + 3.1.31 3.2.1 4.8.0-rc2.19462.10 @@ -173,58 +176,40 @@ 1.6.5 2.0.0-preview8.19373.1 $(MicrosoftDotNetCommonItemTemplates30PackageVersion) - $(MicrosoftDotNetTestProjectTemplates30PackageVersion) 3.0.1 1.5.3 1.0.2-beta3 $(MicrosoftDotNetCommonItemTemplates21PackageVersion) - $(MicrosoftDotNetTestProjectTemplates30PackageVersion) 2.1.34 2.2.0-beta.19072.10 2.0.0 - 17.5.0-preview-20221102-03 - 7.0.0-rc.1.22426.10 - - - - - 15.7.179 - 15.7.179 - - 7.0.100-rc.2 + 17.5.0-preview-20221214-01 + 8.0.0-alpha.1.22557.12 - 7.0.100-rc.1 - 7.0.0-rc.1.6430 - 33.0.0-rc.1.136 - 15.4.1006-rc.1 - 15.4.1006-rc.1 - 12.3.1006-rc.1 - 15.4.1006-rc.1 + 7.0.100 + 7.0.49 + 33.0.4 + 16.0.1478 + 15.4.2372 + 12.3.2372 + 16.0.1478 $(MicrosoftNETCoreAppRefPackageVersion) - 8.0.0-alpha.1.22552.9 - 8.0.0-alpha.1.22552.9 + 8.0.0-alpha.1.22620.1 + 8.0.0-alpha.1.22620.1 $(MicrosoftNETWorkloadEmscriptennet7Manifest80100Version) + + + + 15.7.179 + 15.7.179 + 2.0.1-servicing-26011-01 diff --git a/eng/build.yml b/eng/build.yml index a76933ee1..121f81771 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -63,8 +63,13 @@ parameters: type: boolean default: false +- name: isBuiltFromVmr + displayName: True when build is running from dotnet/dotnet + type: boolean + default: false + jobs: -- template: /eng/common/templates/job/job.yml +- template: common/templates/job/job.yml parameters: # Set up the name of the job. ${{ if parameters.pgoInstrument }}: @@ -96,9 +101,12 @@ jobs: vmImage: 'macOS-latest' timeoutInMinutes: ${{ parameters.timeoutInMinutes }} - enablePublishBuildAssets: true - enablePublishUsingPipelines: true - enableTelemetry: true + ${{ if parameters.isBuiltFromVmr }}: + enableSbom: false + ${{ else }}: + enablePublishBuildAssets: true + enablePublishUsingPipelines: true + enableTelemetry: true helixRepo: dotnet/installer workspace: clean: all @@ -139,29 +147,40 @@ jobs: - _SignType: test - _BuildArgs: '/p:DotNetSignType=$(_SignType) $(_PgoInstrument)' - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: DotNet-HelixApi-Access - - _PushToVSFeed: true - - _SignType: real + - ${{ if parameters.isBuiltFromVmr }}: + - installerRoot: '$(Build.SourcesDirectory)/src/installer' + - _SignType: test + - _PushToVSFeed: false - _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) - /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) + /p:DotNetPublishUsingPipelines=true + /p:PublishToSymbolServer=false $(_PgoInstrument) + - ${{ else }}: + - installerRoot: '$(Build.SourcesDirectory)' + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - group: DotNet-HelixApi-Access + - _PushToVSFeed: true + - _SignType: real + - _BuildArgs: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + /p:DotNetSignType=$(_SignType) + /p:TeamName=$(_TeamName) + /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) + $(_PgoInstrument) steps: - checkout: self clean: true - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - ${{ if and(not(parameters.isBuiltFromVmr), ne(variables['System.TeamProject'], 'public')) }}: - task: PowerShell@2 displayName: Setup Private Feeds Credentials inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + filePath: $(installerRoot)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(installerRoot)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) - - script: build.cmd + - script: $(installerRoot)/build.cmd $(_TestArg) $(_PackArg) -publish -ci -sign -Configuration ${{ parameters.buildConfiguration }} @@ -174,16 +193,16 @@ jobs: DOTNET_CLI_UI_LANGUAGE: ${{ parameters.dotnetCLIUILanguage }} - ${{ if ne(parameters.agentOs, 'Windows_NT') }}: - - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - ${{ if and(not(parameters.isBuiltFromVmr), ne(variables['System.TeamProject'], 'public')) }}: - task: Bash@3 displayName: Setup Private Feeds Credentials inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh - arguments: $(Build.SourcesDirectory)/NuGet.config $Token + filePath: $(installerRoot)/eng/common/SetupNugetSources.sh + arguments: $(installerRoot)/NuGet.config $Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) - ${{ if eq(parameters.agentOs, 'Linux') }}: - - script: ./build.sh + - script: $(installerRoot)/build.sh $(_TestArg) $(_PackArg) --publish --ci --noprettyprint @@ -197,7 +216,7 @@ jobs: displayName: Build - ${{ if or(eq(parameters.agentOs, 'Darwin'), eq(parameters.agentOs, 'FreeBSD')) }}: - - script: ./build.sh + - script: $(installerRoot)/build.sh $(_TestArg) --pack --publish --ci --noprettyprint @@ -222,7 +241,7 @@ jobs: - task: CopyFiles@2 displayName: Gather Logs inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' + SourceFolder: '$(installerRoot)/artifacts' Contents: | log/${{ parameters.buildConfiguration }}/**/* TestResults/${{ parameters.buildConfiguration }}/**/* diff --git a/eng/common/cross/arm/tizen-build-rootfs.sh b/eng/common/cross/arm/tizen-build-rootfs.sh deleted file mode 100644 index 9fdb32e92..000000000 --- a/eng/common/cross/arm/tizen-build-rootfs.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -set -e - -__ARM_HARDFP_CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -__TIZEN_CROSSDIR="$__ARM_HARDFP_CrossDir/tizen" - -if [[ -z "$ROOTFS_DIR" ]]; then - echo "ROOTFS_DIR is not defined." - exit 1; -fi - -TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp -mkdir -p $TIZEN_TMP_DIR - -# Download files -echo ">>Start downloading files" -VERBOSE=1 $__ARM_HARDFP_CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR -echo "<>Start constructing Tizen rootfs" -TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm` -cd $ROOTFS_DIR -for f in $TIZEN_RPM_FILES; do - rpm2cpio $f | cpio -idm --quiet -done -echo "<>Start configuring Tizen rootfs" -ln -sfn asm-arm ./usr/include/asm -patch -p1 < $__TIZEN_CROSSDIR/tizen.patch -echo "</dev/null; then - VERBOSE=0 -fi - -Log() -{ - if [ $VERBOSE -ge $1 ]; then - echo ${@:2} - fi -} - -Inform() -{ - Log 1 -e "\x1B[0;34m$@\x1B[m" -} - -Debug() -{ - Log 2 -e "\x1B[0;32m$@\x1B[m" -} - -Error() -{ - >&2 Log 0 -e "\x1B[0;31m$@\x1B[m" -} - -Fetch() -{ - URL=$1 - FILE=$2 - PROGRESS=$3 - if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then - CURL_OPT="--progress-bar" - else - CURL_OPT="--silent" - fi - curl $CURL_OPT $URL > $FILE -} - -hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; } -hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; } -hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; } - -TMPDIR=$1 -if [ ! -d $TMPDIR ]; then - TMPDIR=./tizen_tmp - Debug "Create temporary directory : $TMPDIR" - mkdir -p $TMPDIR -fi - -TIZEN_URL=http://download.tizen.org/snapshots/TIZEN/Tizen -BUILD_XML=build.xml -REPOMD_XML=repomd.xml -PRIMARY_XML=primary.xml -TARGET_URL="http://__not_initialized" - -Xpath_get() -{ - XPATH_RESULT='' - XPATH=$1 - XML_FILE=$2 - RESULT=$(xmllint --xpath $XPATH $XML_FILE) - if [[ -z ${RESULT// } ]]; then - Error "Can not find target from $XML_FILE" - Debug "Xpath = $XPATH" - exit 1 - fi - XPATH_RESULT=$RESULT -} - -fetch_tizen_pkgs_init() -{ - TARGET=$1 - PROFILE=$2 - Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE" - - TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs - if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi - mkdir -p $TMP_PKG_DIR - - PKG_URL=$TIZEN_URL/$PROFILE/latest - - BUILD_XML_URL=$PKG_URL/$BUILD_XML - TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML - TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML - TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML - TMP_PRIMARYGZ=${TMP_PRIMARY}.gz - - Fetch $BUILD_XML_URL $TMP_BUILD - - Debug "fetch $BUILD_XML_URL to $TMP_BUILD" - - TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()" - Xpath_get $TARGET_XPATH $TMP_BUILD - TARGET_PATH=$XPATH_RESULT - TARGET_URL=$PKG_URL/$TARGET_PATH - - REPOMD_URL=$TARGET_URL/repodata/repomd.xml - PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)' - - Fetch $REPOMD_URL $TMP_REPOMD - - Debug "fetch $REPOMD_URL to $TMP_REPOMD" - - Xpath_get $PRIMARY_XPATH $TMP_REPOMD - PRIMARY_XML_PATH=$XPATH_RESULT - PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH - - Fetch $PRIMARY_URL $TMP_PRIMARYGZ - - Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ" - - gunzip $TMP_PRIMARYGZ - - Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY" -} - -fetch_tizen_pkgs() -{ - ARCH=$1 - PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)' - - PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())' - - for pkg in ${@:2} - do - Inform "Fetching... $pkg" - XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg} - XPATH=${XPATH/_ARCH_/$ARCH} - Xpath_get $XPATH $TMP_PRIMARY - PKG_PATH=$XPATH_RESULT - - XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg} - XPATH=${XPATH/_ARCH_/$ARCH} - Xpath_get $XPATH $TMP_PRIMARY - CHECKSUM=$XPATH_RESULT - - PKG_URL=$TARGET_URL/$PKG_PATH - PKG_FILE=$(basename $PKG_PATH) - PKG_PATH=$TMPDIR/$PKG_FILE - - Debug "Download $PKG_URL to $PKG_PATH" - Fetch $PKG_URL $PKG_PATH true - - echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null - if [ $? -ne 0 ]; then - Error "Fail to fetch $PKG_URL to $PKG_PATH" - Debug "Checksum = $CHECKSUM" - exit 1 - fi - done -} - -Inform "Initialize arm base" -fetch_tizen_pkgs_init standard Tizen-Base -Inform "fetch common packages" -fetch_tizen_pkgs armv7hl gcc gcc-devel-static glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel keyutils keyutils-devel libkeyutils -Inform "fetch coreclr packages" -fetch_tizen_pkgs armv7hl lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu -Inform "fetch corefx packages" -fetch_tizen_pkgs armv7hl libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel - -Inform "Initialize standard unified" -fetch_tizen_pkgs_init standard Tizen-Unified -Inform "fetch corefx packages" -fetch_tizen_pkgs armv7hl gssdp gssdp-devel tizen-release - diff --git a/eng/common/cross/arm64/tizen-fetch.sh b/eng/common/cross/arm64/tizen-fetch.sh deleted file mode 100644 index 785bd8548..000000000 --- a/eng/common/cross/arm64/tizen-fetch.sh +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/env bash -set -e - -if [[ -z "${VERBOSE// }" ]] || [ "$VERBOSE" -ne "$VERBOSE" ] 2>/dev/null; then - VERBOSE=0 -fi - -Log() -{ - if [ $VERBOSE -ge $1 ]; then - echo ${@:2} - fi -} - -Inform() -{ - Log 1 -e "\x1B[0;34m$@\x1B[m" -} - -Debug() -{ - Log 2 -e "\x1B[0;32m$@\x1B[m" -} - -Error() -{ - >&2 Log 0 -e "\x1B[0;31m$@\x1B[m" -} - -Fetch() -{ - URL=$1 - FILE=$2 - PROGRESS=$3 - if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then - CURL_OPT="--progress-bar" - else - CURL_OPT="--silent" - fi - curl $CURL_OPT $URL > $FILE -} - -hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; } -hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; } -hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; } - -TMPDIR=$1 -if [ ! -d $TMPDIR ]; then - TMPDIR=./tizen_tmp - Debug "Create temporary directory : $TMPDIR" - mkdir -p $TMPDIR -fi - -TIZEN_URL=http://download.tizen.org/snapshots/TIZEN/Tizen -BUILD_XML=build.xml -REPOMD_XML=repomd.xml -PRIMARY_XML=primary.xml -TARGET_URL="http://__not_initialized" - -Xpath_get() -{ - XPATH_RESULT='' - XPATH=$1 - XML_FILE=$2 - RESULT=$(xmllint --xpath $XPATH $XML_FILE) - if [[ -z ${RESULT// } ]]; then - Error "Can not find target from $XML_FILE" - Debug "Xpath = $XPATH" - exit 1 - fi - XPATH_RESULT=$RESULT -} - -fetch_tizen_pkgs_init() -{ - TARGET=$1 - PROFILE=$2 - Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE" - - TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs - if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi - mkdir -p $TMP_PKG_DIR - - PKG_URL=$TIZEN_URL/$PROFILE/latest - - BUILD_XML_URL=$PKG_URL/$BUILD_XML - TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML - TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML - TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML - TMP_PRIMARYGZ=${TMP_PRIMARY}.gz - - Fetch $BUILD_XML_URL $TMP_BUILD - - Debug "fetch $BUILD_XML_URL to $TMP_BUILD" - - TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()" - Xpath_get $TARGET_XPATH $TMP_BUILD - TARGET_PATH=$XPATH_RESULT - TARGET_URL=$PKG_URL/$TARGET_PATH - - REPOMD_URL=$TARGET_URL/repodata/repomd.xml - PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)' - - Fetch $REPOMD_URL $TMP_REPOMD - - Debug "fetch $REPOMD_URL to $TMP_REPOMD" - - Xpath_get $PRIMARY_XPATH $TMP_REPOMD - PRIMARY_XML_PATH=$XPATH_RESULT - PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH - - Fetch $PRIMARY_URL $TMP_PRIMARYGZ - - Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ" - - gunzip $TMP_PRIMARYGZ - - Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY" -} - -fetch_tizen_pkgs() -{ - ARCH=$1 - PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)' - - PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())' - - for pkg in ${@:2} - do - Inform "Fetching... $pkg" - XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg} - XPATH=${XPATH/_ARCH_/$ARCH} - Xpath_get $XPATH $TMP_PRIMARY - PKG_PATH=$XPATH_RESULT - - XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg} - XPATH=${XPATH/_ARCH_/$ARCH} - Xpath_get $XPATH $TMP_PRIMARY - CHECKSUM=$XPATH_RESULT - - PKG_URL=$TARGET_URL/$PKG_PATH - PKG_FILE=$(basename $PKG_PATH) - PKG_PATH=$TMPDIR/$PKG_FILE - - Debug "Download $PKG_URL to $PKG_PATH" - Fetch $PKG_URL $PKG_PATH true - - echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null - if [ $? -ne 0 ]; then - Error "Fail to fetch $PKG_URL to $PKG_PATH" - Debug "Checksum = $CHECKSUM" - exit 1 - fi - done -} - -Inform "Initialize arm64 base" -fetch_tizen_pkgs_init standard Tizen-Base -Inform "fetch common packages" -fetch_tizen_pkgs aarch64 gcc glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel keyutils keyutils-devel libkeyutils -Inform "fetch coreclr packages" -fetch_tizen_pkgs aarch64 lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu -Inform "fetch corefx packages" -fetch_tizen_pkgs aarch64 libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel - -Inform "Initialize standard unified" -fetch_tizen_pkgs_init standard Tizen-Unified -Inform "fetch corefx packages" -fetch_tizen_pkgs aarch64 gssdp gssdp-devel tizen-release - diff --git a/eng/common/cross/armel/tizen-build-rootfs.sh b/eng/common/cross/armel/tizen-build-rootfs.sh deleted file mode 100755 index 9a4438af6..000000000 --- a/eng/common/cross/armel/tizen-build-rootfs.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -set -e - -__ARM_SOFTFP_CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -__TIZEN_CROSSDIR="$__ARM_SOFTFP_CrossDir/tizen" - -if [[ -z "$ROOTFS_DIR" ]]; then - echo "ROOTFS_DIR is not defined." - exit 1; -fi - -TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp -mkdir -p $TIZEN_TMP_DIR - -# Download files -echo ">>Start downloading files" -VERBOSE=1 $__ARM_SOFTFP_CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR -echo "<>Start constructing Tizen rootfs" -TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm` -cd $ROOTFS_DIR -for f in $TIZEN_RPM_FILES; do - rpm2cpio $f | cpio -idm --quiet -done -echo "<>Start configuring Tizen rootfs" -ln -sfn asm-arm ./usr/include/asm -patch -p1 < $__TIZEN_CROSSDIR/tizen.patch -echo "</dev/null; then - VERBOSE=0 -fi - -Log() -{ - if [ $VERBOSE -ge $1 ]; then - echo ${@:2} - fi -} - -Inform() -{ - Log 1 -e "\x1B[0;34m$@\x1B[m" -} - -Debug() -{ - Log 2 -e "\x1B[0;32m$@\x1B[m" -} - -Error() -{ - >&2 Log 0 -e "\x1B[0;31m$@\x1B[m" -} - -Fetch() -{ - URL=$1 - FILE=$2 - PROGRESS=$3 - if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then - CURL_OPT="--progress-bar" - else - CURL_OPT="--silent" - fi - curl $CURL_OPT $URL > $FILE -} - -hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; } -hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; } -hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; } - -TMPDIR=$1 -if [ ! -d $TMPDIR ]; then - TMPDIR=./tizen_tmp - Debug "Create temporary directory : $TMPDIR" - mkdir -p $TMPDIR -fi - -TIZEN_URL=http://download.tizen.org/snapshots/TIZEN/Tizen -BUILD_XML=build.xml -REPOMD_XML=repomd.xml -PRIMARY_XML=primary.xml -TARGET_URL="http://__not_initialized" - -Xpath_get() -{ - XPATH_RESULT='' - XPATH=$1 - XML_FILE=$2 - RESULT=$(xmllint --xpath $XPATH $XML_FILE) - if [[ -z ${RESULT// } ]]; then - Error "Can not find target from $XML_FILE" - Debug "Xpath = $XPATH" - exit 1 - fi - XPATH_RESULT=$RESULT -} - -fetch_tizen_pkgs_init() -{ - TARGET=$1 - PROFILE=$2 - Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE" - - TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs - if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi - mkdir -p $TMP_PKG_DIR - - PKG_URL=$TIZEN_URL/$PROFILE/latest - - BUILD_XML_URL=$PKG_URL/$BUILD_XML - TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML - TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML - TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML - TMP_PRIMARYGZ=${TMP_PRIMARY}.gz - - Fetch $BUILD_XML_URL $TMP_BUILD - - Debug "fetch $BUILD_XML_URL to $TMP_BUILD" - - TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()" - Xpath_get $TARGET_XPATH $TMP_BUILD - TARGET_PATH=$XPATH_RESULT - TARGET_URL=$PKG_URL/$TARGET_PATH - - REPOMD_URL=$TARGET_URL/repodata/repomd.xml - PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)' - - Fetch $REPOMD_URL $TMP_REPOMD - - Debug "fetch $REPOMD_URL to $TMP_REPOMD" - - Xpath_get $PRIMARY_XPATH $TMP_REPOMD - PRIMARY_XML_PATH=$XPATH_RESULT - PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH - - Fetch $PRIMARY_URL $TMP_PRIMARYGZ - - Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ" - - gunzip $TMP_PRIMARYGZ - - Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY" -} - -fetch_tizen_pkgs() -{ - ARCH=$1 - PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)' - - PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())' - - for pkg in ${@:2} - do - Inform "Fetching... $pkg" - XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg} - XPATH=${XPATH/_ARCH_/$ARCH} - Xpath_get $XPATH $TMP_PRIMARY - PKG_PATH=$XPATH_RESULT - - XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg} - XPATH=${XPATH/_ARCH_/$ARCH} - Xpath_get $XPATH $TMP_PRIMARY - CHECKSUM=$XPATH_RESULT - - PKG_URL=$TARGET_URL/$PKG_PATH - PKG_FILE=$(basename $PKG_PATH) - PKG_PATH=$TMPDIR/$PKG_FILE - - Debug "Download $PKG_URL to $PKG_PATH" - Fetch $PKG_URL $PKG_PATH true - - echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null - if [ $? -ne 0 ]; then - Error "Fail to fetch $PKG_URL to $PKG_PATH" - Debug "Checksum = $CHECKSUM" - exit 1 - fi - done -} - -Inform "Initialize armel base" -fetch_tizen_pkgs_init standard Tizen-Base -Inform "fetch common packages" -fetch_tizen_pkgs armv7l gcc gcc-devel-static glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel keyutils keyutils-devel libkeyutils -Inform "fetch coreclr packages" -fetch_tizen_pkgs armv7l lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu -Inform "fetch corefx packages" -fetch_tizen_pkgs armv7l libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel - -Inform "Initialize standard unified" -fetch_tizen_pkgs_init standard Tizen-Unified -Inform "fetch corefx packages" -fetch_tizen_pkgs armv7l gssdp gssdp-devel tizen-release - diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index eddb4c380..b04d3b380 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -501,7 +501,7 @@ elif [[ -n "$__CodeName" ]]; then popd fi elif [[ "$__Tizen" == "tizen" ]]; then - ROOTFS_DIR="$__RootfsDir" "$__CrossDir/$__BuildArch/tizen-build-rootfs.sh" + ROOTFS_DIR="$__RootfsDir" "$__CrossDir/tizen-build-rootfs.sh" "$__BuildArch" else echo "Unsupported target platform." usage; diff --git a/eng/common/cross/arm64/tizen-build-rootfs.sh b/eng/common/cross/tizen-build-rootfs.sh similarity index 55% rename from eng/common/cross/arm64/tizen-build-rootfs.sh rename to eng/common/cross/tizen-build-rootfs.sh index 13bfddb5e..ac84173d4 100644 --- a/eng/common/cross/arm64/tizen-build-rootfs.sh +++ b/eng/common/cross/tizen-build-rootfs.sh @@ -1,8 +1,34 @@ #!/usr/bin/env bash set -e +ARCH=$1 +LINK_ARCH=$ARCH + +case "$ARCH" in + arm) + TIZEN_ARCH="armv7hl" + ;; + armel) + TIZEN_ARCH="armv7l" + LINK_ARCH="arm" + ;; + arm64) + TIZEN_ARCH="aarch64" + ;; + x86) + TIZEN_ARCH="i686" + ;; + x64) + TIZEN_ARCH="x86_64" + LINK_ARCH="x86" + ;; + *) + echo "Unsupported architecture for tizen: $ARCH" + exit 1 +esac + __CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -__TIZEN_CROSSDIR="$__CrossDir/tizen" +__TIZEN_CROSSDIR="$__CrossDir/${ARCH}/tizen" if [[ -z "$ROOTFS_DIR" ]]; then echo "ROOTFS_DIR is not defined." @@ -14,7 +40,7 @@ mkdir -p $TIZEN_TMP_DIR # Download files echo ">>Start downloading files" -VERBOSE=1 $__CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR +VERBOSE=1 $__CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR $TIZEN_ARCH echo "<>Start constructing Tizen rootfs" @@ -30,6 +56,6 @@ rm -rf $TIZEN_TMP_DIR # Configure Tizen rootfs echo ">>Start configuring Tizen rootfs" -ln -sfn asm-arm64 ./usr/include/asm +ln -sfn asm-${LINK_ARCH} ./usr/include/asm patch -p1 < $__TIZEN_CROSSDIR/tizen.patch echo "</dev/null; then + VERBOSE=0 +fi + +Log() +{ + if [ $VERBOSE -ge $1 ]; then + echo ${@:2} + fi +} + +Inform() +{ + Log 1 -e "\x1B[0;34m$@\x1B[m" +} + +Debug() +{ + Log 2 -e "\x1B[0;32m$@\x1B[m" +} + +Error() +{ + >&2 Log 0 -e "\x1B[0;31m$@\x1B[m" +} + +Fetch() +{ + URL=$1 + FILE=$2 + PROGRESS=$3 + if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then + CURL_OPT="--progress-bar" + else + CURL_OPT="--silent" + fi + curl $CURL_OPT $URL > $FILE +} + +hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; } +hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; } +hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; } + +TMPDIR=$1 +if [ ! -d $TMPDIR ]; then + TMPDIR=./tizen_tmp + Debug "Create temporary directory : $TMPDIR" + mkdir -p $TMPDIR +fi + +TIZEN_ARCH=$2 + +TIZEN_URL=http://download.tizen.org/snapshots/TIZEN/Tizen +BUILD_XML=build.xml +REPOMD_XML=repomd.xml +PRIMARY_XML=primary.xml +TARGET_URL="http://__not_initialized" + +Xpath_get() +{ + XPATH_RESULT='' + XPATH=$1 + XML_FILE=$2 + RESULT=$(xmllint --xpath $XPATH $XML_FILE) + if [[ -z ${RESULT// } ]]; then + Error "Can not find target from $XML_FILE" + Debug "Xpath = $XPATH" + exit 1 + fi + XPATH_RESULT=$RESULT +} + +fetch_tizen_pkgs_init() +{ + TARGET=$1 + PROFILE=$2 + Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE" + + TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs + if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi + mkdir -p $TMP_PKG_DIR + + PKG_URL=$TIZEN_URL/$PROFILE/latest + + BUILD_XML_URL=$PKG_URL/$BUILD_XML + TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML + TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML + TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML + TMP_PRIMARYGZ=${TMP_PRIMARY}.gz + + Fetch $BUILD_XML_URL $TMP_BUILD + + Debug "fetch $BUILD_XML_URL to $TMP_BUILD" + + TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()" + Xpath_get $TARGET_XPATH $TMP_BUILD + TARGET_PATH=$XPATH_RESULT + TARGET_URL=$PKG_URL/$TARGET_PATH + + REPOMD_URL=$TARGET_URL/repodata/repomd.xml + PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)' + + Fetch $REPOMD_URL $TMP_REPOMD + + Debug "fetch $REPOMD_URL to $TMP_REPOMD" + + Xpath_get $PRIMARY_XPATH $TMP_REPOMD + PRIMARY_XML_PATH=$XPATH_RESULT + PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH + + Fetch $PRIMARY_URL $TMP_PRIMARYGZ + + Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ" + + gunzip $TMP_PRIMARYGZ + + Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY" +} + +fetch_tizen_pkgs() +{ + ARCH=$1 + PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)' + + PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())' + + for pkg in ${@:2} + do + Inform "Fetching... $pkg" + XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg} + XPATH=${XPATH/_ARCH_/$ARCH} + Xpath_get $XPATH $TMP_PRIMARY + PKG_PATH=$XPATH_RESULT + + XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg} + XPATH=${XPATH/_ARCH_/$ARCH} + Xpath_get $XPATH $TMP_PRIMARY + CHECKSUM=$XPATH_RESULT + + PKG_URL=$TARGET_URL/$PKG_PATH + PKG_FILE=$(basename $PKG_PATH) + PKG_PATH=$TMPDIR/$PKG_FILE + + Debug "Download $PKG_URL to $PKG_PATH" + Fetch $PKG_URL $PKG_PATH true + + echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null + if [ $? -ne 0 ]; then + Error "Fail to fetch $PKG_URL to $PKG_PATH" + Debug "Checksum = $CHECKSUM" + exit 1 + fi + done +} + +Inform "Initialize ${TIZEN_ARCH} base" +fetch_tizen_pkgs_init standard Tizen-Base +Inform "fetch common packages" +fetch_tizen_pkgs ${TIZEN_ARCH} gcc gcc-devel-static glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel keyutils keyutils-devel libkeyutils +Inform "fetch coreclr packages" +fetch_tizen_pkgs ${TIZEN_ARCH} lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu +Inform "fetch corefx packages" +fetch_tizen_pkgs ${TIZEN_ARCH} libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel + +Inform "Initialize standard unified" +fetch_tizen_pkgs_init standard Tizen-Unified +Inform "fetch corefx packages" +fetch_tizen_pkgs ${TIZEN_ARCH} gssdp gssdp-devel tizen-release + diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 561576be9..ccfb9951a 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -1,5 +1,12 @@ set(CROSS_ROOTFS $ENV{ROOTFS_DIR}) +# reset platform variables (e.g. cmake 3.25 sets LINUX=1) +unset(LINUX) +unset(FREEBSD) +unset(ILLUMOS) +unset(ANDROID) +unset(TIZEN) + set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH}) if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version) set(CMAKE_SYSTEM_NAME FreeBSD) @@ -113,6 +120,10 @@ if(TIZEN) include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/i586-tizen-linux-gnu) endif() + if(TARGET_ARCH_NAME STREQUAL "x64") + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/x86_64-tizen-linux-gnu) + endif() endif() if(ANDROID) @@ -241,7 +252,7 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") endif() -elseif(TARGET_ARCH_NAME STREQUAL "arm64") +elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64)$") if(TIZEN) add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64") diff --git a/eng/common/native/init-compiler.sh b/eng/common/native/init-compiler.sh index 41a26d802..292ebb653 100644 --- a/eng/common/native/init-compiler.sh +++ b/eng/common/native/init-compiler.sh @@ -132,8 +132,8 @@ if [[ -z "$CC" ]]; then exit 1 fi -# Only lld version >= 9 can be considered stable -if [[ "$compiler" == "clang" && "$majorVersion" -ge 9 ]]; then +# Only lld version >= 9 can be considered stable. lld doesn't support s390x. +if [[ "$compiler" == "clang" && "$majorVersion" -ge 9 && "$build_arch" != "s390x" ]]; then if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then LDFLAGS="-fuse-ld=lld" fi diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 index c35087a06..e10a59687 100644 --- a/eng/common/sdk-task.ps1 +++ b/eng/common/sdk-task.ps1 @@ -64,7 +64,7 @@ try { $GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty } if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) { - $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.2.1" -MemberType NoteProperty + $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.4.1" -MemberType NoteProperty } if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") { $xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml index 1f1b78f2d..42017109f 100644 --- a/eng/common/templates/job/publish-build-assets.yml +++ b/eng/common/templates/job/publish-build-assets.yml @@ -34,6 +34,7 @@ jobs: - job: Asset_Registry_Publish dependsOn: ${{ parameters.dependsOn }} + timeoutInMinutes: 150 ${{ if eq(parameters.publishAssetsImmediately, 'true') }}: displayName: Publish Assets @@ -73,12 +74,6 @@ jobs: - task: NuGetAuthenticate@0 - - task: PowerShell@2 - displayName: Enable cross-org NuGet feed authentication - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-all-orgs-artifact-feeds-rw) - - task: PowerShell@2 displayName: Publish Build Assets inputs: diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml index 1ac7f49a4..c24193acf 100644 --- a/eng/common/templates/post-build/common-variables.yml +++ b/eng/common/templates/post-build/common-variables.yml @@ -1,8 +1,4 @@ variables: - - group: AzureDevOps-Artifact-Feeds-Pats - - group: DotNet-Blob-Feed - - group: DotNet-DotNetCli-Storage - - group: DotNet-MSRC-Storage - group: Publish-Build-Assets # Whether the build is internal or not diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 91251d089..ef720f9d7 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -172,12 +172,6 @@ stages: - task: NuGetAuthenticate@0 displayName: 'Authenticate to AzDO Feeds' - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - # Signing validation will optionally work with the buildmanifest file which is downloaded from # Azure DevOps above. - task: PowerShell@2 diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index aba6308ad..fc56f63f6 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -365,8 +365,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = # If the version of msbuild is going to be xcopied, # use this version. Version matches a package here: - # https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet-eng&package=RoslynTools.MSBuild&protocolType=NuGet&version=17.2.1&view=overview - $defaultXCopyMSBuildVersion = '17.2.1' + # https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet-eng&package=RoslynTools.MSBuild&protocolType=NuGet&version=17.4.1&view=overview + $defaultXCopyMSBuildVersion = '17.4.1' if (!$vsRequirements) { if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') { @@ -413,6 +413,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = if($vsMinVersion -lt $vsMinVersionReqd){ Write-Host "Using xcopy-msbuild version of $defaultXCopyMSBuildVersion since VS version $vsMinVersionStr provided in global.json is not compatible" $xcopyMSBuildVersion = $defaultXCopyMSBuildVersion + $vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0] } else{ # If the VS version IS compatible, look for an xcopy msbuild package diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 6586eab45..975e6be63 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -416,12 +416,6 @@ function MSBuild { export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20 Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20" Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20" - - # https://github.com/dotnet/arcade/issues/11369 - disable new MSBuild server feature on linux - # This feature is new and can result in build failures from connection timeout errors. - export DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1 - Write-PipelineSetVariable -name "DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER" -value "1" - fi local toolset_dir="${_InitializeToolset%/*}" @@ -521,7 +515,7 @@ global_json_file="${repo_root}global.json" # determine if global.json contains a "runtimes" entry global_json_has_runtimes=false if command -v jq &> /dev/null; then - if jq -er '. | select(has("runtimes"))' "$global_json_file" &> /dev/null; then + if jq -e '.tools | has("runtimes")' "$global_json_file" &> /dev/null; then global_json_has_runtimes=true fi elif [[ "$(cat "$global_json_file")" =~ \"runtimes\"[[:space:]\:]*\{ ]]; then diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml new file mode 100644 index 000000000..5c21c1bf5 --- /dev/null +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -0,0 +1,224 @@ +### This job source-builds https://github.com/dotnet/dotnet with given parameters +### If run in a PR, new changes are applied to a local copy of the VMR, then it is source-built and tested + +parameters: +- name: isBuiltFromVmr + displayName: True when build is running from dotnet/dotnet directly + type: boolean + +- name: vmrPath + type: string + default: $(Agent.BuildDirectory)/vmr + +- name: vmrBranch + displayName: dotnet/dotnet branch to use + type: string + default: $(Build.SourceBranchName) + +- name: buildName + type: string + +- name: architecture + type: string + +- name: container + type: string + +- name: pool + type: object + +# Allow downloading artifacts from the internet during the build +- name: runOnline + type: boolean + +# Skip running the SDK content smoke-tests +- name: excludeSdkContentTests + type: boolean + default: false + +# Name of a previous job (from the same template as this) whose output will be used to build this job +# The SDK from its artifacts is copied to vmr/.dotnet +- name: reuseBuildArtifactsFrom + type: string + default: '' + +- name: excludeOmniSharpTests + type: boolean + +- name: bootstrapPrep + type: boolean + +- name: enablePoison + type: boolean + +jobs: +- job: ${{ parameters.buildName }}_${{ parameters.architecture }} + timeoutInMinutes: 150 + pool: ${{ parameters.pool }} + ${{ if ne(parameters.reuseBuildArtifactsFrom, '') }}: + # Always attempt to run the bootstrap leg (e.g. even when stage 1 tests fail) in order to get a complete accessment of the build status. + # The build shortcuts when stage 1 build fails and doesn't produce the SDK. + condition: succeededOrFailed() + dependsOn: ${{ parameters.reuseBuildArtifactsFrom }}_${{ parameters.architecture }} + variables: + - template: /eng/common/templates/variables/pool-providers.yml + - ${{ if and(not(parameters.isBuiltFromVmr), eq(variables['System.TeamProject'], 'internal')) }}: + - group: DotNetBot-GitHub + - group: AzureDevOps-Artifact-Feeds-Pats + - ${{ else }}: + - name: BotAccount-dotnet-bot-repo-PAT + value: N/A + - ${{ if eq(parameters.reuseBuildArtifactsFrom, '') }}: + - name: additionalBuildArgs + value: '' + - ${{ else }}: + - name: additionalBuildArgs + value: ' --with-sdk /vmr/.dotnet' + + steps: + - template: ../steps/vmr-prepare.yml + parameters: + vmrBranch: ${{ parameters.vmrBranch }} + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + skipComponentGovernanceDetection: true + + # Synchronize new content in the VMR during PRs (we expect this to come + - ${{ if and(not(parameters.isBuiltFromVmr), eq(variables['Build.Reason'], 'PullRequest')) }}: + - template: ../steps/vmr-pull-updates.yml + parameters: + vmrPath: ${{ parameters.vmrPath }} + vmrBranch: ${{ parameters.vmrBranch }} + targetRef: $(Build.SourceVersion) # Synchronize the current installer commit + + - ${{ if ne(variables['System.TeamProject'], 'public') }}: + - script: cp ${{ parameters.vmrPath }}/src/installer/NuGet.config ${{ parameters.vmrPath }}/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config + displayName: Copy Test NuGet Config + + - task: Bash@3 + displayName: Setup Private Feeds Credentials + inputs: + filePath: ${{ parameters.vmrPath }}/src/installer/eng/common/SetupNugetSources.sh + arguments: ${{ parameters.vmrPath }}/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config $Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + + - ${{ if ne(parameters.excludeSdkContentTests, 'true') }}: + - download: current + artifact: BlobArtifacts + patterns: '**/dotnet-sdk-+([0-9]).+([0-9]).+([0-9])?(-@(alpha|preview|rc|rtm)*)-linux-${{ parameters.architecture }}.tar.gz' + displayName: Download MSFT SDK + + - ${{ if ne(parameters.reuseBuildArtifactsFrom, '') }}: + - download: current + artifact: ${{ parameters.reuseBuildArtifactsFrom }}_${{ parameters.architecture }}_Artifacts + patterns: '*.tar.gz' + displayName: Download Previous Build + + - task: CopyFiles@2 + displayName: Copy Previous Build + inputs: + SourceFolder: $(Pipeline.Workspace)/${{ parameters.reuseBuildArtifactsFrom }}_${{ parameters.architecture }}_Artifacts + Contents: '*.tar.gz' + TargetFolder: ${{ parameters.vmrPath }}/packages/archive/ + + - script: | + set -x + + if [[ -z '${{ parameters.reuseBuildArtifactsFrom }}' ]]; then + customPrepArgs= + if [[ '${{ parameters.bootstrapPrep }}' == 'True' ]]; then + customPrepArgs='--bootstrap' + fi + + docker run --rm -v ${{ parameters.vmrPath }}:/vmr -w /vmr ${{ parameters.container }} ./prep.sh ${customPrepArgs} + else + mkdir ${{ parameters.vmrPath }}/.dotnet + previousSdkPath="${{ parameters.vmrPath }}/packages/archive/dotnet-sdk-*.tar.gz" + eval tar -ozxf "$previousSdkPath" -C "${{ parameters.vmrPath }}/.dotnet" + eval rm -f "$previousSdkPath" + fi + displayName: Prep the Build + + - script: | + set -x + df -h + + networkArgs= + customBuildArgs= + if [[ '${{ parameters.runOnline }}' == 'True' ]]; then + customBuildArgs='--online' + else + networkArgs='--network none' + fi + + if [[ '${{ parameters.enablePoison }}' == 'True' ]]; then + customBuildArgs="$customBuildArgs --poison" + fi + + docker run --rm -v ${{ parameters.vmrPath }}:/vmr -w /vmr ${networkArgs} ${{ parameters.container }} ./build.sh --clean-while-building $(additionalBuildArgs) ${customBuildArgs} + displayName: Build + + - script: | + set -x + + dockerVolumeArgs="-v ${{ parameters.vmrPath }}:/vmr" + dockerEnvArgs="-e SMOKE_TESTS_EXCLUDE_OMNISHARP=${{ parameters.excludeOmniSharpTests }} -e SMOKE_TESTS_WARN_SDK_CONTENT_DIFFS=true" + poisonArg='' + + if [[ '${{ parameters.excludeSdkContentTests }}' != 'True' ]]; then + dockerVolumeArgs+=" -v $(Pipeline.Workspace)/BlobArtifacts/:/BlobArtifacts" + msftSdkTarballName=$(find "$(Pipeline.Workspace)/BlobArtifacts/" -name "dotnet-sdk-*-linux-${{ parameters.architecture }}.tar.gz" -exec basename {} \;) + dockerEnvArgs+=" -e SMOKE_TESTS_MSFT_SDK_TARBALL_PATH=/BlobArtifacts/$msftSdkTarballName" + fi + + if [[ '${{ parameters.enablePoison }}' == 'True' ]]; then + poisonArg='--poison' + dockerEnvArgs+=" -e SMOKE_TESTS_WARN_POISON_DIFFS=true" + fi + + docker run --rm $dockerVolumeArgs -w /vmr $dockerEnvArgs ${{ parameters.container }} ./build.sh $poisonArg --run-smoke-test $(additionalBuildArgs) -- -p:SmokeTestConsoleVerbosity=detailed + displayName: Run Tests + + # Don't use CopyFiles@2 as it encounters permissions issues because it indexes all files in the source directory graph. + - script: | + set -x + + targetFolder=$(Build.StagingDirectory)/BuildLogs/ + mkdir -p ${targetFolder} + + cd "${{ parameters.vmrPath }}" + find artifacts/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; + find artifacts/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \; + find artifacts/prebuilt-report/ -exec cp {} --parents -t ${targetFolder} \; + find src/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; + find src/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \; + find test/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; + find test/ -type f -name "Updated*.diff" -exec cp {} --parents -t ${targetFolder} \; + find test/ -type f -name "Updated*.txt" -exec cp {} --parents -t ${targetFolder} \; + displayName: Prepare BuildLogs staging directory + continueOnError: true + condition: succeededOrFailed() + + - publish: '$(Build.StagingDirectory)/BuildLogs' + artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) + displayName: Publish BuildLogs + continueOnError: true + condition: succeededOrFailed() + + - task: PublishTestResults@2 + displayName: Publish Test Results + condition: succeededOrFailed() + continueOnError: true + inputs: + testRunner: vSTest + testResultsFiles: 'test/**/*.trx' + searchFolder: ${{ parameters.vmrPath }} + mergeTestResults: true + publishRunAttachments: true + testRunTitle: SourceBuild_SmokeTests_$(Agent.JobName) + + - publish: '${{ parameters.vmrPath }}/artifacts/${{ parameters.architecture }}/Release/' + artifact: $(Agent.JobName)_Artifacts + displayName: Publish Artifacts + condition: succeededOrFailed() + continueOnError: true diff --git a/eng/pipelines/templates/jobs/vmr-synchronization.yml b/eng/pipelines/templates/jobs/vmr-synchronization.yml index 6b4ee5bb6..22c30e66f 100644 --- a/eng/pipelines/templates/jobs/vmr-synchronization.yml +++ b/eng/pipelines/templates/jobs/vmr-synchronization.yml @@ -1,8 +1,9 @@ -### These steps synchronize code from product repositories into the VMR (https://github.com/dotnet/dotnet) +### This job synchronizes code from product repositories into the VMR (https://github.com/dotnet/dotnet) +### It synchronizes the content of the VMR to this new commit and pushes the changes parameters: - name: targetRef - displayName: Target revision in dotnet/installer to synchronize + displayName: Target revision of dotnet/installer to synchronize type: string default: $(Build.SourceVersion) @@ -11,93 +12,56 @@ parameters: type: string default: $(Build.SourceBranchName) -- name: vmrToken - displayName: PAT that allows pushing to dotnet/dotnet - type: string - - name: noPush displayName: Don't push changes to dotnet/dotnet type: boolean default: false jobs: -- job: Synchronize +- job: Synchronize_VMR displayName: Synchronize dotnet/dotnet timeoutInMinutes: 120 - variables: + - template: /eng/common/templates/variables/pool-providers.yml - name: vmrPath value: $(Agent.BuildDirectory)/vmr + - ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - group: DotNetBot-GitHub + - ${{ else }}: + - name: BotAccount-dotnet-bot-repo-PAT + value: N/A pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: NetCore-Public - demands: - - ImageOverride -equals Build.Ubuntu.2004.Amd64.Open - ${{ else }}: - name: NetCore1ESPool-Internal - demands: - - ImageOverride -equals Build.Ubuntu.2004.Amd64 + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals Build.Ubuntu.2004.Amd64.Open + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals Build.Ubuntu.2004.Amd64 steps: - - checkout: self - clean: true - displayName: Checkout dotnet/installer - fetchDepth: 0 - path: installer + - template: ../steps/vmr-prepare.yml + parameters: + vmrBranch: ${{ parameters.vmrBranch }} + isBuiltFromVmr: false - - checkout: vmr - clean: true - displayName: Checkout dotnet/dotnet - fetchDepth: 0 - path: vmr + - template: ../steps/vmr-pull-updates.yml + parameters: + vmrPath: $(vmrPath) + vmrBranch: ${{ parameters.vmrBranch }} + targetRef: ${{ parameters.targetRef }} - # TODO (https://github.com/dotnet/arcade/issues/11332): Allow full CG? - # Currently, we ignore dirs of individual repos - they have been scanned before - - ${{ if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal')) }}: - - task: ComponentGovernanceComponentDetection@0 - inputs: - sourceScanPath: $(vmrPath) - ignoreDirectories: $(vmrPath)/src - - - script: |- - source ./eng/common/tools.sh - InitializeDotNetCli true - ./.dotnet/dotnet tool restore - displayName: Restore toolset - workingDirectory: $(Agent.BuildDirectory)/installer - - # TODO (https://github.com/dotnet/arcade/issues/11386): Remove this step - # This step is here so that darc can find the PR commit (which might be in some fork) - # We need to make darc understand that it needs to look in the fork from this PR - - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - - script: |- - cp -r $(Agent.BuildDirectory)/installer $(Agent.TempDirectory)/installer - displayName: '[PR Only] Prepare dotnet/installer clone' - - - script: git checkout -B ${{ parameters.vmrBranch }} - displayName: Prepare branch ${{ parameters.vmrBranch }} - workingDirectory: $(vmrPath) - - - script: > - $(Agent.BuildDirectory)/installer/.dotnet/dotnet darc vmr update - --vmr $(vmrPath) - --tmp $(Agent.TempDirectory) - --azdev-pat $(System.AccessToken) - --github-pat ${{ parameters.vmrToken }} - --recursive - --verbose - installer:${{ parameters.targetRef }} - displayName: Synchronize dotnet/dotnet - workingDirectory: $(Agent.BuildDirectory)/installer - - - ${{ if and(not(parameters.noPush), ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal')) }}: - - script: |- + # For official builds, push the changes to the VMR + # Push only main and release branches + - ${{ if and(not(parameters.noPush), not(in(variables['Build.Reason'], 'PullRequest')), eq(variables['System.TeamProject'], 'internal')) }}: + - script: | set -x git config --global user.email 'dotnet-maestro[bot]@users.noreply.github.com' && git config --global user.name 'dotnet-maestro[bot]' - git remote add dotnet 'https://${{ parameters.vmrToken }}@github.com/dotnet/dotnet.git' + git remote add dotnet 'https://$(BotAccount-dotnet-bot-repo-PAT)@github.com/dotnet/dotnet.git' git fetch dotnet + git branch ${{ parameters.vmrBranch }} git branch --set-upstream-to=dotnet/${{ parameters.vmrBranch }} ${{ parameters.vmrBranch }} || echo 'Branch ${{ parameters.vmrBranch }} not found in remote' git push dotnet ${{ parameters.vmrBranch }} displayName: Push changes to dotnet/dotnet workingDirectory: $(vmrPath) + condition: and(succeeded(), or(eq(variables['vmrBranch'], 'main'), startsWith(variables['vmrBranch'], 'release/'))) diff --git a/eng/pipelines/templates/stages/vmr-build.yml b/eng/pipelines/templates/stages/vmr-build.yml new file mode 100644 index 000000000..8d052af5d --- /dev/null +++ b/eng/pipelines/templates/stages/vmr-build.yml @@ -0,0 +1,171 @@ +### This stage source-builds https://github.com/dotnet/dotnet with varying parameters +### If run in a PR, new changes are applied to a local copy of the VMR, then it is source-built and tested + +parameters: + dependsOn: [] + condition: always() + + # Branch of the VMR to use (to push to for internal builds) + vmrBranch: $(Build.SourceBranchName) + + # True when build is running from dotnet/dotnet directly + isBuiltFromVmr: + + # The following parameters aren't expected to be passed in rather they are used for encapsulation + # ----------------------------------------------------------------------------------------------- + centOSStream8Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8 + centOSStream9Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9 + debian11Arm64Container: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-arm64v8 + fedora36Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36 + ubuntu2004Container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04 + + # Internal builds + poolInternalAmd64: + name: NetCore1ESPool-Svc-Internal + demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 + poolInternalAmd64PR: + name: NetCore1ESPool-Internal-XL + demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 + poolInternalArm64: + name: Docker-Linux-Arm-Internal + + # Public builds / PRs + poolPublicAmd64: + name: NetCore-Public-XL + demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + +stages: +- stage: VMR_Source_Build + displayName: VMR Source-Build + dependsOn: ${{ parameters.dependsOn }} + condition: ${{ parameters.condition }} + variables: + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - name: defaultPoolName + value: ${{ parameters.poolPublicAmd64.name }} + - name: defaultPoolDemands + value: ${{ parameters.poolPublicAmd64.demands }} + - ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: + - name: defaultPoolName + value: ${{ parameters.poolInternalAmd64PR.name }} + - name: defaultPoolDemands + value: ${{ parameters.poolInternalAmd64PR.demands }} + - ${{ else }}: + - name: defaultPoolName + value: ${{ parameters.poolInternalAmd64.name }} + - name: defaultPoolDemands + value: ${{ parameters.poolInternalAmd64.demands }} + + jobs: + - template: ../jobs/vmr-build.yml + parameters: + buildName: CentOSStream8_Online + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ parameters.vmrBranch }} + architecture: x64 + pool: + name: ${{ variables.defaultPoolName }} + demands: ${{ variables.defaultPoolDemands }} + container: ${{ parameters.centOSStream8Container }} + bootstrapPrep: false # 🚫 + enablePoison: false # 🚫 + excludeSdkContentTests: true # ✅ + excludeOmniSharpTests: true # ✅ + runOnline: true # ✅ + + - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: + - template: ../jobs/vmr-build.yml + parameters: + buildName: CentOSStream8_Offline + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ parameters.vmrBranch }} + architecture: x64 + pool: + name: ${{ variables.defaultPoolName }} + demands: ${{ variables.defaultPoolDemands }} + container: ${{ parameters.centOSStream8Container }} + bootstrapPrep: false # 🚫 + enablePoison: false # 🚫 + excludeSdkContentTests: false # 🚫 + excludeOmniSharpTests: true # ✅ + runOnline: false # 🚫 + + - template: ../jobs/vmr-build.yml + parameters: + buildName: CentOSStream9_Offline + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ parameters.vmrBranch }} + architecture: x64 + pool: + name: ${{ variables.defaultPoolName }} + demands: ${{ variables.defaultPoolDemands }} + container: ${{ parameters.centOSStream9Container }} + bootstrapPrep: false # 🚫 + enablePoison: false # 🚫 + excludeSdkContentTests: false # 🚫 + excludeOmniSharpTests: false # 🚫 + runOnline: false # 🚫 + + - template: ../jobs/vmr-build.yml + parameters: + buildName: Fedora36_Offline + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ parameters.vmrBranch }} + architecture: x64 + pool: + name: ${{ variables.defaultPoolName }} + demands: ${{ variables.defaultPoolDemands }} + container: ${{ parameters.fedora36Container }} + bootstrapPrep: false # 🚫 + enablePoison: true # ✅ + excludeSdkContentTests: false # 🚫 + excludeOmniSharpTests: false # 🚫 + runOnline: false # 🚫 + + - template: ../jobs/vmr-build.yml + parameters: + buildName: Ubuntu2004_Offline + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ parameters.vmrBranch }} + architecture: x64 + pool: + name: ${{ variables.defaultPoolName }} + demands: ${{ variables.defaultPoolDemands }} + container: ${{ parameters.ubuntu2004Container }} + bootstrapPrep: false # 🚫 + enablePoison: false # 🚫 + excludeSdkContentTests: false # 🚫 + excludeOmniSharpTests: false # 🚫 + runOnline: false # 🚫 + + - template: ../jobs/vmr-build.yml + parameters: + buildName: Debian11_Offline + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ parameters.vmrBranch }} + architecture: arm64 + pool: ${{ parameters.poolInternalArm64 }} + container: ${{ parameters.debian11Arm64Container }} + bootstrapPrep: true # ✅ + enablePoison: false # 🚫 + excludeSdkContentTests: false # 🚫 + excludeOmniSharpTests: false # 🚫 + runOnline: false # 🚫 + + - template: ../jobs/vmr-build.yml + parameters: + buildName: Fedora36_Offline_Using_Previous + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ parameters.vmrBranch }} + architecture: x64 + pool: + name: ${{ variables.defaultPoolName }} + demands: ${{ variables.defaultPoolDemands }} + container: ${{ parameters.fedora36Container }} + bootstrapPrep: false # 🚫 + enablePoison: false # 🚫 + excludeSdkContentTests: true # ✅ + excludeOmniSharpTests: false # 🚫 + runOnline: false # 🚫 + reuseBuildArtifactsFrom: Fedora36_Offline diff --git a/eng/pipelines/templates/steps/vmr-prepare.yml b/eng/pipelines/templates/steps/vmr-prepare.yml new file mode 100644 index 000000000..d6aaa13da --- /dev/null +++ b/eng/pipelines/templates/steps/vmr-prepare.yml @@ -0,0 +1,43 @@ +### These steps clone the VMR (https://github.com/dotnet/dotnet) into $(Agent.BuildDirectory)/vmr +### Component Governance scan is also triggered over the VMR's non-repo sources + +parameters: +- name: isBuiltFromVmr + displayName: True when build is running from dotnet/dotnet directly + type: boolean + +- name: vmrBranch + displayName: dotnet/dotnet branch to use + type: string + default: $(Build.SourceBranchName) + +- name: skipComponentGovernanceDetection + type: boolean + default: false + +steps: +- ${{ if parameters.isBuiltFromVmr }}: + - checkout: self + displayName: Clone dotnet/dotnet + path: vmr + clean: true + +- ${{ else }}: + - checkout: vmr + displayName: Clone dotnet/dotnet + path: vmr + clean: true + +- ${{ if or(not(parameters.isBuiltFromVmr), eq(variables['System.TeamProject'], 'internal')) }}: + - script: | + git switch -c ${{ parameters.vmrBranch }} + displayName: Checkout ${{ parameters.vmrBranch }} + workingDirectory: $(Agent.BuildDirectory)/vmr + +# TODO (https://github.com/dotnet/arcade/issues/11332): Allow full CG? +# Currently, we ignore dirs of individual repos - they have been scanned before +- ${{ if and(not(parameters.skipComponentGovernanceDetection), ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal')) }}: + - task: ComponentGovernanceComponentDetection@0 + inputs: + sourceScanPath: $(Agent.BuildDirectory)/vmr + ignoreDirectories: $(Agent.BuildDirectory)/vmr/src diff --git a/eng/pipelines/templates/steps/vmr-pull-updates.yml b/eng/pipelines/templates/steps/vmr-pull-updates.yml new file mode 100644 index 000000000..91ed52df0 --- /dev/null +++ b/eng/pipelines/templates/steps/vmr-pull-updates.yml @@ -0,0 +1,57 @@ +### These steps synchronize new code from product repositories into the VMR (https://github.com/dotnet/dotnet). +### They initialize the darc CLI and pull the new updates. +### Changes are applied locally onto the already cloned VMR (located in $vmrPath). + +parameters: +- name: vmrBranch + displayName: dotnet/dotnet branch to use + type: string + +- name: targetRef + displayName: Target revision in dotnet/installer to synchronize + type: string + default: $(Build.SourceVersion) + +- name: vmrPath + displayName: Path where the dotnet/dotnet is checked out to + type: string + default: $(Agent.BuildDirectory)/vmr + +steps: +- checkout: self + displayName: Clone dotnet/installer + path: installer + +- script: | + source ./eng/common/tools.sh + InitializeDotNetCli true + ./.dotnet/dotnet tool restore + displayName: Restore darc + workingDirectory: $(Agent.BuildDirectory)/installer + +- script: | + git checkout -B ${{ parameters.vmrBranch }} + echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}" + displayName: Prepare branch ${{ parameters.vmrBranch }} + workingDirectory: ${{ parameters.vmrPath }} + +# This step make sure that darc finds the PR commit (which might be in a fork of installer) +# The cloned folder does have the commit so we copy it into temp where the tooling will find it +# We also cannot keep the AzDO remote as pulling from it would require a token +- script: | + cp -r $(Agent.BuildDirectory)/installer $(Agent.TempDirectory)/03298978DFFFCD23 + cd $(Agent.TempDirectory)/03298978DFFFCD23 + git remote remove origin + git remote add origin https://github.com/dotnet/installer + displayName: Prepare dotnet/installer clone + +- script: > + $(Agent.BuildDirectory)/installer/.dotnet/dotnet darc vmr update + --vmr ${{ parameters.vmrPath }} + --tmp $(Agent.TempDirectory) + --github-pat $(BotAccount-dotnet-bot-repo-PAT) + --recursive + --verbose + installer:${{ parameters.targetRef }} + displayName: Synchronize dotnet/dotnet + workingDirectory: $(Agent.BuildDirectory)/installer diff --git a/eng/restore-toolset.ps1 b/eng/restore-toolset.ps1 index 94cbcbb6e..893a96111 100644 --- a/eng/restore-toolset.ps1 +++ b/eng/restore-toolset.ps1 @@ -29,6 +29,8 @@ set DOTNET_MULTILEVEL_LOOKUP=0 set PATH=$env:DOTNET_INSTALL_DIR;%PATH% set NUGET_PACKAGES=$env:NUGET_PACKAGES + +set DOTNET_ROOT=$env:DOTNET_INSTALL_DIR "@ Out-File -FilePath $scriptPath -InputObject $scriptContents -Encoding ASCII diff --git a/eng/source-build-tarball-build-official.yml b/eng/source-build-tarball-build-official.yml deleted file mode 100644 index 38753d24d..000000000 --- a/eng/source-build-tarball-build-official.yml +++ /dev/null @@ -1,21 +0,0 @@ -trigger: none -pr: none -resources: - pipelines: - - pipeline: installer-build-resource - source: dotnet-installer-official-ci - trigger: - branches: - include: - - main - - release/* - - internal/release/* - stages: - - build - -stages: -- stage: build - jobs: - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml - parameters: - installerBuildResourceId: installer-build-resource diff --git a/eng/source-build-tarball-build.yml b/eng/source-build-tarball-build.yml deleted file mode 100644 index da87d93cf..000000000 --- a/eng/source-build-tarball-build.yml +++ /dev/null @@ -1,14 +0,0 @@ -trigger: none -pr: none -resources: - pipelines: - - pipeline: installer-build-resource - source: installer - trigger: none - -stages: -- stage: build - jobs: - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml - parameters: - installerBuildResourceId: installer-build-resource diff --git a/eng/vmr-sync.sh b/eng/vmr-sync.sh new file mode 100755 index 000000000..16f302215 --- /dev/null +++ b/eng/vmr-sync.sh @@ -0,0 +1,180 @@ +#!/bin/bash + +### This script helps to reproduce potential failures of the 'Synchronize dotnet/dotnet' +### build step from the **VMR Source-Build** job locally. +### The following scenario is assumed: +### - There is a PR in dotnet/installer +### - The PR is failing on the 'VMR Source-Build' job in the 'Synchronize dotnet/dotnet' step +### +### There are a few possible reasons but usually this happens because there is a mismatch between +### source patches that are applied on top of the files that are being synchronized from repositories +### into the 'dotnet/dotnet' repo and new changes in the repositories. +### This manifests as the following error: +### fail: Failed to synchronize repo installer +### Failed to apply the patch for src/aspnetcore +### Exit code: 1 +### Std err: +### error: patch failed: src/aspnetcore/eng/SourceBuild.props:55 +### error: src/aspnetcore/eng/SourceBuild.props: patch does not apply +### +### where 'src/aspnetcore/eng/SourceBuild.props' would be the file that is being patched and new +### changes to it are conflicting with the patch that is being applied. +### +### The whole process can be reproduced locally easily by running this script. +### The patches are located in a folder in the 'dotnet/installer' repository. +### At the moment of writing, the location is 'src/SourceBuild/patches' but to get +### the up-to-date location, please see the 'patchesPath' property in +### https://github.com/dotnet/dotnet/blob/main/src/source-mappings.json +### +### You will need to compare what is in the patch and what is in the file and fix the patch. +### +### The tooling that synchronizes the VMR will need to clone the various repositories. +### It clones them into a temporary folder and re-uses them on future runs so it is advised +### you dedicate a folder to this to speed up your re-runs. +### +### This script will synchronize the 'dotnet/dotnet' repo locally and let you inspect the changes. +### +### USAGE: +### ./vmr-sync.sh --tmp-dir "$HOME/repos/tmp" +### Options: +### -t, --tmp, --tmp-dir PATH +### Required. Path to the temporary folder where repositories will be cloned +### -v, --vmr, --vmr-dir PATH +### Optional. Path to the dotnet/dotnet repository. When null, gets cloned to the temporary folder +### -b, --branch, --vmr-branch BRANCH_NAME +### Optional. Branch of the 'dotnet/dotnet' repo to synchronize to +### This should match the target branch of the PR, defaults to 'main' +### --debug +### Optional. Turns on the most verbose logging for the VMR tooling + +source="${BASH_SOURCE[0]}" + +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +function print_help () { + sed -n '/^### /,/^$/p' "$source" | cut -b 5- +} + +COLOR_RED=$(tput setaf 1 2>/dev/null || true) +COLOR_CYAN=$(tput setaf 6 2>/dev/null || true) +COLOR_CLEAR=$(tput sgr0 2>/dev/null || true) +COLOR_RESET=uniquesearchablestring +FAILURE_PREFIX='> ' + +function fail () { + echo "${COLOR_RED}$FAILURE_PREFIX${1//${COLOR_RESET}/${COLOR_RED}}${COLOR_CLEAR}" >&2 +} + +function highlight () { + echo "${COLOR_CYAN}$FAILURE_PREFIX${1//${COLOR_RESET}/${COLOR_CYAN}}${COLOR_CLEAR}" +} + +installer_dir="$scriptroot/../" +tmp_dir='' +vmr_dir='' +vmr_branch='main' +verbosity=verbose +# hashed name coming from the VMR tooling +INSTALLER_TMP_DIR_NAME='03298978DFFFCD23' + +while [[ $# -gt 0 ]]; do + opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" + case "$opt" in + -t|--tmp|--tmp-dir) + tmp_dir=$2 + shift + ;; + -v|--vmr|--vmr-dir) + vmr_dir=$2 + shift + ;; + -b|--branch|--vmr-branch) + vmr_branch=$2 + shift + ;; + -d|--debug) + verbosity=debug + ;; + -h|--help) + print_help + exit 0 + ;; + *) + fail "Invalid argument: $1" + usage + exit 1 + ;; + esac + + shift +done + +if [[ ! -d "$installer_dir" ]]; then + fail "Directory '$installer_dir' does not exist. Please specify the path to the dotnet/installer repo" + exit 1 +fi + +if [[ -z "$tmp_dir" ]]; then + fail "Missing --tmp-dir argument. Please specify the path to the temporary folder where the repositories will be cloned" + exit 1 +fi + +if [[ -z "$vmr_dir" ]]; then + vmr_dir="$tmp_dir/dotnet" +fi + +if [[ ! -d "$tmp_dir" ]]; then + mkdir -p "$tmp_dir" +fi + +if [[ ! -d "$vmr_dir" ]]; then + highlight "Cloning 'dotnet/dotnet' into $vmr_dir.." + git clone https://github.com/dotnet/dotnet "$vmr_dir" +else + if ! git -C "$vmr_dir" diff --quiet; then + fail "There are changes in the working tree of $vmr_dir. Please commit or stash your changes" + exit 1 + fi + + highlight "Preparing $vmr_dir" + git -C "$vmr_dir" checkout "$vmr_branch" + git -C "$vmr_dir" pull +fi + +set -e + +# These lines makes sure the temp dir (which the tooling would clone) +# has the synchronized commit inside as well +highlight 'Preparing the temporary directory..' +rm -rf "${tmp_dir:?}/$INSTALLER_TMP_DIR_NAME" +git clone "$installer_dir" "${tmp_dir:?}/$INSTALLER_TMP_DIR_NAME" + +# Prepare darc +highlight 'Installing .NET, preparing the tooling..' +source "$scriptroot/common/tools.sh" +InitializeDotNetCli true +dotnet="$scriptroot/../.dotnet/dotnet" +"$dotnet" tool restore + +# Run the sync +target_sha=$(git -C "$installer_dir" rev-parse HEAD) +highlight "Starting the synchronization to $target_sha.." +set +e + +if "$dotnet" darc vmr update --vmr "$vmr_dir" --tmp "$tmp_dir" --$verbosity --recursive installer:$target_sha; then + highlight "Synchronization succeeded" +else + fail "Synchronization of dotnet/dotnet to $target_sha failed!" + fail "$vmr_dir is left in its last state (re-run of this script will reset it)." + fail "Please inspect the logs which contain path to the failing patch file (use --debug to get all the details)." + fail "Once you make changes to the conflicting VMR patch, commit it locally and re-run this script." + exit 1 +fi diff --git a/eng/vmr-synchronization.yml b/eng/vmr-synchronization.yml deleted file mode 100644 index 84e52e3f3..000000000 --- a/eng/vmr-synchronization.yml +++ /dev/null @@ -1,47 +0,0 @@ -### This pipeline synchronizes code from product repositories into the VMR (https://github.com/dotnet/dotnet) - -parameters: -- name: targetRef - displayName: Target revision in dotnet/installer to synchronize - type: string - default: $(Build.SourceVersion) - -- name: vmrBranch - displayName: dotnet/dotnet branch to use - type: string - default: $(Build.SourceBranchName) - -- name: noPush - displayName: Don't push changes to dotnet/dotnet - type: boolean - default: false - -trigger: - branches: - include: - - main - -pr: none - -resources: - repositories: - - repository: vmr - type: github - name: dotnet/dotnet - endpoint: dotnet - -variables: -- ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - group: DotNetBot-GitHub - -- ${{ else }}: - - name: BotAccount-dotnet-bot-repo-PAT - value: N/A - -jobs: -- template: ./pipelines/templates/jobs/vmr-synchronization.yml - parameters: - targetRef: ${{ parameters.targetRef }} - vmrBranch: ${{ parameters.vmrBranch }} - vmrToken: $(BotAccount-dotnet-bot-repo-PAT) - noPush: ${{ parameters.noPush }} diff --git a/global.json b/global.json index 76d7a24cb..07866ffa0 100644 --- a/global.json +++ b/global.json @@ -3,7 +3,7 @@ "dotnet": "8.0.100-alpha.1.22423.9", "runtimes": { "dotnet": [ - "7.0.0-rc.1.22426.10" + "7.0.0" ] } }, @@ -11,7 +11,7 @@ "cmake": "3.21.0" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.22552.1", - "Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.22552.1" + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.22612.4", + "Microsoft.DotNet.CMake.Sdk": "8.0.0-beta.22612.4" } } diff --git a/src/SourceBuild/Arcade/README.md b/src/SourceBuild/Arcade/README.md deleted file mode 100644 index ad15a2f14..000000000 --- a/src/SourceBuild/Arcade/README.md +++ /dev/null @@ -1 +0,0 @@ -The source and targets in the `src/SourceBuild/Arcade` directory are intended to move into the Arcade repo at some point. They are added here for ease of development while developing the tarball generation process. See https://github.com/dotnet/source-build/issues/2295 diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml deleted file mode 100644 index 042bb7349..000000000 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml +++ /dev/null @@ -1,205 +0,0 @@ -# Builds a source-build tarball - -parameters: - # Architecture to build - architecture: - - # Custom condition to apply to the job - condition: - - # Dependent jobs that must be completed before this job will run - dependsOn: - - # Skip running the SDK content smoke-tests - excludeSdkContentTests: false - - # Resource id of the installer build to retrieve source/product tarball's from - installerBuildResourceId: - - # Matrix to run jobs over - matrix: - - # Job name - name: - - # Agent pool to use - pool: - - # Build using the previous source-build artifacts - usePreviousArtifacts: false - -jobs: -- job: ${{ parameters.name }} - condition: ${{ parameters.condition }} - dependsOn: ${{ parameters.dependsOn }} - pool: ${{ parameters.pool }} - strategy: - matrix: ${{ parameters.matrix }} - timeoutInMinutes: 300 - variables: - - ${{ if ne(variables['System.TeamProject'], 'public') }}: - - group: AzureDevOps-Artifact-Feeds-Pats - - ${{ if eq(parameters.usePreviousArtifacts, 'true') }}: - - name: additionalBuildArgs - value: --with-sdk /tarball/.dotnet - - name: tarballDir - value: $(Build.StagingDirectory)/tarball - workspace: - clean: all - - steps: - - checkout: self - clean: true - - - ${{ if ne(variables['System.TeamProject'], 'public') }}: - - task: Bash@3 - displayName: Setup Private Feeds Credentials - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh - arguments: $(Build.SourcesDirectory)/NuGet.config $Token - env: - Token: $(dn-bot-dnceng-artifact-feeds-rw) - - - download: ${{ parameters.installerBuildResourceId }} - artifact: BlobArtifacts - patterns: '**/dotnet-sdk-source*.tar.gz' - displayName: Download Source Tarball - - - ${{ if ne(parameters.excludeSdkContentTests, 'true') }}: - - download: ${{ parameters.installerBuildResourceId }} - artifact: BlobArtifacts - patterns: '**/dotnet-sdk-+([0-9]).+([0-9]).+([0-9])?(-@(alpha|preview|rc|rtm)*)-linux-${{ parameters.architecture }}.tar.gz' - displayName: Download MSFT sdk Tarball - - - ${{ if eq(parameters.usePreviousArtifacts, 'true') }}: - - download: current - artifact: $(_PreviousSourceBuildArtifact) - patterns: '*.tar.gz' - displayName: Download Previous Source Build Artifacts - - - task: CopyFiles@2 - displayName: Copy Previous Source Build Artifacts - inputs: - SourceFolder: $(PIPELINE.WORKSPACE)/$(_PreviousSourceBuildArtifact) - Contents: '*.tar.gz' - TargetFolder: $(tarballDir)/packages/archive/ - - - script: | - set -x - - resourceIdPathSegment= - if [[ '${{ parameters.installerBuildResourceId }}' != 'current' ]]; then - resourceIdPathSegment='${{ parameters.installerBuildResourceId }}/' - fi - - mkdir -p "$(tarballDir)" - tarballFilePath="$(PIPELINE.WORKSPACE)/${resourceIdPathSegment}BlobArtifacts/dotnet-sdk-source*.tar.gz" - eval tar -ozxf "$tarballFilePath" -C "$(tarballDir)" - eval rm -f "$tarballFilePath" - displayName: Extract Tarball - - - script: | - set -x - - if [[ '${{ parameters.usePreviousArtifacts }}' != 'true' ]]; then - customPrepArgs= - if [[ '$(_BootstrapPrep)' == 'true' ]]; then - customPrepArgs='--bootstrap' - fi - - docker run --rm -v $(tarballDir):/tarball -w /tarball $(_Container) ./prep.sh ${customPrepArgs} - else - mkdir $(tarballDir)/.dotnet - tarballFilePath="$(tarballDir)/packages/archive/dotnet-sdk-*.tar.gz" - eval tar -ozxf "$tarballFilePath" -C "$(tarballDir)/.dotnet" - eval rm -f "$tarballFilePath" - fi - displayName: Prep Tarball - - - script: | - set -x - df -h - - networkArgs= - customBuildArgs= - if [[ '$(_RunOnline)' == 'true' ]]; then - customBuildArgs='--online' - else - networkArgs='--network none' - fi - - if [[ '$(_EnablePoison)' == 'true' ]]; then - customBuildArgs="$customBuildArgs --poison" - fi - - docker run --rm -v $(tarballDir):/tarball -w /tarball ${networkArgs} $(_Container) ./build.sh --clean-while-building ${customBuildArgs} $(additionalBuildArgs) - displayName: Build Tarball - - - script: | - set -x - - # Use installer repo's NuGet.config during online testing to utilize internal feeds - rm -f $(tarballDir)/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config - cp $(Build.SourcesDirectory)/NuGet.config $(tarballDir)/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config - - dockerVolumeArgs="-v $(tarballDir):/tarball" - dockerEnvArgs="-e SMOKE_TESTS_EXCLUDE_OMNISHARP=$(_ExcludeOmniSharpTests) -e SMOKE_TESTS_WARN_SDK_CONTENT_DIFFS=true" - poisonArg='' - - if [[ '${{ parameters.excludeSdkContentTests}}' != 'true' ]]; then - dockerVolumeArgs+=" -v $(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/:/BlobArtifacts" - msftSdkTarballName=$(find "$(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/" -name "dotnet-sdk-*-linux-${{ parameters.architecture }}.tar.gz" -exec basename {} \;) - dockerEnvArgs+=" -e SMOKE_TESTS_MSFT_SDK_TARBALL_PATH=/BlobArtifacts/$msftSdkTarballName" - fi - - if [[ '$(_EnablePoison)' == 'true' ]]; then - poisonArg='--poison' - dockerEnvArgs+=" -e SMOKE_TESTS_WARN_POISON_DIFFS=true" - fi - - docker run --rm $dockerVolumeArgs -w /tarball $dockerEnvArgs $(_Container) ./build.sh $poisonArg --run-smoke-test $(additionalBuildArgs) -- -p:SmokeTestConsoleVerbosity=detailed - displayName: Run Tests - - # Don't use CopyFiles@2 as it encounters permissions issues because it indexes all files in the source directory graph. - - script: | - set -x - - targetFolder=$(Build.StagingDirectory)/BuildLogs/ - mkdir -p ${targetFolder} - - cd "$(tarballDir)" - find artifacts/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; - find artifacts/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \; - find artifacts/prebuilt-report/ -exec cp {} --parents -t ${targetFolder} \; - find src/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; - find src/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \; - find test/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \; - find test/ -type f -name "Updated*.diff" -exec cp {} --parents -t ${targetFolder} \; - find test/ -type f -name "Updated*.txt" -exec cp {} --parents -t ${targetFolder} \; - displayName: Prepare BuildLogs staging directory - continueOnError: true - condition: succeededOrFailed() - - - publish: '$(Build.StagingDirectory)/BuildLogs' - artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) - displayName: Publish BuildLogs - continueOnError: true - condition: succeededOrFailed() - - - task: PublishTestResults@2 - displayName: Publish Test Results - condition: succeededOrFailed() - continueOnError: true - inputs: - testRunner: vSTest - testResultsFiles: 'test/**/*.trx' - searchFolder: $(tarballDir) - mergeTestResults: true - publishRunAttachments: true - testRunTitle: SourceBuild_SmokeTests_$(Agent.JobName) - - - publish: '$(tarballDir)/artifacts/${{ parameters.architecture}}/Release/' - artifact: $(Agent.JobName)_Artifacts - displayName: Publish Artifacts - condition: succeededOrFailed() - continueOnError: true diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml deleted file mode 100644 index acdfe5901..000000000 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml +++ /dev/null @@ -1,85 +0,0 @@ -# Creates a source-build tarball - -jobs: -- job: Source_Build_Create_Tarball - container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36 - displayName: Source-Build Create Tarball - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - name: NetCore-Public-XL - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open - ${{ else }}: - name: NetCore-Svc-Public - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - name: NetCore1ESPool-Internal-XL - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 - ${{ else }}: - name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 - - variables: - - name: _BuildConfig - value: Release - - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - group: DotNet-Source-Build-All-Orgs-Source-Access - workspace: - clean: all - - steps: - - ${{ if ne(variables['System.TeamProject'], 'public') }}: - - task: Bash@3 - displayName: Setup Private Feeds Credentials - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh - arguments: $(Build.SourcesDirectory)/NuGet.config $Token - env: - Token: $(dn-bot-dnceng-artifact-feeds-rw) - - script: | - set -x - df -h - - officialBuildArgs= - if [ '${{ and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}' = 'True' ]; then - officialBuildArgs='/p:OfficialBuildId=$(BUILD.BUILDNUMBER)' - fi - - # If building on the internal project, the internal storage variable may be available (usually only if needed) - # In that case, add variables to allow the download of internal runtimes if the specified versions are not found - # in the default public locations. - internalRuntimeDownloadArgs= - if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then - internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://dotnetbuilds.blob.core.windows.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)' - fi - - ./build.sh \ - --ci \ - --configuration $(_BuildConfig) \ - --publish \ - -bl \ - $officialBuildArgs \ - $internalRuntimeDownloadArgs \ - /p:DotNetPublishUsingPipelines=true \ - /p:ArcadeBuildTarball=true \ - /p:AzDoPat=$(dn-bot-all-orgs-build-rw-code-rw) - displayName: Create Tarball - - - task: CopyFiles@2 - displayName: Prepare BuildLogs staging directory - inputs: - Contents: | - **/*.log - **/*.binlog - TargetFolder: '$(Build.StagingDirectory)/BuildLogs' - CleanTargetFolder: true - continueOnError: true - condition: succeededOrFailed() - - - publish: '$(Build.StagingDirectory)/BuildLogs' - artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt) - displayName: Publish BuildLogs - continueOnError: true - condition: succeededOrFailed() diff --git a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml b/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml deleted file mode 100644 index c794bbc8f..000000000 --- a/src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml +++ /dev/null @@ -1,121 +0,0 @@ -# Builds a source-build tarball - -parameters: - # Dependent jobs that must be completed before this job will run - dependsOn: - - # Resource id of the installer build to retrieve source/product tarball's from - installerBuildResourceId: current - - # The following parameters aren't expected to be passed in rather they are used for encapsulation - # ----------------------------------------------------------------------------------------------- - centOSStream8Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8 - centOSStream9Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9 - debian11Arm64Container: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-arm64v8 - fedora36Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36 - ubuntu2004Container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04 - poolInternalAmd64: - name: NetCore1ESPool-Svc-Internal - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 - poolInternalAmd64PR: - name: NetCore1ESPool-Internal-XL - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 - poolInternalArm64: - name: Docker-Linux-Arm-Internal - poolPublicAmd64: - name: NetCore-Public-XL - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open - -jobs: -- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml - parameters: - architecture: x64 - dependsOn: ${{ parameters.dependsOn }} - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - excludeSdkContentTests: true - installerBuildResourceId: ${{ parameters.installerBuildResourceId }} - matrix: - CentOSStream8-Online: - _BootstrapPrep: false - _Container: ${{ parameters.centOSStream8Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: true - _RunOnline: true - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - CentOSStream8-Offline: - _BootstrapPrep: false - _Container: ${{ parameters.centOSStream8Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: true - _RunOnline: false - CentOSStream9-Offline: - _BootstrapPrep: false - _Container: ${{ parameters.centOSStream9Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: false - _RunOnline: false - Fedora36-Offline: - _BootstrapPrep: false - _Container: ${{ parameters.fedora36Container }} - _EnablePoison: true - _ExcludeOmniSharpTests: false - _RunOnline: false - Ubuntu2004-Offline: - _BootstrapPrep: false - _Container: ${{ parameters.ubuntu2004Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: false - _RunOnline: false - name: Build_Tarball_x64 - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - ${{ parameters.poolPublicAmd64 }} - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - ${{ parameters.poolInternalAmd64PR }} - ${{ else }}: - ${{ parameters.poolInternalAmd64 }} - -- ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml - parameters: - architecture: arm64 - dependsOn: ${{ parameters.dependsOn }} - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - excludeSdkContentTests: true - installerBuildResourceId: ${{ parameters.installerBuildResourceId }} - matrix: - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - Debian11-Offline: - _BootstrapPrep: true - _Container: ${{ parameters.debian11Arm64Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: false - _RunOnline: false - name: Build_Tarball_arm64 - pool: ${{ parameters.poolInternalArm64 }} - -- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml - parameters: - architecture: x64 - # Always attempt to run the bootstrap leg (e.g. even when stage 1 tests fail) in order to get a complete accessment of the build status. - # The bootstrap build will shortcut if the stage 1 build failed. - condition: succeededOrFailed() - dependsOn: Build_Tarball_x64 - excludeSdkContentTests: true - installerBuildResourceId: ${{ parameters.installerBuildResourceId }} - matrix: - Fedora36-Offline: - _PreviousSourceBuildArtifact: Build_Tarball_x64 Fedora36-Offline_Artifacts - _Container: ${{ parameters.fedora36Container }} - _EnablePoison: false - _ExcludeOmniSharpTests: false - _RunOnline: false - name: Build_Tarball_x64_Using_Previous - pool: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - ${{ parameters.poolPublicAmd64 }} - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - ${{ parameters.poolInternalAmd64 }} - usePreviousArtifacts: true diff --git a/src/SourceBuild/Arcade/src/SourceBuild.Tasks.csproj b/src/SourceBuild/Arcade/src/SourceBuild.Tasks.csproj deleted file mode 100644 index 2842d265d..000000000 --- a/src/SourceBuild/Arcade/src/SourceBuild.Tasks.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - net7.0 - false - false - disable - - - - - - - - - - - diff --git a/src/SourceBuild/Arcade/src/Tarball_ReadSourceBuildIntermediateNupkgDependencies.cs b/src/SourceBuild/Arcade/src/Tarball_ReadSourceBuildIntermediateNupkgDependencies.cs deleted file mode 100644 index 9b6365dfc..000000000 --- a/src/SourceBuild/Arcade/src/Tarball_ReadSourceBuildIntermediateNupkgDependencies.cs +++ /dev/null @@ -1,180 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Xml.Linq; - -namespace Microsoft.DotNet.SourceBuild.Tasks -{ - /// - /// Reads entries in a Version.Details.xml file to find intermediate nupkg dependencies. For - /// each dependency with a "SourceBuild" element, adds an item to the "Dependencies" output. - /// - public class Tarball_ReadSourceBuildIntermediateNupkgDependencies : Task - { - [Required] - public string VersionDetailsXmlFile { get; set; } - - [Required] - public string SourceBuildIntermediateNupkgPrefix { get; set; } - - /// - /// Convert any internal repo references to the public GitHub repos. - /// - public bool ConvertInternalRepos { get; set; } - - /// - /// The intermediate nupkg RID to use if any RID-specific intermediate nupkgs are required. - /// If this parameter isn't specified, RID-specific intermediate nupkgs can't be used and - /// this task fails. - /// - public string SourceBuildIntermediateNupkgRid { get; set; } - - /// - /// %(Identity): NuGet package ID. - /// %(Name): The Name of the dependency from Version.Details.xml. - /// %(ExactVersion): NuGet package version. This can be used to look up the restored package - /// contents in a package cache. - /// %(Version): NuGet package version, wrapped in "[version]" syntax for exact match. - /// %(Uri): The URI for the repo. - /// %(Sha): The commit Sha for the dependency. - /// %(SourceBuildRepoName): The repo name to use in source-build. - /// - [Output] - public ITaskItem[] Dependencies { get; set; } - - public override bool Execute() - { - XElement root = XElement.Load(VersionDetailsXmlFile, LoadOptions.PreserveWhitespace); - - XName CreateQualifiedName(string plainName) - { - return root.GetDefaultNamespace().GetName(plainName); - } - - Dependencies = root - .Elements() - .Elements(CreateQualifiedName("Dependency")) - .Select(d => - { - XElement sourceBuildElement = d.Element(CreateQualifiedName("SourceBuild")); - - if (sourceBuildElement == null) - { - // Workaround for https://github.com/dotnet/source-build/issues/2481 - sourceBuildElement = d.Element(CreateQualifiedName("SourceBuildTarball")); - - if (sourceBuildElement == null) - { - // Ignore element: doesn't represent a source-build dependency. - return null; - } - } - - string repoName = sourceBuildElement.Attribute("RepoName")?.Value; - - if (string.IsNullOrEmpty(repoName)) - { - Log.LogError($"Dependency SourceBuild RepoName null or empty in '{VersionDetailsXmlFile}' element {d}"); - return null; - } - - string dependencyName = d.Attribute("Name")?.Value ?? string.Empty; - - if (string.IsNullOrEmpty(dependencyName)) - { - // Log name missing as FYI, but this is not an error case for source-build. - Log.LogMessage($"Dependency Name null or empty in '{VersionDetailsXmlFile}' element {d}"); - } - - string dependencyVersion = d.Attribute("Version")?.Value; - - string uri = d.Element(CreateQualifiedName("Uri"))?.Value; - if (ConvertInternalRepos) - { - uri = ConvertInternalRepo(uri); - } - - string sha = d.Element(CreateQualifiedName("Sha"))?.Value; - string sourceBuildRepoName = sourceBuildElement.Attribute("RepoName")?.Value; - - if (string.IsNullOrEmpty(dependencyVersion)) - { - // We need a version to bring down an intermediate nupkg. Fail. - Log.LogError($"Dependency Version null or empty in '{VersionDetailsXmlFile}' element {d}"); - return null; - } - - string identity = SourceBuildIntermediateNupkgPrefix + repoName; - - bool.TryParse( - sourceBuildElement.Attribute("ManagedOnly")?.Value, - out bool managedOnly); - - // If RID-specific, add the RID to the end of the identity. - if (!managedOnly) - { - if (string.IsNullOrEmpty(SourceBuildIntermediateNupkgRid)) - { - Log.LogError( - $"Parameter {nameof(SourceBuildIntermediateNupkgRid)} was " + - "not specified, indicating this project depends only on managed " + - "inputs. However, source-build element is not ManagedOnly: " + - sourceBuildElement); - return null; - } - - identity += "." + SourceBuildIntermediateNupkgRid; - } - - return new TaskItem( - identity, - new Dictionary - { - ["Name"] = dependencyName, - ["Version"] = $"[{dependencyVersion}]", - ["ExactVersion"] = dependencyVersion, - ["Uri"] = uri, - ["Sha"] = sha, - ["SourceBuildRepoName"] = sourceBuildRepoName - }); - }) - .Where(d => d != null) - .ToArray(); - - return !Log.HasLoggedErrors; - } - - private string ConvertInternalRepo(string uri) - { - if (uri.StartsWith("https://dev.azure.com", StringComparison.OrdinalIgnoreCase)) - { - string[] repoParts = uri.Substring(uri.LastIndexOf('/')).Split('-', 2); - - if (repoParts.Length != 2) - { - Log.LogError($"Repo '{uri}' does not end with the expected - format"); - return null; - } - - string org = repoParts[0]; - string repo = repoParts[1]; - - // The internal Nuget.Client repo has suffix which needs to be accounted for. - const string trustedSuffix = "-Trusted"; - if (uri.EndsWith(trustedSuffix, StringComparison.OrdinalIgnoreCase)) - { - repo = repo.Substring(0, repo.Length - trustedSuffix.Length); - } - - uri = $"https://github.com/{org}/{repo}"; - } - - return uri; - } - } -} diff --git a/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs b/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs deleted file mode 100644 index b177b6f01..000000000 --- a/src/SourceBuild/Arcade/src/Tarball_WriteSourceRepoProperties.cs +++ /dev/null @@ -1,194 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.Build.Framework; -using Microsoft.Build.Tasks; -using Microsoft.Build.Utilities; -using NuGet.Versioning; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using System.Xml.Serialization; - -namespace Microsoft.DotNet.SourceBuild.Tasks -{ - /// - /// Writes a props file to the given directory for each dependency specified - /// plus adds or updates an existing props file with all dependencies. The - /// intention is for the props file to be included by a source-build build - /// to get metadata about each dependent repo. - /// - public class Tarball_WriteSourceRepoProperties : Task - { - /// - /// The directory to write the props files to. - /// - [Required] - public string SourceBuildMetadataDir { get; set; } - - /// - /// Dependencies to include in the props files. - /// - /// %(Identity): NuGet package ID. - /// %(Name): The Name of the dependency from Version.Details.xml. - /// %(ExactVersion): NuGet package version. This can be used to look up the restored package - /// contents in a package cache. - /// %(Version): NuGet package version, wrapped in "[version]" syntax for exact match. - /// %(Uri): The URI for the repo. - /// %(Sha): The commit Sha for the dependency. - /// %(SourceBuildRepoName): The repo name to use in source-build. - /// - /// - [Required] - public ITaskItem[] Dependencies { get; set; } - - public override bool Execute() - { - var allRepoProps = new Dictionary(); - - foreach (var dependency in Dependencies.Select(dep => - new { - Name = dep.GetMetadata("Name"), - SourceBuildRepoName = dep.GetMetadata("SourceBuildRepoName"), - Version = dep.GetMetadata("ExactVersion"), - Sha = dep.GetMetadata("Sha"), - Uri = dep.GetMetadata("Uri"), - GitCommitCount = dep.GetMetadata("GitCommitCount") - })) - { - string repoName = dependency.SourceBuildRepoName; - string safeRepoName = repoName.Replace("-", "").Replace(".", ""); - string propsPath = Path.Combine(SourceBuildMetadataDir, $"{repoName.Replace(".", "-")}.props"); - DerivedVersion derivedVersion = GetVersionInfo(safeRepoName, dependency.Version, "0"); - var repoProps = new Dictionary - { - ["GitCommitHash"] = dependency.Sha, - ["OfficialBuildId"] = derivedVersion.OfficialBuildId, - ["OutputPackageVersion"] = dependency.Version, - ["PreReleaseVersionLabel"] = derivedVersion.PreReleaseVersionLabel, - ["IsStable"] = string.IsNullOrWhiteSpace(derivedVersion.PreReleaseVersionLabel) ? "true" : "false", - }; - if (!string.IsNullOrEmpty(dependency.GitCommitCount)) - { - repoProps.Add("GitCommitCount", dependency.GitCommitCount); - } - WritePropsFile(propsPath, repoProps); - allRepoProps[$"{safeRepoName}GitCommitHash"] = dependency.Sha; - allRepoProps[$"{safeRepoName}OutputPackageVersion"] = dependency.Version; - } - string allRepoPropsPath = Path.Combine(SourceBuildMetadataDir, "AllRepoVersions.props"); - Log.LogMessage(MessageImportance.Normal, $"[{DateTimeOffset.Now}] Writing all repo versions to {allRepoPropsPath}"); - UpdatePropsFile(allRepoPropsPath, allRepoProps); - - return !Log.HasLoggedErrors; - } - - /// - /// Reverse a version in the Arcade style (https://github.com/dotnet/arcade/blob/fb92b14d8cd07cf44f8f7eefa8ac58d7ffd05f3f/src/Microsoft.DotNet.Arcade.Sdk/tools/Version.BeforeCommonTargets.targets#L18) - /// back to an OfficialBuildId + ReleaseLabel which we can then supply to get the same resulting version number. - /// - /// The source build name of the repo to get the version info for. - /// The complete version, e.g. 1.0.0-beta1-19720.5 - /// The current commit count of the repo. This is used for some repos that do not use the standard versioning scheme. - /// - private static DerivedVersion GetVersionInfo(string repoName, string version, string commitCount) - { - var nugetVersion = new NuGetVersion(version); - - if (!string.IsNullOrWhiteSpace(nugetVersion.Release)) - { - var releaseParts = nugetVersion.Release.Split('-', '.'); - if (repoName.Contains("nuget")) - { - // NuGet does this - arbitrary build IDs - return new DerivedVersion { OfficialBuildId = DateTime.Now.ToString("yyyyMMdd.1"), PreReleaseVersionLabel = releaseParts[0] }; - } - else if (releaseParts.Length == 3) - { - // VSTest uses full dates for the first part of their preview build numbers - if (repoName.Contains("vstest")) - { - return new DerivedVersion { OfficialBuildId = $"{releaseParts[1]}.{releaseParts[2]}", PreReleaseVersionLabel = releaseParts[0] }; - } - else if (int.TryParse(releaseParts[1], out int datePart) && int.TryParse(releaseParts[2], out int buildPart)) - { - if (datePart > 1 && datePart < 8 && buildPart > 1000 && buildPart < 10000) - { - return new DerivedVersion { OfficialBuildId = releaseParts[2], PreReleaseVersionLabel = $"{releaseParts[0]}.{releaseParts[1]}" }; - } - else - { - return new DerivedVersion { OfficialBuildId = $"20{((datePart / 1000))}{((datePart % 1000) / 50):D2}{(datePart % 50):D2}.{buildPart}", PreReleaseVersionLabel = releaseParts[0] }; - } - } - } - else if (releaseParts.Length == 4) - { - // new preview version style, e.g. 5.0.0-preview.7.20365.12 - if (int.TryParse(releaseParts[2], out int datePart) && int.TryParse(releaseParts[3], out int buildPart)) - { - return new DerivedVersion { OfficialBuildId = $"20{((datePart / 1000))}{((datePart % 1000) / 50):D2}{(datePart % 50):D2}.{buildPart}", PreReleaseVersionLabel = $"{releaseParts[0]}.{releaseParts[1]}" }; - } - } - } - else - { - // finalized version number (x.y.z) - probably not our code - // Application Insights, Newtonsoft.Json do this - return new DerivedVersion { OfficialBuildId = DateTime.Now.ToString("yyyyMMdd.1"), PreReleaseVersionLabel = string.Empty }; - } - - throw new FormatException($"Can't derive a build ID from version {version} (commit count {commitCount}, release {string.Join(";", nugetVersion.Release.Split('-', '.'))})"); - } - - private static void UpdatePropsFile(string filePath, Dictionary properties) - { - if (!File.Exists(filePath)) - { - WritePropsFile(filePath, properties); - } - else - { - var content = new StringBuilder(); - foreach (var line in File.ReadAllLines(filePath)) - { - content.AppendLine(line); - if (line.Contains("")) - { - foreach (var propName in properties.Keys.OrderBy(k => k)) - { - content.AppendLine($" <{propName}>{properties[propName]}"); - } - } - } - File.WriteAllText(filePath, content.ToString()); - } - } - - private static void WritePropsFile(string filePath, Dictionary properties) - { - var content = new StringBuilder(); - content.AppendLine(""); - content.AppendLine(""); - content.AppendLine(" "); - foreach (var propName in properties.Keys.OrderBy(k => k)) - { - content.AppendLine($" <{propName}>{properties[propName]}"); - } - content.AppendLine(" "); - content.AppendLine(""); - File.WriteAllText(filePath, content.ToString()); - } - - private class DerivedVersion - { - internal string OfficialBuildId { get; set; } - internal string PreReleaseVersionLabel { get; set; } - } - } -} diff --git a/src/SourceBuild/Arcade/tools/BuildTasks.props b/src/SourceBuild/Arcade/tools/BuildTasks.props deleted file mode 100644 index 50f49046b..000000000 --- a/src/SourceBuild/Arcade/tools/BuildTasks.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - - $(RepoRoot)\artifacts\bin\SourceBuild.Tasks\$(Configuration)\net7.0\SourceBuild.Tasks.dll - - \ No newline at end of file diff --git a/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets b/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets deleted file mode 100644 index 1f7c8aed3..000000000 --- a/src/SourceBuild/Arcade/tools/SourceBuildArcadeTarball.targets +++ /dev/null @@ -1,415 +0,0 @@ - - - - - - - - - - - - - - - - $(RepoRoot)artifacts/ - $(ArtifactsDir)tarball/ - $([MSBuild]::EnsureTrailingSlash('$(TarballDir)')) - $(TarballRootDir)src/ - $(TarballRootDir)git-info/ - quiet - true - - - - - - $([System.IO.Path]::GetDirectoryName('$(TarballFilePath)')) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(GitHubRepositoryName) - $(VersionPrefix) - $(VersionPrefix) - @(RootRepoCommitSha) - @(RootRepoUri) - @(RootRepoCommitCount) - $(GitHubRepositoryName) - true - - - - - - - %(SourceBuildRepos.SourceBuildRepoName) - %(SourceBuildRepos.Uri) - %(SourceBuildRepos.Sha) - %(SourceBuildRepos.IsRootRepo) - - - - - - - - - - - - - $(SourceBuildRepoName)/ - $(TarballSourceDir)$(SourceDir) - $(TarballSourceDir)$(SourceDir)eng/ - $(TarballRepoSourceEngDir)Version.Details.xml - -q - $(RepoUri) - $(RepoUri.Replace('https://dev.azure.com', 'https://dn-bot:$(AzDoPat)@dev.azure.com')) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(ArtifactsDir)text-only-packages/ - $(TarballRootDir)packages/text-only/ - - - - - - - - - - - - - - - - - - - $(TarballRootDir)packages/archive/ - Private.SourceBuilt.Artifacts - Private.SourceBuilt.Prebuilts - https://dotnetcli.azureedge.net/source-built-artifacts/assets/ - archiveArtifacts.txt - $(ExternalTarballsDir)$(ArchiveArtifactsTextFileName) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $([System.IO.Path]::GetFileName('$(TextOnlyDirectory)')) - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj b/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj deleted file mode 100644 index 3de474133..000000000 --- a/src/SourceBuild/Arcade/tools/TextOnlyPackages.csproj +++ /dev/null @@ -1,45 +0,0 @@ - - - net7.0 - $(TargetPackagesPath) - - - - - - - - - - - - - - - - - - - - - - - - - @(TextOnlyPackagesDirectories) - - - - - diff --git a/src/SourceBuild/README.md b/src/SourceBuild/README.md index cb90757a6..7fb9a6e6a 100644 --- a/src/SourceBuild/README.md +++ b/src/SourceBuild/README.md @@ -44,7 +44,7 @@ git format-patch --zero-commit --no-signature -1 ``` Then, move the patch file into this repo, at -`src/SourceBuild/tarball/patches/`. +`src/SourceBuild/patches/`. > If you define `PATCH_DIR` to point at the `patches` directory, you can use > `-o` to place the patch file directly in the right directory: diff --git a/src/SourceBuild/content/.gitignore b/src/SourceBuild/content/.gitignore new file mode 100644 index 000000000..a5da6c81c --- /dev/null +++ b/src/SourceBuild/content/.gitignore @@ -0,0 +1,10 @@ +/.dotnet +/artifacts +/eng/tools/**/bin +/eng/tools/**/obj +/prereqs/packages +/src/linker/src/ILLink.Tasks/ILLink.Tasks.nuspec +/src/nuget-client/NuGet.config +/test/Microsoft.DotNet.SourceBuild.SmokeTests/bin +/test/Microsoft.DotNet.SourceBuild.SmokeTests/obj +/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestResults diff --git a/src/SourceBuild/content/CODE_OF_CONDUCT.md b/src/SourceBuild/content/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..775f221c9 --- /dev/null +++ b/src/SourceBuild/content/CODE_OF_CONDUCT.md @@ -0,0 +1,6 @@ +# Code of Conduct + +This project has adopted the code of conduct defined by the Contributor Covenant +to clarify expected behavior in our community. + +For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct). diff --git a/src/SourceBuild/tarball/content/Directory.Build.props b/src/SourceBuild/content/Directory.Build.props similarity index 83% rename from src/SourceBuild/tarball/content/Directory.Build.props rename to src/SourceBuild/content/Directory.Build.props index a1384a557..ff5ceda7d 100644 --- a/src/SourceBuild/tarball/content/Directory.Build.props +++ b/src/SourceBuild/content/Directory.Build.props @@ -33,13 +33,15 @@ $(MSBuildThisFileDirectory) $(ProjectDir)targets/ - $(ProjectDir)keys/ + $(ProjectDir)prereqs/ + $(PrereqsDir)/keys/ $([MSBuild]::EnsureTrailingSlash('$(CustomDotNetSdkDir)')) $([MSBuild]::NormalizeDirectory('$(DOTNET_INSTALL_DIR)')) $(ProjectDir).dotnet/ $(DotNetCliToolDir)dotnet + $(ProjectDir)prereqs/packages/ $(NuGetPackageRoot) - $(ProjectDir)packages/restored/ + $(PrereqsPackagesDir)restored/ $(PackagesDir)ArcadeBootstrapPackage/ $(NETCoreSdkVersion) @@ -83,12 +85,12 @@ + $(RepositoryEngineeringDir)arcade-overrides/ $(ArtifactsDir) $(ProjectDir).git/modules/src/ - $(ProjectDir)Tools/ - $(ToolsDir)source-built/ - $(ProjectDir)tools-local/ - $(ToolsLocalDir)tasks/ + $(ArtifactsDir)source-built-sdks/ + $(RepositoryEngineeringDir)/tools/ + $(ToolsDir)tasks/ $(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks.XPlat/bin/$(Configuration)/ $(XPlatTasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.XPlat.dll @@ -104,9 +106,9 @@ $(IntermediatePath)blob-feed/ $(SourceBuiltBlobFeedDir)packages/ $(SourceBuiltBlobFeedDir)assets/ - $(ProjectDir)packages/prebuilt/ - $(ProjectDir)packages/previouslyRestored/ - $(ProjectDir)packages/previously-source-built/ + $(PrereqsPackagesDir)prebuilt/ + $(PrereqsPackagesDir)previouslyRestored/ + $(PrereqsPackagesDir)previously-source-built/ $(CustomPrebuiltSourceBuiltPackagesPath)/ $(OutputPath) $(LocalBlobStorageRoot)Sdk/ @@ -120,15 +122,11 @@ $(BaseOutputPath)roslyn-debug/ $(BaseOutputPath)aspnet-debug $(AspNetRazorBuildServerLogDir)razor-build-server.log - - $(BaseOutputPath)git-info/ - - $(ProjectDir)git-info/ - $(GitInfoOutputDir)$(RepositoryName).props - $(GitInfoOutputDir)AllRepoVersions.props - $(GitInfoOfflineDir)$(RepositoryName).props - $(GitInfoOfflineDir)AllRepoVersions.props + $(PrereqsDir)git-info/ + $(GitInfoDir)$(RepositoryName).props + $(GitInfoDir)AllRepoVersions.props $(BaseOutputPath)prebuilt-report/ + $(ProjectDir)/repo-projects/ $(PackageReportDir)prebuilt-packages/ $(PackageReportDir)prebuilt-usage.xml $(PackageReportDir)poison-usage.xml @@ -141,23 +139,19 @@ $(PackageReportDir)poisoned.txt $(BaseOutputPath)conflict-report/ $(PackageReportDir)PrebuiltBurndownData.csv - $(ProjectDir)packages/archive/ - $(ProjectDir)packages/text-only/ - $(ProjectDir)packages/reference/ + $(PrereqsPackagesDir)archive/ + $(PrereqsPackagesDir)reference/ Private.SourceBuilt.Artifacts Private.SourceBuilt.Prebuilts https://dotnetcli.azureedge.net/source-built-artifacts/assets/ archiveArtifacts.txt $(ExternalTarballsDir)$(ArchiveArtifactsTextFileName) - $(ToolsLocalDir)prebuilt-baseline.xml + $(ToolsDir)prebuilt-baseline.xml $(ProjectDir)test/exclusions/ $(ProjectDir)test/Microsoft.DotNet.SourceBuild.SmokeTests/ - - - ROOTFS_DIR=$(BaseIntermediatePath)crossrootfs/arm ROOTFS_DIR=$(BaseIntermediatePath)crossrootfs/armel @@ -208,8 +202,7 @@ - - + @@ -223,12 +216,8 @@ - - - - diff --git a/src/SourceBuild/tarball/content/Directory.Build.targets b/src/SourceBuild/content/Directory.Build.targets similarity index 100% rename from src/SourceBuild/tarball/content/Directory.Build.targets rename to src/SourceBuild/content/Directory.Build.targets diff --git a/src/SourceBuild/content/LICENSE.TXT b/src/SourceBuild/content/LICENSE.TXT new file mode 100644 index 000000000..a616ed188 --- /dev/null +++ b/src/SourceBuild/content/LICENSE.TXT @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/src/SourceBuild/content/SECURITY.md b/src/SourceBuild/content/SECURITY.md new file mode 100644 index 000000000..e0dfff56a --- /dev/null +++ b/src/SourceBuild/content/SECURITY.md @@ -0,0 +1,41 @@ + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)) of a security vulnerability, please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). + + diff --git a/src/SourceBuild/tarball/content/build.proj b/src/SourceBuild/content/build.proj similarity index 91% rename from src/SourceBuild/tarball/content/build.proj rename to src/SourceBuild/content/build.proj index 731e5665e..c06ee0784 100644 --- a/src/SourceBuild/tarball/content/build.proj +++ b/src/SourceBuild/content/build.proj @@ -11,20 +11,19 @@ - + - - + + - @@ -36,7 +35,7 @@ - + @@ -47,7 +46,7 @@ - + - + use the specified directory of previously-built packages" echo " --with-sdk use the SDK in the specified directory for bootstrapping" echo "use -- to send the remaining arguments to MSBuild" @@ -22,6 +23,10 @@ CUSTOM_REF_PACKAGES_DIR='' CUSTOM_PACKAGES_DIR='' alternateTarget=false runningSmokeTests=false +packagesDir="$SCRIPT_ROOT/prereqs/packages/" +packagesArchiveDir="${packagesDir}archive/" +packagesRestoredDir="${packagesDir}restored/" +packagesPreviouslySourceBuiltDir="${packagesDir}previously-source-built/" CUSTOM_SDK_DIR='' while :; do @@ -45,6 +50,9 @@ while :; do runningSmokeTests=true MSBUILD_ARGUMENTS+=( "-t:RunSmokeTest" ) ;; + --use-mono-runtime) + MSBUILD_ARGUMENTS+=( "/p:SourceBuildUseMonoRuntime=true" ) + ;; --with-packages) CUSTOM_PACKAGES_DIR="$(cd -P "$2" && pwd)" if [ ! -d "$CUSTOM_PACKAGES_DIR" ]; then @@ -91,14 +99,14 @@ if [ "$CUSTOM_PACKAGES_DIR" != "" ]; then fi fi -if [ -f "$SCRIPT_ROOT/packages/archive/archiveArtifacts.txt" ]; then +if [ -f "${packagesArchiveDir}archiveArtifacts.txt" ]; then ARCHIVE_ERROR=0 if [ ! -d "$SCRIPT_ROOT/.dotnet" ] && [ "$CUSTOM_SDK_DIR" == "" ]; then echo "ERROR: SDK not found at $SCRIPT_ROOT/.dotnet" ARCHIVE_ERROR=1 fi - if [ ! -f $SCRIPT_ROOT/packages/archive/Private.SourceBuilt.Artifacts*.tar.gz ] && [ "$CUSTOM_PACKAGES_DIR" == "" ]; then - echo "ERROR: Private.SourceBuilt.Artifacts artifact not found at $SCRIPT_ROOT/packages/archive/ - Either run prep.sh or pass --with-packages parameter" + if [ ! -f ${packagesArchiveDir}Private.SourceBuilt.Artifacts*.tar.gz ] && [ "$CUSTOM_PACKAGES_DIR" == "" ]; then + echo "ERROR: Private.SourceBuilt.Artifacts artifact not found at $packagesArchiveDir - Either run prep.sh or pass --with-packages parameter" ARCHIVE_ERROR=1 fi if [ $ARCHIVE_ERROR == 1 ]; then @@ -127,14 +135,13 @@ else fi packageVersionsPath='' -restoredPackagesDir="$SCRIPT_ROOT/packages/restored" if [[ "$CUSTOM_PACKAGES_DIR" != "" && -f "$CUSTOM_PACKAGES_DIR/PackageVersions.props" ]]; then packageVersionsPath="$CUSTOM_PACKAGES_DIR/PackageVersions.props" -elif [ -d "$SCRIPT_ROOT/packages/archive" ]; then - sourceBuiltArchive=`find $SCRIPT_ROOT/packages/archive -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz'` - if [ -f "$SCRIPT_ROOT/packages/previously-source-built/PackageVersions.props" ]; then - packageVersionsPath=$SCRIPT_ROOT/packages/previously-source-built/PackageVersions.props +elif [ -d "$packagesArchiveDir" ]; then + sourceBuiltArchive=`find $packagesArchiveDir -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz'` + if [ -f "${packagesPreviouslySourceBuiltDir}}PackageVersions.props" ]; then + packageVersionsPath=${packagesPreviouslySourceBuiltDir}PackageVersions.props elif [ -f "$sourceBuiltArchive" ]; then tar -xzf "$sourceBuiltArchive" -C /tmp PackageVersions.props packageVersionsPath=/tmp/PackageVersions.props @@ -143,7 +150,7 @@ fi if [ ! -f "$packageVersionsPath" ]; then echo "Cannot find PackagesVersions.props. Debugging info:" - echo " Attempted archive path: $SCRIPT_ROOT/packages/archive" + echo " Attempted archive path: $packagesArchiveDir" echo " Attempted custom PVP path: $CUSTOM_PACKAGES_DIR/PackageVersions.props" exit 1 fi @@ -158,7 +165,7 @@ if [[ $arcadeSdkLine =~ $versionPattern ]]; then # projects overwrite this so that they use the source-built Arcade SDK instad. export SOURCE_BUILT_SDK_ID_ARCADE=Microsoft.DotNet.Arcade.Sdk export SOURCE_BUILT_SDK_VERSION_ARCADE=$ARCADE_BOOTSTRAP_VERSION - export SOURCE_BUILT_SDK_DIR_ARCADE=$restoredPackagesDir/ArcadeBootstrapPackage/microsoft.dotnet.arcade.sdk/$ARCADE_BOOTSTRAP_VERSION + export SOURCE_BUILT_SDK_DIR_ARCADE=$packagesRestoredDir/ArcadeBootstrapPackage/microsoft.dotnet.arcade.sdk/$ARCADE_BOOTSTRAP_VERSION fi sourceLinkLine=`grep -m 1 'MicrosoftSourceLinkCommonVersion' "$packageVersionsPath"` @@ -170,7 +177,7 @@ fi echo "Found bootstrap SDK $SDK_VERSION, bootstrap Arcade $ARCADE_BOOTSTRAP_VERSION, bootstrap SourceLink $SOURCE_LINK_BOOTSTRAP_VERSION" export DOTNET_CLI_TELEMETRY_OPTOUT=1 -export NUGET_PACKAGES=$restoredPackagesDir/ +export NUGET_PACKAGES=$packagesRestoredDir/ LogDateStamp=$(date +"%m%d%H%M%S") @@ -179,7 +186,7 @@ LogDateStamp=$(date +"%m%d%H%M%S") if [ "$alternateTarget" == "true" ]; then "$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/build.proj" -bl:$SCRIPT_ROOT/artifacts/log/Debug/BuildTests_$LogDateStamp.binlog -flp:LogFile=$SCRIPT_ROOT/artifacts/logs/BuildTests_$LogDateStamp.log -clp:v=m ${MSBUILD_ARGUMENTS[@]} "$@" else - "$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/tools-local/init-build.proj" -bl:$SCRIPT_ROOT/artifacts/log/Debug/BuildXPlatTasks_$LogDateStamp.binlog -flp:LogFile=$SCRIPT_ROOT/artifacts/logs/BuildXPlatTasks_$LogDateStamp.log -t:PrepareOfflineLocalTools ${MSBUILD_ARGUMENTS[@]} "$@" + "$CLI_ROOT/dotnet" msbuild "$SCRIPT_ROOT/eng/tools/init-build.proj" -bl:$SCRIPT_ROOT/artifacts/log/Debug/BuildXPlatTasks_$LogDateStamp.binlog -flp:LogFile=$SCRIPT_ROOT/artifacts/logs/BuildXPlatTasks_$LogDateStamp.log -t:PrepareOfflineLocalTools ${MSBUILD_ARGUMENTS[@]} "$@" # kill off the MSBuild server so that on future invocations we pick up our custom SDK Resolver "$CLI_ROOT/dotnet" build-server shutdown diff --git a/src/SourceBuild/tarball/content/eng/Build.props b/src/SourceBuild/content/eng/Build.props similarity index 100% rename from src/SourceBuild/tarball/content/eng/Build.props rename to src/SourceBuild/content/eng/Build.props diff --git a/src/SourceBuild/tarball/content/eng/No.proj b/src/SourceBuild/content/eng/No.proj similarity index 100% rename from src/SourceBuild/tarball/content/eng/No.proj rename to src/SourceBuild/content/eng/No.proj diff --git a/src/SourceBuild/content/eng/Versions.props b/src/SourceBuild/content/eng/Versions.props new file mode 100644 index 000000000..f68ff9865 --- /dev/null +++ b/src/SourceBuild/content/eng/Versions.props @@ -0,0 +1,29 @@ + + + + + 0.1.0 + alpha.1 + + + + 2.2.0 + + + + + 7.0.100.2 + + diff --git a/src/SourceBuild/tarball/content/ArcadeOverrides/AfterSourceBuild.proj b/src/SourceBuild/content/eng/arcade-overrides/AfterSourceBuild.proj similarity index 100% rename from src/SourceBuild/tarball/content/ArcadeOverrides/AfterSourceBuild.proj rename to src/SourceBuild/content/eng/arcade-overrides/AfterSourceBuild.proj diff --git a/src/SourceBuild/tarball/content/ArcadeOverrides/SourceBuildArcadeBuild.targets b/src/SourceBuild/content/eng/arcade-overrides/SourceBuildArcadeBuild.targets similarity index 100% rename from src/SourceBuild/tarball/content/ArcadeOverrides/SourceBuildArcadeBuild.targets rename to src/SourceBuild/content/eng/arcade-overrides/SourceBuildArcadeBuild.targets diff --git a/src/SourceBuild/tarball/content/ArcadeOverrides/SourceBuildArcadeTools.targets b/src/SourceBuild/content/eng/arcade-overrides/SourceBuildArcadeTools.targets similarity index 100% rename from src/SourceBuild/tarball/content/ArcadeOverrides/SourceBuildArcadeTools.targets rename to src/SourceBuild/content/eng/arcade-overrides/SourceBuildArcadeTools.targets diff --git a/src/SourceBuild/content/eng/bootstrap/OverrideBootstrapVersions.props b/src/SourceBuild/content/eng/bootstrap/OverrideBootstrapVersions.props new file mode 100644 index 000000000..d0a05029f --- /dev/null +++ b/src/SourceBuild/content/eng/bootstrap/OverrideBootstrapVersions.props @@ -0,0 +1,11 @@ + + + + 7.0.0-rtm.22518.5 + + $(NonshippingRuntimeVersionFor700) + $(NonshippingRuntimeVersionFor700) + $(NonshippingRuntimeVersionFor700) + + diff --git a/src/SourceBuild/content/eng/bootstrap/README.template.md b/src/SourceBuild/content/eng/bootstrap/README.template.md new file mode 100644 index 000000000..455afb472 --- /dev/null +++ b/src/SourceBuild/content/eng/bootstrap/README.template.md @@ -0,0 +1,175 @@ +# dotnet/dotnet - Home of the .NET VMR + +This repository is a **Virtual Monolithic Repository (VMR)** which includes all the source code and infrastructure needed to build the .NET SDK. + +What this means: +- **Monolithic** - a join of multiple repositories that make up the whole product, such as [dotnet/runtime](https://github.com/dotnet/runtime) or [dotnet/sdk](https://github.com/dotnet/sdk). +- **Virtual** - a mirror (not replacement) of product repos where sources from those repositories are synchronized into. +- **Experimental** - not to be depended on as we reserve the right to delete the current instance and create a new, different one in its stead. See [Limitations](#limitations). + +In the VMR, you can find: +- source files of [each product repository](#list-of-components) which are mirrored inside of their respective directories under [`src/`](https://github.com/dotnet/dotnet/tree/main/src), +- tooling that enables [building the whole .NET product from source](https://github.com/dotnet/source-build) on Linux platforms, +- small customizations, in the form of [patches](https://github.com/dotnet/dotnet/tree/main/src/installer/src/SourceBuild/patches), applied on top of the original code to make the build possible, +- *[in future]* E2E tests for the whole .NET product. + +Just like the development repositories, the VMR will have a release branch for every feature band (e.g. `release/8.0.1xx-preview1`). +Similarly, VMR's `main` branch will follow `main` branches of product repositories (see [Synchronization Based on Declared Dependencies](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#synchronization-based-on-declared-dependencies)). + +More in-depth documentation about the VMR can be found in [VMR Design And Operation](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#layout). +See also [dotnet/source-build](https://github.com/dotnet/source-build) for more information about our whole-product source-build. + +## Goals + +- The main purpose of the [dotnet/dotnet](https://github.com/dotnet/dotnet) repository is to have all source code necessary to build the .NET product available in one repository and identified by a single commit. +- The VMR also aims to become the place from which we release and service future versions of .NET to reduce the complexity of the product construction process. This should allow our partners and and 3rd parties to easily build, test and modify .NET using their custom infrastructure as well as make the process available to the community. +- Lastly, we hope to solve other problems that the current multi-repo setup brings: + - Enable the standard [down-/up-stream open-source model](src/arcade/Documentation/UnifiedBuild/VMR-Upstream-Downstream.md). + - Fulfill requirements of .NET distro builders such as RedHat or Canonical to natively include .NET in their distribution repositories. + - Simplify scenarios such as client-run testing of bug fixes and improvements. The build should work in an offline environment too for certain platforms. + - Enable developers to make and test changes spanning multiple repositories. + - More efficient pipeline for security fixes during the CVE pre-disclosure process. + +## Limitations + +**This is a work-in-progress and an experiment.** +There are considerable limitations to what is possible at the moment. For an extensive list of current limitations, please see [Temporary Mechanics](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#temporary-mechanics). + +The VMR is expected to become non-experimental by .NET 8 Preview 1 (Februrary, 2023). +This means it won't be short-lived anymore and we won't be reserving the right to delete and re-create it anymore. +Other limitations might apply until the .NET 9 timeframe. +See the [Unified Build roadmap](src/arcade/Documentation/UnifiedBuild/Roadmap.md) for more details. + +### Supported platforms + +The VMR only supports .NET 8.0 and higher. Additionally, source-build currently supports Linux only. +It is expected that Mac and Windows will be supported in the .NET 9.0. + +For the latest information about Source-Build support for new .NET versions, please check our [GitHub Discussions page](https://github.com/dotnet/source-build/discussions) for announcements. + +### Online build only + +Building the product offline is not fully working at the moment. The `--online` switch is needed when building the VMR as not all dependencies are currently built from source. + +### Code flow +For the time being, the source code only flows one way - from the development repos into the VMR. +More details on this process: + +- [Source Synchronization Process](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#source-synchronization-process) +- [Synchronization Based on Declared Dependencies](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#synchronization-based-on-declared-dependencies) +- [Moving Code and Dependencies between the VMR and Development Repos](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#moving-code-and-dependencies-between-the-vmr-and-development-repos) + +We expect the code flow to start working both ways in the .NET 9 timeframe. +See the [Unified Build roadmap](src/arcade/Documentation/UnifiedBuild/Roadmap.md) for more details. + +### Contribution + +At this time, the VMR will not accept any changes and is a read-only mirror of the development repositories only. +Please, make the changes in the respective development repositories (e.g., [dotnet/runtime](https://github.com/dotnet/runtime) or [dotnet/sdk](https://github.com/dotnet/sdk)) and they will get synchronized into the VMR automatically. + +## Dev instructions + +Please note that **this repository is an experiment and a work-in-progress so it is possible that the build is broken**. +For the latest information about Source-Build support, please watch for announcements posted on our [GitHub Discussions page](https://github.com/dotnet/source-build/discussions). + +### Prerequisites + +The dependencies for building .NET from source can be found [here](https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/linux-requirements.md). +In case you don't want to / cannot prepare your environment per the requirements, consider [using Docker](#building-using-docker). + +### Building + +1. **Clone the VMR** + + ```bash + git clone https://github.com/dotnet/dotnet dotnet-dotnet + ``` + +2. **Prep the source to build on your distro** + This downloads a .NET SDK and a number of .NET packages needed to build .NET from source. + + ```bash + cd dotnet-dotnet + ./prep.sh + ``` + +3. **Build the .NET SDK** + + ```bash + ./build.sh --clean-while-building --online + ``` + + This builds the entire .NET SDK from source. + The resulting SDK is placed at `artifacts/x64/Release/dotnet-sdk-8.0.100-your-RID.tar.gz`. + + Currently, the `--online` flag is required to allow NuGet restore from online sources during the build. + This is useful for testing unsupported releases that don't yet build without downloading pre-built binaries from the internet. + + Run `./build.sh --help` to see more information about supported build options. + +4. *(Optional)* **Unpack and install the .NET SDK** + + ```bash + mkdir -p $HOME/dotnet + tar zxf artifacts/[your-arch]/Release/dotnet-sdk-8.0.100-[your-RID].tar.gz -C $HOME/dotnet + ln -s $HOME/dotnet/dotnet /usr/bin/dotnet + ``` + + To test your source-built SDK, run the following: + + ```bash + dotnet --info + ``` + +### Building using Docker + +You can also build the repository using a Docker image which has the required prerequisites inside. +The example below creates a Docker volume named `vmr` and clones and builds the VMR there. + +```sh +docker run --rm -it -v vmr:/vmr -w /vmr mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8 +git clone https://github.com/dotnet/dotnet . +./prep.sh && ./build.sh --online +mkdir -p $HOME/.dotnet +tar -zxf artifacts/x64/Release/dotnet-sdk-8.0.100-centos.8-x64.tar.gz -C $HOME/.dotnet +ln -s $HOME/.dotnet/dotnet /usr/bin/dotnet +``` + +## List of components + +To enable full offline source-building of the VMR, we have no other choice than to synchronize all the necessary code into the VMR. This also includes any code referenced via git submodules. More details on why and how this is done can be found here: +- [Strategy for managing external source dependencies](src/arcade/Documentation/UnifiedBuild/VMR-Strategy-For-External-Source.md) +- [Source Synchronization Process](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md#source-synchronization-process) + +### Detailed list + + + +> Auto-generated list of components will go here + + + +The repository also contains a [JSON manifest](https://github.com/dotnet/dotnet/blob/main/src/source-manifest.json) listing all components in a machine-readable format. + +## Filing Issues + +This repo does not accept issues as of now. Please file issues to the appropriate development repos. +For issues with the VMR itself, please use the [source-build repository](https://github.com/dotnet/source-build). + +## Useful Links + +- Design documentation for the VMR - a set of documents describing the high-level design and the why's and how's + - [Design and Operation](src/arcade/Documentation/UnifiedBuild/VMR-Design-And-Operation.md) + - [Upstream/Downstream Relationships](src/arcade/Documentation/UnifiedBuild/VMR-Upstream-Downstream.md) + - [Code and Build Workflow](src/arcade/Documentation/UnifiedBuild/VMR-Code-And-Build-Workflow.md) + - [Strategy for Managing External Source Dependencies](src/arcade/Documentation/UnifiedBuild/VMR-Strategy-For-External-Source.md) +- [.NET Source-Build](https://github.com/dotnet/source-build) +- [What is .NET](https://dotnet.microsoft.com) + +## .NET Foundation + +.NET Runtime is a [.NET Foundation](https://www.dotnetfoundation.org/projects) project. + +## License + +.NET is licensed under the [MIT](LICENSE.TXT) license. diff --git a/src/SourceBuild/content/eng/bootstrap/THIRD-PARTY-NOTICES.template.txt b/src/SourceBuild/content/eng/bootstrap/THIRD-PARTY-NOTICES.template.txt new file mode 100644 index 000000000..ede8d240b --- /dev/null +++ b/src/SourceBuild/content/eng/bootstrap/THIRD-PARTY-NOTICES.template.txt @@ -0,0 +1,13 @@ +.NET Core uses third-party libraries or other resources that may be +distributed under licenses different than the .NET Core software. + +Attributions and licence notices for test cases originally authored by +third parties can be found in the respective test directories. + +In the event that we accidentally failed to list a required notice, please +bring it to our attention. Post an issue or email us: + + dotnet@microsoft.com + +The attached notices are provided for information only. + diff --git a/src/SourceBuild/tarball/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj b/src/SourceBuild/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj similarity index 98% rename from src/SourceBuild/tarball/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj rename to src/SourceBuild/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj index 9a00e2a48..a22d70373 100644 --- a/src/SourceBuild/tarball/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj +++ b/src/SourceBuild/content/eng/bootstrap/buildBootstrapPreviouslySB.csproj @@ -2,6 +2,7 @@ + net7.0 diff --git a/src/SourceBuild/tarball/content/eng/install-nuget-credprovider.sh b/src/SourceBuild/content/eng/install-nuget-credprovider.sh old mode 100644 new mode 100755 similarity index 100% rename from src/SourceBuild/tarball/content/eng/install-nuget-credprovider.sh rename to src/SourceBuild/content/eng/install-nuget-credprovider.sh diff --git a/src/SourceBuild/content/eng/pipelines/ci.yml b/src/SourceBuild/content/eng/pipelines/ci.yml new file mode 100644 index 000000000..9e74ea872 --- /dev/null +++ b/src/SourceBuild/content/eng/pipelines/ci.yml @@ -0,0 +1,52 @@ +# This is the main build definition (PR+CI) for dotnet/dotnet + +trigger: + batch: true + branches: + include: + - main + - release/* + - internal/release/* + +pr: + branches: + include: + - main + - release/* + - internal/release/* + +stages: +# For rolling builds we want to build the MSFT SDK first so that we can +# compare the contents with the source-built one later. +# This only works because we don't run this test in PRs. If we decided +# to run this test in PRs, we would need to build the MSFT SDK there too. +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - stage: Build_MSFT_SDK + displayName: Build MSFT SDK + jobs: + - template: /src/installer/eng/build.yml + parameters: + agentOs: Linux + jobName: Build_LinuxPortable_Release_x64 + buildConfiguration: Release + buildArchitecture: x64 + linuxPortable: true + runTests: false + isBuiltFromVmr: true + - template: /src/installer/eng/build.yml + parameters: + agentOs: Linux + jobName: Build_Arm64_Release + buildConfiguration: Release + buildArchitecture: arm64 + runtimeIdentifier: 'linux-arm64' + linuxPortable: true + runTests: false + isBuiltFromVmr: true + +- template: /src/installer/eng/pipelines/templates/stages/vmr-build.yml + parameters: + isBuiltFromVmr: true + ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + dependsOn: Build_MSFT_SDK + condition: always() diff --git a/src/SourceBuild/content/eng/pipelines/security-partners-dotnet.yml b/src/SourceBuild/content/eng/pipelines/security-partners-dotnet.yml new file mode 100644 index 000000000..69bef21e9 --- /dev/null +++ b/src/SourceBuild/content/eng/pipelines/security-partners-dotnet.yml @@ -0,0 +1,18 @@ +trigger: none + +jobs: +- template: ../../src/installer/src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml + parameters: + architecture: x64 + excludeSdkContentTests: true + matrix: + Ubuntu2004-Offline: + _BootstrapPrep: false + _Container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-20220813234344-4c008dd + _EnablePoison: false + _ExcludeOmniSharpTests: false + _RunOnline: false + name: Build_Tarball_x64 + pool: + name: NetCore1ESPool-Svc-Internal + demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 diff --git a/src/SourceBuild/tarball/content/tools-local/Directory.Build.props b/src/SourceBuild/content/eng/tools/Directory.Build.props similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/Directory.Build.props rename to src/SourceBuild/content/eng/tools/Directory.Build.props diff --git a/src/SourceBuild/tarball/content/tools-local/EmptySdk/Sdk/Sdk.props b/src/SourceBuild/content/eng/tools/EmptySdk/Sdk/Sdk.props similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/EmptySdk/Sdk/Sdk.props rename to src/SourceBuild/content/eng/tools/EmptySdk/Sdk/Sdk.props diff --git a/src/SourceBuild/tarball/content/tools-local/EmptySdk/Sdk/Sdk.targets b/src/SourceBuild/content/eng/tools/EmptySdk/Sdk/Sdk.targets similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/EmptySdk/Sdk/Sdk.targets rename to src/SourceBuild/content/eng/tools/EmptySdk/Sdk/Sdk.targets diff --git a/src/SourceBuild/tarball/content/tools-local/generate-graphviz/generate-graphviz.proj b/src/SourceBuild/content/eng/tools/generate-graphviz/generate-graphviz.proj similarity index 89% rename from src/SourceBuild/tarball/content/tools-local/generate-graphviz/generate-graphviz.proj rename to src/SourceBuild/content/eng/tools/generate-graphviz/generate-graphviz.proj index 888cbd9c6..98e292173 100644 --- a/src/SourceBuild/tarball/content/tools-local/generate-graphviz/generate-graphviz.proj +++ b/src/SourceBuild/content/eng/tools/generate-graphviz/generate-graphviz.proj @@ -4,10 +4,10 @@ + $(ProjectDir)repo-projects\known-good.proj; + $(ProjectDir)repo-projects\known-good-tests.proj" /> - + + @@ -22,10 +23,10 @@ @@ -118,6 +119,16 @@ + + + + + + - - - - - - - - - - - - - - - - - - + - net7.0 + net8.0 true $(LeakDetectionTasksBinDir) diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/NuGet.Config b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/NuGet.Config similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/NuGet.Config rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/NuGet.Config diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonMatch.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonMatch.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonMatch.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonMatch.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonType.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonType.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonType.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonType.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonedFileEntry.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonedFileEntry.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonedFileEntry.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/PoisonedFileEntry.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Utility.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Utility.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Utility.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/Utility.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/_._ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/_._ similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/_._ rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/_._ diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddRidToRuntimeJson.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddRidToRuntimeJson.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddRidToRuntimeJson.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddRidToRuntimeJson.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddSourceToNuGetConfig.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddSourceToNuGetConfig.cs old mode 100755 new mode 100644 similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddSourceToNuGetConfig.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AddSourceToNuGetConfig.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureConnectionStringBuildTask.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureConnectionStringBuildTask.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureConnectionStringBuildTask.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureConnectionStringBuildTask.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureHelper.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureHelper.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureHelper.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/AzureHelper.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/BuildTask.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/BuildTask.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/BuildTask.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/BuildTask.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/DownloadFileSB.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/DownloadFileSB.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/DownloadFileSB.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/DownloadFileSB.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/EnumerableExtensions.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/EnumerableExtensions.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/EnumerableExtensions.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/EnumerableExtensions.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FileUtilities.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FileUtilities.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FileUtilities.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FileUtilities.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FixPathSeparator.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FixPathSeparator.cs old mode 100755 new mode 100644 similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FixPathSeparator.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/FixPathSeparator.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Log.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Log.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Log.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Log.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj old mode 100755 new mode 100644 similarity index 93% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj index 87982bdef..d458ea6f3 --- a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj +++ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Microsoft.DotNet.SourceBuild.Tasks.XPlat.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 $(XPlatTasksBinDir) diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Models/VersionDetailsXml.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Models/VersionDetailsXml.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Models/VersionDetailsXml.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/Models/VersionDetailsXml.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuGetPack.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuGetPack.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuGetPack.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuGetPack.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuspecPropertyStringProvider.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuspecPropertyStringProvider.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuspecPropertyStringProvider.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/NuspecPropertyStringProvider.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PackagingTask.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PackagingTask.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PackagingTask.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PackagingTask.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReadNuGetPackageInfos.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReadNuGetPackageInfos.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReadNuGetPackageInfos.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReadNuGetPackageInfos.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RemoveInternetSourcesFromNuGetConfig.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RemoveInternetSourcesFromNuGetConfig.cs old mode 100755 new mode 100644 similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RemoveInternetSourcesFromNuGetConfig.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RemoveInternetSourcesFromNuGetConfig.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceFeedsInNuGetConfig.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceFeedsInNuGetConfig.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceFeedsInNuGetConfig.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceFeedsInNuGetConfig.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceRegexInFiles.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceRegexInFiles.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceRegexInFiles.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceRegexInFiles.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFile.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFile.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFile.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFile.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFiles.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFiles.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFiles.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ReplaceTextInFiles.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RepoTasks/JoinItems.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RepoTasks/JoinItems.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RepoTasks/JoinItems.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RepoTasks/JoinItems.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateJson.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateJson.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateJson.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateJson.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateNuGetConfigPackageSourcesMappings.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateNuGetConfigPackageSourcesMappings.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateNuGetConfigPackageSourcesMappings.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UpdateNuGetConfigPackageSourcesMappings.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadClient.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadClient.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadClient.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadClient.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadToAzure.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadToAzure.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadToAzure.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UploadToAzure.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/AnnotatedUsage.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/AnnotatedUsage.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/AnnotatedUsage.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/AnnotatedUsage.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/Usage.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/Usage.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/Usage.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/Usage.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/UsageData.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/UsageData.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/UsageData.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/UsageData.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/ValidateUsageAgainstBaseline.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/ValidateUsageAgainstBaseline.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/ValidateUsageAgainstBaseline.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/ValidateUsageAgainstBaseline.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WritePackageUsageData.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WritePackageUsageData.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WritePackageUsageData.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WritePackageUsageData.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageBurndownData.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageBurndownData.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageBurndownData.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageBurndownData.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageReports.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageReports.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageReports.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/WriteUsageReports.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/XmlParsingHelpers.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/XmlParsingHelpers.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/XmlParsingHelpers.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/UsageReport/XmlParsingHelpers.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteBuildOutputProps.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteBuildOutputProps.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteBuildOutputProps.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteBuildOutputProps.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceAndVersionProps.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceAndVersionProps.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceAndVersionProps.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceAndVersionProps.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceProps.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceProps.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceProps.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteRestoreSourceProps.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteVersionsFile.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteVersionsFile.cs old mode 100755 new mode 100644 similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteVersionsFile.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/WriteVersionsFile.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ZipFileExtractToDirectory.cs b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ZipFileExtractToDirectory.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ZipFileExtractToDirectory.cs rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/ZipFileExtractToDirectory.cs diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/_._ b/src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/_._ similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/_._ rename to src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/_._ diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/SourceBuild.MSBuildSdkResolver/SourceBuild.MSBuildSdkResolver.csproj b/src/SourceBuild/content/eng/tools/tasks/SourceBuild.MSBuildSdkResolver/SourceBuild.MSBuildSdkResolver.csproj old mode 100755 new mode 100644 similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/SourceBuild.MSBuildSdkResolver/SourceBuild.MSBuildSdkResolver.csproj rename to src/SourceBuild/content/eng/tools/tasks/SourceBuild.MSBuildSdkResolver/SourceBuild.MSBuildSdkResolver.csproj diff --git a/src/SourceBuild/tarball/content/tools-local/tasks/SourceBuild.MSBuildSdkResolver/SourceBuiltSdkResolver.cs b/src/SourceBuild/content/eng/tools/tasks/SourceBuild.MSBuildSdkResolver/SourceBuiltSdkResolver.cs similarity index 100% rename from src/SourceBuild/tarball/content/tools-local/tasks/SourceBuild.MSBuildSdkResolver/SourceBuiltSdkResolver.cs rename to src/SourceBuild/content/eng/tools/tasks/SourceBuild.MSBuildSdkResolver/SourceBuiltSdkResolver.cs diff --git a/src/SourceBuild/tarball/content/global.json b/src/SourceBuild/content/global.json similarity index 87% rename from src/SourceBuild/tarball/content/global.json rename to src/SourceBuild/content/global.json index 8d9568376..fce77b6a1 100644 --- a/src/SourceBuild/tarball/content/global.json +++ b/src/SourceBuild/content/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "7.0.100-rc.2.22477.23" + "dotnet": "8.0.100-alpha.1.22579.5" }, "msbuild-sdks": { "Microsoft.Build.CentralPackageVersions": "2.0.1", diff --git a/src/SourceBuild/tarball/content/prep.sh b/src/SourceBuild/content/prep.sh similarity index 60% rename from src/SourceBuild/tarball/content/prep.sh rename to src/SourceBuild/content/prep.sh index 27562569c..4fcb7e1bb 100755 --- a/src/SourceBuild/tarball/content/prep.sh +++ b/src/SourceBuild/content/prep.sh @@ -39,12 +39,6 @@ while :; do shift done -# Check for the archive text file which describes the location of the archive files to download -if [ ! -f $SCRIPT_ROOT/packages/archive/archiveArtifacts.txt ]; then - echo " ERROR: $SCRIPT_ROOT/packages/archive/archiveArtifacts.txt does not exist. Cannot determine which archives to download. Exiting..." - exit -1 -fi - downloadArtifacts=true downloadPrebuilts=true installDotnet=true @@ -57,13 +51,16 @@ then fi # Check if Private.SourceBuilt artifacts archive exists -if [ -f $SCRIPT_ROOT/packages/archive/Private.SourceBuilt.Artifacts.*.tar.gz ]; then +artifactsBaseFileName="Private.SourceBuilt.Artifacts" +packagesArchiveDir="$SCRIPT_ROOT/prereqs/packages/archive/" +if [ -f ${packagesArchiveDir}${artifactsBaseFileName}.*.tar.gz ]; then echo " Private.SourceBuilt.Artifacts.*.tar.gz exists...it will not be downloaded" downloadArtifacts=false fi # Check if Private.SourceBuilt prebuilts archive exists -if [ -f $SCRIPT_ROOT/packages/archive/Private.SourceBuilt.Prebuilts.*.tar.gz ]; then +prebuiltsBaseFileName="Private.SourceBuilt.Prebuilts" +if [ -f ${packagesArchiveDir}${prebuiltsBaseFileName}.*.tar.gz ]; then echo " Private.SourceBuilt.Prebuilts.*.tar.gz exists...it will not be downloaded" downloadPrebuilts=false fi @@ -74,26 +71,46 @@ if [ -d $SCRIPT_ROOT/.dotnet ]; then installDotnet=false; fi -# Read the archive text file to get the archives to download and download them -while read -r line; do - if [[ $line == *"Private.SourceBuilt.Artifacts"* ]]; then - if [ "$downloadArtifacts" == "true" ]; then - echo " Downloading source-built artifacts from $line..." - (cd $SCRIPT_ROOT/packages/archive/ && curl --retry 5 -O $line) - fi +function DownloadArchive { + archiveType="$1" + baseFileName="$2" + isRequired="$3" + + sourceBuiltArtifactsTarballUrl="https://dotnetcli.azureedge.net/source-built-artifacts/assets/" + packageVersionsPath="$SCRIPT_ROOT/eng/Versions.props" + notFoundMessage="No source-built $archiveType found to download..." + + echo " Looking for source-built $archiveType to download..." + archiveVersionLine=`grep -m 1 "" "$packageVersionsPath" || :` + versionPattern="(.*)" + if [[ $archiveVersionLine =~ $versionPattern ]]; then + archiveUrl="${sourceBuiltArtifactsTarballUrl}${baseFileName}.${BASH_REMATCH[1]}.tar.gz" + echo " Downloading source-built $archiveType from $archiveUrl..." + (cd $packagesArchiveDir && curl --retry 5 -O $archiveUrl) + elif [ "$isRequired" == "true" ]; then + echo " ERROR: $notFoundMessage" + exit -1 + else + echo " $notFoundMessage" fi - if [[ $line == *"Private.SourceBuilt.Prebuilts"* ]]; then - if [ "$downloadPrebuilts" == "true" ]; then - echo " Downloading source-built prebuilts from $line..." - (cd $SCRIPT_ROOT/packages/archive/ && curl --retry 5 -O $line) - fi - fi -done < $SCRIPT_ROOT/packages/archive/archiveArtifacts.txt +} + +# Read the eng/Versions.props to get the archives to download and download them +if [ "$downloadArtifacts" == "true" ]; then + DownloadArchive "Artifacts" $artifactsBaseFileName "true" +fi + +if [ "$downloadPrebuilts" == "true" ]; then + DownloadArchive "Prebuilts" $prebuiltsBaseFileName "false" +fi # Check for the version of dotnet to install if [ "$installDotnet" == "true" ]; then echo " Installing dotnet..." (source ./eng/common/tools.sh && InitializeDotNetCli true) + + # TODO: Remove once runtime dependency is gone + bash .dotnet/dotnet-install.sh --install-dir "$SCRIPT_ROOT/.dotnet" --version 7.0.0 --runtime dotnet fi # Build bootstrap, if specified @@ -112,13 +129,13 @@ if [ "$buildBootstrap" == "true" ]; then # Get PackageVersions.props from existing prev-sb archive echo " Retrieving PackageVersions.props from existing archive" - sourceBuiltArchive=`find $SCRIPT_ROOT/packages/archive -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz'` + sourceBuiltArchive=`find $packagesArchiveDir -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz'` if [ -f "$sourceBuiltArchive" ]; then tar -xzf "$sourceBuiltArchive" -C $workingDir PackageVersions.props fi # Run restore on project to initiate download of bootstrap packages - $DOTNET_SDK_PATH/dotnet restore $workingDir/buildBootstrapPreviouslySB.csproj /bl:artifacts/prep/bootstrap.binlog /fileLoggerParameters:LogFile=artifacts/prep/bootstrap.log /p:ArchiveDir="$SCRIPT_ROOT/packages/archive/" + $DOTNET_SDK_PATH/dotnet restore $workingDir/buildBootstrapPreviouslySB.csproj /bl:artifacts/prep/bootstrap.binlog /fileLoggerParameters:LogFile=artifacts/prep/bootstrap.log /p:ArchiveDir="$packagesArchiveDir" /p:BootstrapOverrideVersionsProps="$SCRIPT_ROOT/eng/bootstrap/OverrideBootstrapVersions.props" # Remove working directory rm -rf $workingDir diff --git a/src/SourceBuild/tarball/content/keys/Newtonsoft.Json.snk b/src/SourceBuild/content/prereqs/keys/Newtonsoft.Json.snk similarity index 100% rename from src/SourceBuild/tarball/content/keys/Newtonsoft.Json.snk rename to src/SourceBuild/content/prereqs/keys/Newtonsoft.Json.snk diff --git a/src/SourceBuild/tarball/content/keys/NuGet.Client.snk b/src/SourceBuild/content/prereqs/keys/NuGet.Client.snk similarity index 100% rename from src/SourceBuild/tarball/content/keys/NuGet.Client.snk rename to src/SourceBuild/content/prereqs/keys/NuGet.Client.snk diff --git a/src/SourceBuild/tarball/content/keys/README.md b/src/SourceBuild/content/prereqs/keys/README.md similarity index 100% rename from src/SourceBuild/tarball/content/keys/README.md rename to src/SourceBuild/content/prereqs/keys/README.md diff --git a/src/SourceBuild/content/prereqs/packages/archive/_ b/src/SourceBuild/content/prereqs/packages/archive/_ new file mode 100644 index 000000000..e69de29bb diff --git a/src/SourceBuild/content/prereqs/packages/prebuilt/_ b/src/SourceBuild/content/prereqs/packages/prebuilt/_ new file mode 100644 index 000000000..e69de29bb diff --git a/src/SourceBuild/tarball/content/repos/Directory.Build.props b/src/SourceBuild/content/repo-projects/Directory.Build.props similarity index 95% rename from src/SourceBuild/tarball/content/repos/Directory.Build.props rename to src/SourceBuild/content/repo-projects/Directory.Build.props index e4e3060af..dc8d58db5 100644 --- a/src/SourceBuild/tarball/content/repos/Directory.Build.props +++ b/src/SourceBuild/content/repo-projects/Directory.Build.props @@ -6,8 +6,7 @@ - - + $(RepositoryName) @@ -61,7 +60,7 @@ - + @@ -143,6 +142,7 @@ $(StandardSourceBuildArgs) /p:AdditionalSourceBuiltNupkgCacheDir="$(SourceBuiltPackagesPath)" $(StandardSourceBuildArgs) /p:ReferencePackageNupkgCacheDir="$(ReferencePackagesDir)" $(StandardSourceBuildArgs) /p:PreviouslySourceBuiltNupkgCacheDir="$(PrebuiltSourceBuiltPackagesPath)" + $(StandardSourceBuildArgs) /p:SourceBuildUseMonoRuntime=$(SourceBuildUseMonoRuntime) $(ProjectDirectory)\build$(ShellExtension) @@ -155,6 +155,6 @@ - + diff --git a/src/SourceBuild/tarball/content/repos/Directory.Build.targets b/src/SourceBuild/content/repo-projects/Directory.Build.targets similarity index 96% rename from src/SourceBuild/tarball/content/repos/Directory.Build.targets rename to src/SourceBuild/content/repo-projects/Directory.Build.targets index 7bf88fdd6..e663f8937 100644 --- a/src/SourceBuild/tarball/content/repos/Directory.Build.targets +++ b/src/SourceBuild/content/repo-projects/Directory.Build.targets @@ -71,20 +71,6 @@ - - - - - + Subsequent projects will get Arcade from eng/source-built-sdks. --> @@ -607,28 +593,28 @@ - + - + + WorkingDirectory="$(SourceBuiltSdksDir)%(_ToolPackage.Id)/tools/SourceBuild/" /> - $(ToolPackageExtractDir)%(_ToolPackage.Id)/ + $(SourceBuiltSdksDir)%(_ToolPackage.Id)/ - + - + @@ -728,7 +714,7 @@ - + @@ -775,7 +761,7 @@ - + diff --git a/src/SourceBuild/tarball/content/repos/arcade.proj b/src/SourceBuild/content/repo-projects/arcade.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/arcade.proj rename to src/SourceBuild/content/repo-projects/arcade.proj diff --git a/src/SourceBuild/tarball/content/repos/aspnetcore.proj b/src/SourceBuild/content/repo-projects/aspnetcore.proj similarity index 83% rename from src/SourceBuild/tarball/content/repos/aspnetcore.proj rename to src/SourceBuild/content/repo-projects/aspnetcore.proj index cea712c1b..afdd47c63 100644 --- a/src/SourceBuild/tarball/content/repos/aspnetcore.proj +++ b/src/SourceBuild/content/repo-projects/aspnetcore.proj @@ -2,6 +2,11 @@ + $(TargetRid) + osx-$(Platform) + freebsd-$(Platform) + win-$(Platform) + $(StandardSourceBuildArgs.Replace('--publish', '')) @@ -9,7 +14,7 @@ $(BuildCommandArgs) --no-build-repo-tasks $(BuildCommandArgs) --no-build-nodejs $(BuildCommandArgs) /p:PublishCompressedFilesPathPrefix=$(SourceBuiltAspNetCoreRuntime) - $(BuildCommandArgs) /p:PortableBuild=false /p:TargetRuntimeIdentifier=$(TargetRid) + $(BuildCommandArgs) /p:PortableBuild=false /p:TargetRuntimeIdentifier=$(OverrideTargetRid) $(BuildCommandArgs) /p:MicrosoftNetFrameworkReferenceAssembliesVersion=1.0.0 @@ -25,8 +30,10 @@ - CS0618 + Requires https://github.com/dotnet/source-build/issues/2482 + CA1825 - Avoid unnecessary zero-length array allocations. + Requires aspnet to upgrade roslyn version. --> + CS0618;CA1825 diff --git a/src/SourceBuild/tarball/content/repos/command-line-api.proj b/src/SourceBuild/content/repo-projects/command-line-api.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/command-line-api.proj rename to src/SourceBuild/content/repo-projects/command-line-api.proj diff --git a/src/SourceBuild/tarball/content/repos/deployment-tools.proj b/src/SourceBuild/content/repo-projects/deployment-tools.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/deployment-tools.proj rename to src/SourceBuild/content/repo-projects/deployment-tools.proj diff --git a/src/SourceBuild/tarball/content/repos/diagnostics.proj b/src/SourceBuild/content/repo-projects/diagnostics.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/diagnostics.proj rename to src/SourceBuild/content/repo-projects/diagnostics.proj diff --git a/src/SourceBuild/tarball/content/repos/format.proj b/src/SourceBuild/content/repo-projects/format.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/format.proj rename to src/SourceBuild/content/repo-projects/format.proj diff --git a/src/SourceBuild/tarball/content/repos/fsharp.proj b/src/SourceBuild/content/repo-projects/fsharp.proj similarity index 89% rename from src/SourceBuild/tarball/content/repos/fsharp.proj rename to src/SourceBuild/content/repo-projects/fsharp.proj index bc9a10be7..36261805f 100644 --- a/src/SourceBuild/tarball/content/repos/fsharp.proj +++ b/src/SourceBuild/content/repo-projects/fsharp.proj @@ -27,12 +27,13 @@ + - + diff --git a/src/SourceBuild/tarball/content/repos/installer.proj b/src/SourceBuild/content/repo-projects/installer.proj similarity index 81% rename from src/SourceBuild/tarball/content/repos/installer.proj rename to src/SourceBuild/content/repo-projects/installer.proj index 41d52d74b..42ef91233 100644 --- a/src/SourceBuild/tarball/content/repos/installer.proj +++ b/src/SourceBuild/content/repo-projects/installer.proj @@ -7,11 +7,16 @@ $(TargetRid) - osx-x64 + osx-$(Platform) + freebsd-$(Platform) + win-$(Platform) $(OverrideTargetRid.Substring(0, $(OverrideTargetRid.IndexOf("-")))) + + <_platformIndex>$(NETCoreSdkPortableRuntimeIdentifier.LastIndexOf('-')) + $(NETCoreSdkPortableRuntimeIdentifier.Substring(0, $(_platformIndex))) + --runtime-id $(OverrideTargetRid) - --runtime-id $(TargetRid) $(StandardSourceBuildArgs) $(BuildCommandArgs) $(RuntimeArg) @@ -22,14 +27,14 @@ --> $(BuildCommandArgs) /p:NETCoreAppMaximumVersion=99.9 $(BuildCommandArgs) /p:OSName=$(OSNameOverride) - $(BuildCommandArgs) /p:Rid=$(TargetRid) + $(BuildCommandArgs) /p:PortableOSName=$(PortableOS) + $(BuildCommandArgs) /p:Rid=$(OverrideTargetRid) $(BuildCommandArgs) /p:DOTNET_INSTALL_DIR=$(DotNetCliToolDir) - $(BuildCommandArgs) /p:AspNetCoreInstallerRid=$(TargetRid) + $(BuildCommandArgs) /p:AspNetCoreInstallerRid=$(OverrideTargetRid) - $(BuildCommandArgs) /p:CoreSetupRid=freebsd-x64 /p:PortableBuild=true - $(BuildCommandArgs) /p:CoreSetupRid=osx-x64 - $(BuildCommandArgs) /p:CoreSetupRid=$(TargetRid) + $(BuildCommandArgs) /p:PortableBuild=true + $(BuildCommandArgs) /p:CoreSetupRid=$(OverrideTargetRid) $(BuildCommandArgs) /p:PublicBaseURL=file:%2F%2F$(SourceBuiltAssetsDir) diff --git a/src/SourceBuild/tarball/content/repos/known-good-tests.proj b/src/SourceBuild/content/repo-projects/known-good-tests.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/known-good-tests.proj rename to src/SourceBuild/content/repo-projects/known-good-tests.proj diff --git a/src/SourceBuild/tarball/content/repos/known-good.proj b/src/SourceBuild/content/repo-projects/known-good.proj similarity index 98% rename from src/SourceBuild/tarball/content/repos/known-good.proj rename to src/SourceBuild/content/repo-projects/known-good.proj index 0adee7f53..989d6e20d 100644 --- a/src/SourceBuild/tarball/content/repos/known-good.proj +++ b/src/SourceBuild/content/repo-projects/known-good.proj @@ -34,7 +34,7 @@ - + diff --git a/src/SourceBuild/tarball/content/repos/linker.proj b/src/SourceBuild/content/repo-projects/linker.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/linker.proj rename to src/SourceBuild/content/repo-projects/linker.proj diff --git a/src/SourceBuild/tarball/content/repos/msbuild.proj b/src/SourceBuild/content/repo-projects/msbuild.proj similarity index 96% rename from src/SourceBuild/tarball/content/repos/msbuild.proj rename to src/SourceBuild/content/repo-projects/msbuild.proj index 4069d7d3d..0504e9702 100644 --- a/src/SourceBuild/tarball/content/repos/msbuild.proj +++ b/src/SourceBuild/content/repo-projects/msbuild.proj @@ -57,7 +57,7 @@ - $(ToolPackageExtractDir)%(_CentralVersionsToolPackage.Id)/ + $(SourceBuiltSdksDir)%(_CentralVersionsToolPackage.Id)/ diff --git a/src/SourceBuild/tarball/content/repos/nuget-client.proj b/src/SourceBuild/content/repo-projects/nuget-client.proj similarity index 96% rename from src/SourceBuild/tarball/content/repos/nuget-client.proj rename to src/SourceBuild/content/repo-projects/nuget-client.proj index eccc1a738..586565cac 100644 --- a/src/SourceBuild/tarball/content/repos/nuget-client.proj +++ b/src/SourceBuild/content/repo-projects/nuget-client.proj @@ -6,6 +6,7 @@ false true true + CS9057 diff --git a/src/SourceBuild/tarball/content/repos/package-source-build.proj b/src/SourceBuild/content/repo-projects/package-source-build.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/package-source-build.proj rename to src/SourceBuild/content/repo-projects/package-source-build.proj diff --git a/src/SourceBuild/tarball/content/repos/razor-compiler.proj b/src/SourceBuild/content/repo-projects/razor.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/razor-compiler.proj rename to src/SourceBuild/content/repo-projects/razor.proj diff --git a/src/SourceBuild/tarball/content/repos/roslyn-analyzers.proj b/src/SourceBuild/content/repo-projects/roslyn-analyzers.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/roslyn-analyzers.proj rename to src/SourceBuild/content/repo-projects/roslyn-analyzers.proj diff --git a/src/SourceBuild/tarball/content/repos/roslyn.proj b/src/SourceBuild/content/repo-projects/roslyn.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/roslyn.proj rename to src/SourceBuild/content/repo-projects/roslyn.proj diff --git a/src/SourceBuild/tarball/content/repos/runtime.proj b/src/SourceBuild/content/repo-projects/runtime.proj similarity index 96% rename from src/SourceBuild/tarball/content/repos/runtime.proj rename to src/SourceBuild/content/repo-projects/runtime.proj index 231c9b464..c477000a6 100644 --- a/src/SourceBuild/tarball/content/repos/runtime.proj +++ b/src/SourceBuild/content/repo-projects/runtime.proj @@ -8,9 +8,9 @@ $(ProjectDirectory)/clean$(ShellExtension) $(TargetRid) - osx-x64 - freebsd-x64 - win-x64 + osx-$(Platform) + freebsd-$(Platform) + win-$(Platform) <_platformIndex>$(NETCoreSdkRuntimeIdentifier.LastIndexOf('-')) $(NETCoreSdkRuntimeIdentifier.Substring(0, $(_platformIndex))) diff --git a/src/SourceBuild/tarball/content/repos/sdk.proj b/src/SourceBuild/content/repo-projects/sdk.proj similarity index 97% rename from src/SourceBuild/tarball/content/repos/sdk.proj rename to src/SourceBuild/content/repo-projects/sdk.proj index c18e00dd6..5d0fe449d 100644 --- a/src/SourceBuild/tarball/content/repos/sdk.proj +++ b/src/SourceBuild/content/repo-projects/sdk.proj @@ -39,7 +39,7 @@ - + diff --git a/src/SourceBuild/tarball/content/repos/source-build-externals.proj b/src/SourceBuild/content/repo-projects/source-build-externals.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/source-build-externals.proj rename to src/SourceBuild/content/repo-projects/source-build-externals.proj diff --git a/src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj b/src/SourceBuild/content/repo-projects/source-build-reference-packages.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/source-build-reference-packages.proj rename to src/SourceBuild/content/repo-projects/source-build-reference-packages.proj diff --git a/src/SourceBuild/tarball/content/repos/sourcelink.proj b/src/SourceBuild/content/repo-projects/sourcelink.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/sourcelink.proj rename to src/SourceBuild/content/repo-projects/sourcelink.proj diff --git a/src/SourceBuild/tarball/content/repos/symreader.proj b/src/SourceBuild/content/repo-projects/symreader.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/symreader.proj rename to src/SourceBuild/content/repo-projects/symreader.proj diff --git a/src/SourceBuild/tarball/content/repos/templating.proj b/src/SourceBuild/content/repo-projects/templating.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/templating.proj rename to src/SourceBuild/content/repo-projects/templating.proj diff --git a/src/SourceBuild/tarball/content/repos/test-templates.proj b/src/SourceBuild/content/repo-projects/test-templates.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/test-templates.proj rename to src/SourceBuild/content/repo-projects/test-templates.proj diff --git a/src/SourceBuild/tarball/content/repos/vstest.proj b/src/SourceBuild/content/repo-projects/vstest.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/vstest.proj rename to src/SourceBuild/content/repo-projects/vstest.proj diff --git a/src/SourceBuild/tarball/content/repos/xdt.proj b/src/SourceBuild/content/repo-projects/xdt.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/xdt.proj rename to src/SourceBuild/content/repo-projects/xdt.proj diff --git a/src/SourceBuild/tarball/content/repos/xliff-tasks.proj b/src/SourceBuild/content/repo-projects/xliff-tasks.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/xliff-tasks.proj rename to src/SourceBuild/content/repo-projects/xliff-tasks.proj diff --git a/src/SourceBuild/tarball/content/src/Directory.Build.props b/src/SourceBuild/content/src/Directory.Build.props similarity index 100% rename from src/SourceBuild/tarball/content/src/Directory.Build.props rename to src/SourceBuild/content/src/Directory.Build.props diff --git a/src/SourceBuild/tarball/content/src/Directory.Build.targets b/src/SourceBuild/content/src/Directory.Build.targets similarity index 100% rename from src/SourceBuild/tarball/content/src/Directory.Build.targets rename to src/SourceBuild/content/src/Directory.Build.targets diff --git a/src/SourceBuild/tarball/content/test/Directory.Build.props b/src/SourceBuild/content/test/Directory.Build.props similarity index 100% rename from src/SourceBuild/tarball/content/test/Directory.Build.props rename to src/SourceBuild/content/test/Directory.Build.props diff --git a/src/SourceBuild/tarball/content/test/Directory.Build.targets b/src/SourceBuild/content/test/Directory.Build.targets similarity index 100% rename from src/SourceBuild/tarball/content/test/Directory.Build.targets rename to src/SourceBuild/content/test/Directory.Build.targets diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BaselineHelper.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BasicScenarioTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BasicScenarioTests.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BasicScenarioTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/BasicScenarioTests.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Config.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetActions.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetActions.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetActions.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetActions.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetFormatTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetFormatTests.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetFormatTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetFormatTests.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs similarity index 97% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs index ae5508aa4..921ab1f97 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetHelper.cs @@ -96,7 +96,7 @@ internal class DotNetHelper } } - public void ExecuteCmd(string args, string? workingDirectory = null, Action? additionalProcessConfigCallback = null, int expectedExitCode = 0, int millisecondTimeout = -1) + public void ExecuteCmd(string args, string? workingDirectory = null, Action? additionalProcessConfigCallback = null, int? expectedExitCode = 0, int millisecondTimeout = -1) { (Process Process, string StdOut, string StdErr) executeResult = ExecuteHelper.ExecuteProcess( DotNetPath, @@ -105,7 +105,9 @@ internal class DotNetHelper configure: (process) => configureProcess(process, workingDirectory), millisecondTimeout: millisecondTimeout); - ExecuteHelper.ValidateExitCode(executeResult, expectedExitCode); + if (expectedExitCode != null) { + ExecuteHelper.ValidateExitCode(executeResult, (int) expectedExitCode); + } void configureProcess(Process process, string? workingDirectory) { diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguage.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguage.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguage.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguage.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguageExtensions.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguageExtensions.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguageExtensions.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetLanguageExtensions.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplate.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplate.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplate.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplate.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplateExtensions.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplateExtensions.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplateExtensions.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetTemplateExtensions.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs similarity index 84% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs index f2dc2a75b..4c5a9c425 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/DotNetWatchTests.cs @@ -13,20 +13,18 @@ public class DotNetWatchTests : SmokeTests { public DotNetWatchTests(ITestOutputHelper outputHelper) : base(outputHelper) { } - // TODO: Re-enable https://github.com/dotnet/source-build/issues/2961 - // [Fact] + //[Fact] - Renable with https://github.com/dotnet/source-build/issues/3123 public void WatchTests() { string projectDirectory = DotNetHelper.ExecuteNew(DotNetTemplate.Console.GetName(), nameof(DotNetWatchTests)); bool outputChanged = false; - // We expect an exit code of 143 (128 + 15, i.e. SIGTERM) because we are killing the process manually DotNetHelper.ExecuteCmd( "watch run", workingDirectory: projectDirectory, additionalProcessConfigCallback: processConfigCallback, - expectedExitCode: 143, - millisecondTimeout: 30000); + expectedExitCode: null, // The exit code does not reflect whether or not dotnet watch is working properly + millisecondTimeout: 60000); Assert.True(outputChanged); @@ -53,7 +51,7 @@ public class DotNetWatchTests : SmokeTests { outputChanged = true; OutputHelper.WriteLine("Successfully re-ran program after code change."); - ExecuteHelper.ExecuteProcessValidateExitCode("kill", $"-s TERM {process.Id}", OutputHelper); + process.Kill(true); } }); } diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs similarity index 84% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs index 62e1eb594..b8b4e7d8d 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/ExecuteHelper.cs @@ -70,21 +70,35 @@ internal static class ExecuteHelper if (!process.HasExited) { - outputHelper.WriteLine($"Killing: {fileName} {args}"); + outputHelper.WriteLine($"Process did not exit. Killing {fileName} {args} after waiting {millisecondTimeout} milliseconds."); process.Kill(true); process.WaitForExit(); } - string output = stdOutput.ToString().Trim(); - if (logOutput && !string.IsNullOrWhiteSpace(output)) + string output; + string error; + + lock (stdOutput) { - outputHelper.WriteLine(output); + output = stdOutput.ToString().Trim(); } - string error = stdError.ToString().Trim(); - if (logOutput && !string.IsNullOrWhiteSpace(error)) + lock (stdError) { - outputHelper.WriteLine(error); + error = stdError.ToString().Trim(); + } + + if (logOutput) + { + if (!string.IsNullOrWhiteSpace(output)) + { + outputHelper.WriteLine(output); + } + + if (string.IsNullOrWhiteSpace(error)) + { + outputHelper.WriteLine(error); + } } return (process, output, error); diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/HttpClientExtensions.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/HttpClientExtensions.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/HttpClientExtensions.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/HttpClientExtensions.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.sln b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.sln similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.sln rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.sln diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/OmniSharpTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/OmniSharpTests.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/OmniSharpTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/OmniSharpTests.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/PoisonTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/PoisonTests.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/PoisonTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/PoisonTests.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md similarity index 87% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md index 416492a6e..5cd7d8e86 100644 --- a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/README.md @@ -7,4 +7,4 @@ Some prerelease scenarios, usually security updates, require non-source-built packages which are not publicly available. Specify the directory where these packages can be found via the `SMOKE_TESTS_PREREQS_PATH` environment variable when running tests via `build.sh --run-smoke-test` e.g. -`SMOKE_TESTS_PREREQS_PATH=packages/smoke-test-prereqs`. +`SMOKE_TESTS_PREREQS_PATH=prereqs/packages/smoke-test-prereqs`. diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableFactAttribute.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableFactAttribute.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableFactAttribute.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableFactAttribute.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableTheoryAttribute.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableTheoryAttribute.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableTheoryAttribute.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SkippableTheoryAttribute.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/SmokeTests.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestScenario.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestScenario.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestScenario.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestScenario.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Utilities.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Utilities.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Utilities.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Utilities.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/WebScenarioTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/WebScenarioTests.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/WebScenarioTests.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/WebScenarioTests.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/FormatTestUnformatted.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/FormatTestUnformatted.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/FormatTestUnformatted.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/FormatTestUnformatted.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/FormatTestFormatted.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/FormatTestFormatted.cs similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/FormatTestFormatted.cs rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/FormatTestFormatted.cs diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdk.diff b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdk.diff similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdk.diff rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/MsftToSbSdk.diff diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/PoisonUsage.txt b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/PoisonUsage.txt similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/PoisonUsage.txt rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/baselines/PoisonUsage.txt diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/local.NuGet.Config b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/local.NuGet.Config similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/local.NuGet.Config rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/local.NuGet.Config diff --git a/src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config similarity index 100% rename from src/SourceBuild/tarball/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config rename to src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config diff --git a/src/SourceBuild/patches/aspnetcore/0001-Disable-package-validation-during-source-build.patch b/src/SourceBuild/patches/aspnetcore/0001-Disable-package-validation-during-source-build.patch new file mode 100644 index 000000000..148bdb954 --- /dev/null +++ b/src/SourceBuild/patches/aspnetcore/0001-Disable-package-validation-during-source-build.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MichaelSimons +Date: Mon, 5 Dec 2022 23:35:39 +0000 +Subject: [PATCH] Disable package validation during source-build + +--- + eng/SourceBuild.props | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props +index 63ebed2d9c..a1f0263955 100644 +--- a/eng/SourceBuild.props ++++ b/eng/SourceBuild.props +@@ -56,6 +56,7 @@ + + $(InnerBuildArgs) /p:SourceBuildRuntimeIdentifier=$(TargetRuntimeIdentifier) + $(InnerBuildArgs) /p:CrossgenOutput=false ++ $(InnerBuildArgs) /p:EnablePackageValidation=false + + + +-- +2.30.2.windows.1 \ No newline at end of file diff --git a/src/SourceBuild/tarball/patches/aspnetcore/0002-IDE0060-workaround.patch b/src/SourceBuild/patches/aspnetcore/0002-IDE0060-workaround.patch similarity index 100% rename from src/SourceBuild/tarball/patches/aspnetcore/0002-IDE0060-workaround.patch rename to src/SourceBuild/patches/aspnetcore/0002-IDE0060-workaround.patch diff --git a/src/SourceBuild/tarball/patches/roslyn-analyzers/0001-Eliminate-pre-built-assets-during-source-build-for-r.patch b/src/SourceBuild/patches/roslyn-analyzers/0001-Eliminate-pre-built-assets-during-source-build-for-r.patch similarity index 93% rename from src/SourceBuild/tarball/patches/roslyn-analyzers/0001-Eliminate-pre-built-assets-during-source-build-for-r.patch rename to src/SourceBuild/patches/roslyn-analyzers/0001-Eliminate-pre-built-assets-during-source-build-for-r.patch index eec487f1b..95f423319 100644 --- a/src/SourceBuild/tarball/patches/roslyn-analyzers/0001-Eliminate-pre-built-assets-during-source-build-for-r.patch +++ b/src/SourceBuild/patches/roslyn-analyzers/0001-Eliminate-pre-built-assets-during-source-build-for-r.patch @@ -31,7 +31,8 @@ Backport: https://github.com/dotnet/source-build/issues/3049 .../GenerateDocumentationAndConfigFiles.csproj | 1 - ...umentationAndConfigFilesForBrokenRuntime.csproj | 4 +--- src/Tools/ReleaseNotesUtil/ReleaseNotesUtil.csproj | 1 + - 14 files changed, 10 insertions(+), 29 deletions(-) + .../Runtime/UseExceptionThrowHelpersFixer.cs | 2 +- + 15 files changed, 11 insertions(+), 30 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index a467fb579..acd5db8bc 100644 @@ -225,3 +226,16 @@ index fe90e93ca..01b64e055 100644 +diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/UseExceptionThrowHelpersFixer.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/UseExceptionThrowHelpersFixer.cs +index 82a3e986c..336bd2a52 100644 +--- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/UseExceptionThrowHelpersFixer.cs ++++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/UseExceptionThrowHelpersFixer.cs +@@ -121,7 +121,7 @@ public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context) + other is not null ? new SyntaxNode[] { arg, other } : new SyntaxNode[] { arg })).WithTriviaFrom(node)); + } + +- private sealed class CustomFixAllProvider : DocumentBasedFixAllProvider ++ private sealed class CustomFixAllProvider : Analyzer.Utilities.DocumentBasedFixAllProvider + { + public static readonly CustomFixAllProvider Instance = new(); + diff --git a/src/SourceBuild/tarball/BuildSourceBuildTarball.proj b/src/SourceBuild/tarball/BuildSourceBuildTarball.proj deleted file mode 100644 index 7b5becb77..000000000 --- a/src/SourceBuild/tarball/BuildSourceBuildTarball.proj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - $(ArtifactsShippingPackagesDir)dotnet-sdk-source-$(Version).tar.gz - - - - - diff --git a/src/SourceBuild/tarball/content/eng/Versions.props b/src/SourceBuild/tarball/content/eng/Versions.props deleted file mode 100644 index df7b892f6..000000000 --- a/src/SourceBuild/tarball/content/eng/Versions.props +++ /dev/null @@ -1,12 +0,0 @@ - - - - - 0.1.0 - alpha.1 - - - - 2.2.0 - - diff --git a/src/SourceBuild/tarball/patches/runtime/0002-Remove-llvm-ObjWriter-dependency-in-source-build.patch b/src/SourceBuild/tarball/patches/runtime/0002-Remove-llvm-ObjWriter-dependency-in-source-build.patch deleted file mode 100644 index 02e49eec9..000000000 --- a/src/SourceBuild/tarball/patches/runtime/0002-Remove-llvm-ObjWriter-dependency-in-source-build.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Chris Rummel -Date: Mon, 26 Sep 2022 14:25:33 -0500 -Subject: Remove LLVM ObjWriter dependency in source-build - -Backport PR: https://github.com/dotnet/runtime/pull/76206. - ---- - src/coreclr/tools/aot/ILCompiler/ILCompiler.props | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompiler.props b/src/coreclr/tools/aot/ILCompiler/ILCompiler.props -index 8c4fce523906e..4fd1db03e8a48 100644 ---- a/src/coreclr/tools/aot/ILCompiler/ILCompiler.props -+++ b/src/coreclr/tools/aot/ILCompiler/ILCompiler.props -@@ -48,12 +48,14 @@ - - - true -+ -+ true - - - - - -- -+ - $(ObjWriterVersion) - - -@@ -62,7 +64,7 @@ - $(NetStandardLibraryVersion) - - -- -+ - PreserveNewest - false - false diff --git a/src/VirtualMonoRepo/InitializeVMR.proj b/src/VirtualMonoRepo/InitializeVMR.proj index df78ccce6..b534c897a 100644 --- a/src/VirtualMonoRepo/InitializeVMR.proj +++ b/src/VirtualMonoRepo/InitializeVMR.proj @@ -13,8 +13,6 @@ true - - $(TarballGitInfoDir) @@ -30,12 +28,8 @@ Instead of cloning the repositories, we pull the sources via the `darc vmr initialize` command. Most of the targets are reused from the tarball generation process (SourceBuildArcadeTarball.targets). --> - + @@ -52,38 +46,31 @@ - - - - $([System.IO.Path]::GetFileName("$(RepoRoot.TrimEnd('/').TrimEnd('\\'))")) - - - - + + + - + + $([System.IO.Path]::GetFileName("$(RepoRoot.TrimEnd('/').TrimEnd('\\'))")) + @(RootRepoCommitSha) + + + - - - - - - diff --git a/src/VirtualMonoRepo/Tasks/GitFileManagerFactory.cs b/src/VirtualMonoRepo/Tasks/GitFileManagerFactory.cs new file mode 100644 index 000000000..2da3d540b --- /dev/null +++ b/src/VirtualMonoRepo/Tasks/GitFileManagerFactory.cs @@ -0,0 +1,52 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using Microsoft.DotNet.DarcLib; +using Microsoft.DotNet.DarcLib.Helpers; +using Microsoft.DotNet.DarcLib.VirtualMonoRepo; +using Microsoft.Extensions.Logging; + +namespace Microsoft.DotNet.VirtualMonoRepo.Tasks; + +public class GitFileManagerFactory : IGitFileManagerFactory +{ + private readonly IVmrInfo _vmrInfo; + private readonly VmrRemoteConfiguration _remoteConfiguration; + private readonly IProcessManager _processManager; + private readonly IVersionDetailsParser _versionDetailsParser; + private readonly ILoggerFactory _loggerFactory; + + public GitFileManagerFactory( + IVmrInfo vmrInfo, + VmrRemoteConfiguration remoteConfiguration, + IProcessManager processManager, + IVersionDetailsParser versionDetailsParser, + ILoggerFactory loggerFactory) + { + _vmrInfo = vmrInfo; + _remoteConfiguration = remoteConfiguration; + _processManager = processManager; + _versionDetailsParser = versionDetailsParser; + _loggerFactory = loggerFactory; + } + + public IGitFileManager Create(string repoUri) + => new GitFileManager(CreateGitRepo(repoUri), _versionDetailsParser, _loggerFactory.CreateLogger()); + + private IGitRepo CreateGitRepo(string repoUri) => GitRepoTypeParser.ParseFromUri(repoUri) switch + { + GitRepoType.AzureDevOps => throw new Exception("VMR initialization should not require Azure DevOps repositories"), + + GitRepoType.GitHub => new GitHubClient( + _processManager.GitExecutable, + _remoteConfiguration.GitHubToken, + _loggerFactory.CreateLogger(), + _vmrInfo.TmpPath, + // Caching not in use for Darc local client. + null), + + GitRepoType.Local => new LocalGitClient(_processManager.GitExecutable, _loggerFactory.CreateLogger()), + _ => throw new ArgumentException("Unknown git repository type", nameof(repoUri)), + }; +} diff --git a/src/VirtualMonoRepo/Tasks/RemoteFactory.cs b/src/VirtualMonoRepo/Tasks/RemoteFactory.cs deleted file mode 100644 index 24d8914f3..000000000 --- a/src/VirtualMonoRepo/Tasks/RemoteFactory.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; -using System.Threading.Tasks; -using Microsoft.DotNet.DarcLib; -using Microsoft.DotNet.DarcLib.Helpers; -using Microsoft.Extensions.Logging; - -namespace Microsoft.DotNet.VirtualMonoRepo.Tasks; - -internal class RemoteFactory : IRemoteFactory -{ - private readonly IProcessManager _processManager; - private readonly IVersionDetailsParser _versionDetailsParser; - private readonly string _tmpPath; - - public RemoteFactory(IProcessManager processManager, IVersionDetailsParser versionDetailsParser, string tmpPath) - { - _processManager = processManager; - _versionDetailsParser = versionDetailsParser; - _tmpPath = tmpPath; - } - - public Task GetBarOnlyRemoteAsync(ILogger logger) - { - throw new NotImplementedException(); - } - - public Task GetRemoteAsync(string repoUrl, ILogger logger) - { - var githubClient = new DarcLib.GitHubClient( - _processManager.GitExecutable, - accessToken: null, - logger, - _tmpPath, - cache: null); - - IRemote remote = new Remote(githubClient, barClient: null, _versionDetailsParser, logger); - return Task.FromResult(remote); - } -} diff --git a/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs b/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs index 7a28720d9..307ee8ecc 100644 --- a/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs +++ b/src/VirtualMonoRepo/Tasks/VirtualMonoRepo_Initialize.cs @@ -7,8 +7,6 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using Microsoft.Build.Framework; -using Microsoft.DotNet.DarcLib; -using Microsoft.DotNet.DarcLib.Helpers; using Microsoft.DotNet.DarcLib.VirtualMonoRepo; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -61,7 +59,7 @@ public class VirtualMonoRepo_Initialize : Build.Utilities.Task, ICancelableTask private IServiceProvider CreateServiceProvider() => new ServiceCollection() .AddLogging(b => b.AddConsole().AddFilter(l => l >= LogLevel.Information)) - .AddSingleton(sp => ActivatorUtilities.CreateInstance(sp, TmpPath)) - .AddVmrManagers("git", sp => new VmrInfo(VmrPath, TmpPath)) + .AddTransient() + .AddVmrManagers(sp => sp.GetRequiredService(), "git", VmrPath, TmpPath, null, null) .BuildServiceProvider(); } diff --git a/src/VirtualMonoRepo/source-mappings.json b/src/VirtualMonoRepo/source-mappings.json index f267114aa..6f81eabc2 100644 --- a/src/VirtualMonoRepo/source-mappings.json +++ b/src/VirtualMonoRepo/source-mappings.json @@ -10,10 +10,20 @@ { // Location within the VMR where the source-build patches are stored // These patches are applied on top of the code synchronized into the VMR - "patchesPath": "src/installer/src/SourceBuild/tarball/patches", + "patchesPath": "src/installer/src/SourceBuild/patches", - // Files on this path are synchronized with files in the root of the VMR - "contentPath": "src/installer/src/SourceBuild/tarball/content", + // Some files are copied outside of the src/ directory into other locations + // When files in the source paths are changed, they are automatically synchronized too + "additionalMappings": [ + { + "source": "src/installer/src/SourceBuild/content", + "destination": "" + }, + { + "source": "src/installer/eng/common", + "destination": "eng/common" + } + ], // These defaults are added to all mappings unless `ignoreDefaults: true` is specified // When no "include" filter is specified, "**/*" is used @@ -72,7 +82,7 @@ "defaultRemote": "https://github.com/dotnet/installer", "exclude": [ // We don't need the tarball content in the VMR again, it's already copied in the root - "src/SourceBuild/tarball/content/**/*" + "src/SourceBuild/content/**/*" ] }, { @@ -95,8 +105,8 @@ "defaultRef": "dev" }, { - "name": "razor-compiler", - "defaultRemote": "https://github.com/dotnet/razor-compiler" + "name": "razor", + "defaultRemote": "https://github.com/dotnet/razor" }, { "name": "roslyn", diff --git a/src/finalizer/finalizer.cpp b/src/finalizer/finalizer.cpp index c8f5eca6b..d68418b9b 100644 --- a/src/finalizer/finalizer.cpp +++ b/src/finalizer/finalizer.cpp @@ -447,7 +447,17 @@ extern "C" HRESULT DetectSdk(LPWSTR sczSdkFeatureBandVersion, LPWSTR sczArchitec LogStringLine(REPORT_STANDARD, "Scanning %ls", sczInstalledSdkVersionsKeyName); hr = RegOpen(HKEY_LOCAL_MACHINE, sczInstalledSdkVersionsKeyName, KEY_READ, &hkInstalledSdkVersionsKey); - ExitOnFailure(hr, "Failed to read installed versions key."); + + // When the last SDK is removed the registry key should no longer exist so we can just exit + if (E_FILENOTFOUND == hr) + { + LogStringLine(REPORT_STANDARD, "Registry key not found: %ls.", sczInstalledSdkVersionsKeyName); + hr = S_OK; + *pbInstalled = FALSE; + goto LExit; + } + + ExitOnFailure(hr, "Failed to open registry key: %ls.", sczInstalledSdkVersionsKeyName); for (DWORD dwSdkVersionsValueIndex = 0;; ++dwSdkVersionsValueIndex) { @@ -509,9 +519,10 @@ int wmain(int argc, wchar_t* argv[]) hr = ::DetectSdk(sczFeatureBandVersion, argv[3], &bSdkFeatureBandInstalled); ExitOnFailure(hr, "Failed to detect installed SDKs."); - if (!bSdkFeatureBandInstalled) + // If the feature band is still present, do not remove workloads. + if (bSdkFeatureBandInstalled) { - LogStringLine(REPORT_STANDARD, "SDK with feature band %ls could not be found.", sczFeatureBandVersion); + LogStringLine(REPORT_STANDARD, "Detected SDK with feature band %ls.", sczFeatureBandVersion); goto LExit; } diff --git a/src/redist/targets/BundledTemplates.targets b/src/redist/targets/BundledTemplates.targets index 3646546f8..a66265ed3 100644 --- a/src/redist/targets/BundledTemplates.targets +++ b/src/redist/targets/BundledTemplates.targets @@ -22,6 +22,7 @@ + @@ -30,10 +31,6 @@ - - - - diff --git a/src/redist/targets/Crossgen.targets b/src/redist/targets/Crossgen.targets index 6d2137a4e..9f4da5dc4 100644 --- a/src/redist/targets/Crossgen.targets +++ b/src/redist/targets/Crossgen.targets @@ -1,7 +1,7 @@ @@ -29,7 +29,27 @@ BuildInParallel="False" Projects="@(CrossGenDownloadPackageProject)"> - + + + + net8.0 + + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\NuGet.Build.Tasks.Pack\CoreCLR\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.ILLink.Tasks\tools\net7.0\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Publish\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Web.ProjectSystem\tools\$(DefaultToolTfm)\ + $(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Worker\tools\$(DefaultToolTfm)\ + + @@ -49,16 +69,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -121,6 +141,21 @@ false + + + + + + + + + + + + + + + + + + + + + + @@ -61,9 +68,10 @@ 30 - 30 + 31 17 - 10 + 11 + 0 @@ -76,13 +84,13 @@ <_NETStandardLibraryPackageVersion>$(NETStandardLibraryRefPackageVersion) <_NETCorePlatformsPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion) - - <_NET70RuntimePackVersion>7.0.0-rc.1.22426.10 - <_NET70TargetingPackVersion>7.0.0-rc.1.22426.10 - <_WindowsDesktop70RuntimePackVersion>7.0.0-rc.1.22427.1 - <_WindowsDesktop70TargetingPackVersion>7.0.0-rc.1.22427.1 - <_AspNet70RuntimePackVersion>7.0.0-rc.1.22427.2 - <_AspNet70TargetingPackVersion>7.0.0-rc.1.22427.2 + <_NET70RuntimePackVersion>7.0.$(VersionFeature70) + <_NET70TargetingPackVersion>7.0.$(VersionFeature70) + <_NET70ILLinkPackVersion>7.0.100-1.22579.2 + <_WindowsDesktop70RuntimePackVersion>7.0.$(VersionFeature70) + <_WindowsDesktop70TargetingPackVersion>7.0.$(VersionFeature70) + <_AspNet70RuntimePackVersion>7.0.$(VersionFeature70) + <_AspNet70TargetingPackVersion>7.0.$(VersionFeature70) <_NET60RuntimePackVersion>6.0.$(VersionFeature60) <_NET60TargetingPackVersion>6.0.$(VersionFeature60) @@ -401,6 +409,10 @@ Copyright (c) .NET Foundation. All rights reserved. ILCompilerRuntimeIdentifiers="@(ILCompilerSupportedRids, '%3B')" /> + + + + + + + + + + + + osx freebsd linux - + + $(Rid.Substring(0, $(Rid.LastIndexOf('-')))) $(HostOSName) - $(OSName)-$(Architecture) + $(OSName) + + $(OSName)-$(Architecture) + + $(PortableOSName)-$(Architecture) @@ -24,12 +29,9 @@ - $(Rid) - $(OSName)-$(Architecture) + $(Rid) - $(HostOSName)-$(Architecture) + $(PortableRid) dotnet-sdk-internal$(PgoTerm) dotnet-sdk$(PgoTerm) diff --git a/src/redist/targets/packaging/deb/postinst b/src/redist/targets/packaging/deb/postinst index 615c17e6b..696ec8acc 100644 --- a/src/redist/targets/packaging/deb/postinst +++ b/src/redist/targets/packaging/deb/postinst @@ -4,6 +4,5 @@ first_run() { /usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "debianpackage" > /dev/null 2>&1 || true } -INSTALL_TEMP_HOME=/tmp/dotnet-installer -[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME +INSTALL_TEMP_HOME=$(mktemp -d) # mktemp should set 700 perm automatically HOME=$INSTALL_TEMP_HOME first_run diff --git a/src/redist/targets/packaging/osx/clisdk/scripts/postinstall b/src/redist/targets/packaging/osx/clisdk/scripts/postinstall index 28339be99..86710223d 100644 --- a/src/redist/targets/packaging/osx/clisdk/scripts/postinstall +++ b/src/redist/targets/packaging/osx/clisdk/scripts/postinstall @@ -12,7 +12,7 @@ first_run() { $INSTALL_DESTINATION/dotnet exec $INSTALL_DESTINATION/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "$1" > /dev/null 2>&1 || true } -[ -d $INSTALL_TEMP_HOME ] || mkdir $INSTALL_TEMP_HOME +INSTALL_TEMP_HOME=$(mktemp -d) # mktemp should set 700 perm automatically HOME=$INSTALL_TEMP_HOME first_run exit 0 diff --git a/src/redist/targets/packaging/windows/clisdk/bundle.wxs b/src/redist/targets/packaging/windows/clisdk/bundle.wxs index 346e66d75..bac843303 100644 --- a/src/redist/targets/packaging/windows/clisdk/bundle.wxs +++ b/src/redist/targets/packaging/windows/clisdk/bundle.wxs @@ -151,7 +151,31 @@ - + + + + + @@ -208,20 +232,7 @@ - - + diff --git a/test/EndToEnd/EndToEnd.Tests.csproj b/test/EndToEnd/EndToEnd.Tests.csproj index 56776d61d..278ac08fd 100644 --- a/test/EndToEnd/EndToEnd.Tests.csproj +++ b/test/EndToEnd/EndToEnd.Tests.csproj @@ -1,6 +1,7 @@  $(CoreSdkTargetFramework) + $(DefineConstants);LINUX_PORTABLE diff --git a/test/EndToEnd/GivenFrameworkDependentApps.cs b/test/EndToEnd/GivenFrameworkDependentApps.cs index 13cafcf7a..0d30abdac 100644 --- a/test/EndToEnd/GivenFrameworkDependentApps.cs +++ b/test/EndToEnd/GivenFrameworkDependentApps.cs @@ -47,39 +47,44 @@ namespace EndToEnd internal void ItDoesNotRollForwardToTheLatestVersion(string packageName, string minorVersion) { - var testProjectCreator = new TestProjectCreator() - { - PackageName = packageName, - MinorVersion = minorVersion, - }; - - var _testInstance = testProjectCreator.Create(); - - string projectDirectory = _testInstance.Root.FullName; - - string projectPath = Path.Combine(projectDirectory, "TestAppSimple.csproj"); - - // Get the resolved version of .NET Core - new RestoreCommand() - .WithWorkingDirectory(projectDirectory) - .Execute() - .Should().Pass(); - - string assetsFilePath = Path.Combine(projectDirectory, "obj", "project.assets.json"); - var assetsFile = new LockFileFormat().Read(assetsFilePath); - - var versionInAssertsJson = GetPackageVersion(assetsFile, packageName); - versionInAssertsJson.Should().NotBeNull(); - - if (versionInAssertsJson.IsPrerelease && versionInAssertsJson.Patch == 0) - { - // if the bundled version is, for example, a prerelease of - // .NET Core 2.1.1, that we don't roll forward to that prerelease - // version for framework-dependent deployments. + // https://github.com/NuGet/Home/issues/8571 + #if LINUX_PORTABLE return; - } + #else + var testProjectCreator = new TestProjectCreator() + { + PackageName = packageName, + MinorVersion = minorVersion, + }; - versionInAssertsJson.ToNormalizedString().Should().BeEquivalentTo(GetExpectedVersion(packageName, minorVersion)); + var _testInstance = testProjectCreator.Create(); + + string projectDirectory = _testInstance.Root.FullName; + + string projectPath = Path.Combine(projectDirectory, "TestAppSimple.csproj"); + + // Get the resolved version of .NET Core + new RestoreCommand() + .WithWorkingDirectory(projectDirectory) + .Execute() + .Should().Pass(); + + string assetsFilePath = Path.Combine(projectDirectory, "obj", "project.assets.json"); + var assetsFile = new LockFileFormat().Read(assetsFilePath); + + var versionInAssertsJson = GetPackageVersion(assetsFile, packageName); + versionInAssertsJson.Should().NotBeNull(); + + if (versionInAssertsJson.IsPrerelease && versionInAssertsJson.Patch == 0) + { + // if the bundled version is, for example, a prerelease of + // .NET Core 2.1.1, that we don't roll forward to that prerelease + // version for framework-dependent deployments. + return; + } + + versionInAssertsJson.ToNormalizedString().Should().BeEquivalentTo(GetExpectedVersion(packageName, minorVersion)); + #endif } private static NuGetVersion GetPackageVersion(LockFile lockFile, string packageName) diff --git a/test/EndToEnd/ProjectBuildTests.cs b/test/EndToEnd/ProjectBuildTests.cs index 0678fb440..7a643ff47 100644 --- a/test/EndToEnd/ProjectBuildTests.cs +++ b/test/EndToEnd/ProjectBuildTests.cs @@ -15,27 +15,18 @@ namespace EndToEnd.Tests { public class ProjectBuildTests : TestBase { - private static readonly string currentTfm = "net8.0"; - [Fact] public void ItCanNewRestoreBuildRunCleanMSBuildProject() { var directory = TestAssets.CreateTestDirectory(); string projectDirectory = directory.FullName; - string newArgs = "console --debug:ephemeral-hive --no-restore"; + string newArgs = "console --no-restore"; new NewCommandShim() .WithWorkingDirectory(projectDirectory) .Execute(newArgs) .Should().Pass(); - string projectPath = Path.Combine(projectDirectory, directory.Name + ".csproj"); - var project = XDocument.Load(projectPath); - var ns = project.Root.Name.Namespace; - project.Root.Element(ns + "PropertyGroup") - .Element(ns + "TargetFramework").Value = currentTfm; - project.Save(projectPath); - new RestoreCommand() .WithWorkingDirectory(projectDirectory) .Execute() @@ -68,7 +59,7 @@ namespace EndToEnd.Tests var directory = TestAssets.CreateTestDirectory(); string projectDirectory = directory.FullName; - string newArgs = "console --debug:ephemeral-hive --no-restore"; + string newArgs = "console --no-restore"; new NewCommandShim() .WithWorkingDirectory(projectDirectory) .Execute(newArgs) @@ -80,9 +71,6 @@ namespace EndToEnd.Tests var ns = project.Root.Name.Namespace; project.Root.Attribute("Sdk").Value = "Microsoft.NET.Sdk.Web"; - project.Root.Element(ns + "PropertyGroup") - .Element(ns + "TargetFramework").Value = currentTfm; - project.Save(projectPath); new BuildCommand() @@ -236,7 +224,7 @@ namespace EndToEnd.Tests DirectoryInfo directory = TestAssets.CreateTestDirectory(identifier: templateName); string projectDirectory = directory.FullName; - string newArgs = $"{templateName} --debug:ephemeral-hive"; + string newArgs = $"{templateName}"; new NewCommandShim() .WithWorkingDirectory(projectDirectory) @@ -246,6 +234,12 @@ namespace EndToEnd.Tests //check if the template created files Assert.True(directory.Exists); Assert.True(directory.EnumerateFileSystemInfos().Any()); + + // delete test directory for some tests so we aren't leaving behind non-compliant nuget files + if (templateName.Equals("nugetconfig")) + { + directory.Delete(true); + } } [WindowsOnlyTheory] @@ -329,7 +323,7 @@ namespace EndToEnd.Tests public void ItCanCreateTemplateWithDefaultFramework(string templateName) { string framework = DetectExpectedDefaultFramework(templateName); - TestTemplateCreateAndBuild(templateName, build: false, framework: framework); + TestTemplateCreateAndBuild(templateName, build: false, framework: framework, deleteTestDirectory: true); } /// @@ -397,8 +391,6 @@ namespace EndToEnd.Tests // Return net7.0 for templates that don't support // net8.0 yet. if (template.StartsWith("blazor") - || template.StartsWith("classlib") - || template.StartsWith("console") || template.StartsWith("mvc") || template.StartsWith("web") || template.StartsWith("worker") @@ -415,12 +407,12 @@ namespace EndToEnd.Tests throw new Exception("Unsupported version of SDK"); } - private static void TestTemplateCreateAndBuild(string templateName, bool build = true, bool selfContained = false, string language = "", string framework = "") + private static void TestTemplateCreateAndBuild(string templateName, bool build = true, bool selfContained = false, string language = "", string framework = "", bool deleteTestDirectory = false) { DirectoryInfo directory = TestAssets.CreateTestDirectory(identifier: string.IsNullOrWhiteSpace(language) ? templateName : $"{templateName}[{language}]"); string projectDirectory = directory.FullName; - string newArgs = $"{templateName} --debug:ephemeral-hive --no-restore"; + string newArgs = $"{templateName} --no-restore"; if (!string.IsNullOrWhiteSpace(language)) { newArgs += $" --language {language}"; @@ -468,6 +460,12 @@ namespace EndToEnd.Tests .Execute(buildArgs) .Should().Pass(); } + + // delete test directory for some tests so we aren't leaving behind non-compliant package files + if (deleteTestDirectory) + { + directory.Delete(true); + } } } } diff --git a/test/EndToEnd/TelemetryOptOutDefaultTests.cs b/test/EndToEnd/TelemetryOptOutDefaultTests.cs new file mode 100644 index 000000000..1e2d2ecef --- /dev/null +++ b/test/EndToEnd/TelemetryOptOutDefaultTests.cs @@ -0,0 +1,24 @@ +using System.IO; +using FluentAssertions; +using Microsoft.DotNet.Tools.Test.Utilities; +using Xunit; + +namespace EndToEnd.Tests +{ + public class TelemetryOptOutDefault : TestBase + { + [Fact] + public void TelemetryOptOutDefaultAttribute() + { + var versionCommand = new DotnetCommand() + .ExecuteWithCapturedOutput("--version"); + + var sdkVersion = versionCommand.StdOut.Trim(); + + var dotnetdir = Path.Combine(Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest), "sdk", sdkVersion); + + var result = AssemblyInfo.Get(Path.Combine(dotnetdir, "dotnet.dll"), "AssemblyMetadataAttribute"); + result.Should().Contain("TelemetryOptOutDefault:False"); + } + } +} diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/AssemblyInfo.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/AssemblyInfo.cs new file mode 100644 index 000000000..f02cfbeb3 --- /dev/null +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/AssemblyInfo.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection.Metadata; +using System.Reflection.PortableExecutable; +using System.Text; + +namespace Microsoft.DotNet.Tools.Test.Utilities +{ + public static class AssemblyInfo + { + public static IList Get(string assemblyPath, string assemblyInfoName) + { + var list = new List(); + + using (var stream = File.OpenRead(assemblyPath)) + using (var peReader = new PEReader(stream)) + { + var metadataReader = peReader.GetMetadataReader(); + var assemblyDefinition = metadataReader.GetAssemblyDefinition(); + + foreach (var handle in assemblyDefinition.GetCustomAttributes()) + { + var attribute = metadataReader.GetCustomAttribute(handle); + var constructor = metadataReader.GetMemberReference((MemberReferenceHandle)attribute.Constructor); + var type = metadataReader.GetTypeReference((TypeReferenceHandle)constructor.Parent); + var name = metadataReader.GetString(type.Name); + + if (name.Equals(assemblyInfoName)) + { + var signature = metadataReader.GetBlobReader(constructor.Signature); + var value = metadataReader.GetBlobReader(attribute.Value); + var header = signature.ReadSignatureHeader(); + + const ushort prolog = 1; // two-byte "prolog" defined by ECMA-335 (II.23.3) to be at the beginning of attribute value blobs + if (value.ReadUInt16() != prolog || header.Kind != SignatureKind.Method || header.IsGeneric) + { + throw new BadImageFormatException(); + } + + var paramCount = signature.ReadCompressedInteger(); + if (paramCount <= 0 || // must have at least 1 parameter + signature.ReadSignatureTypeCode() != SignatureTypeCode.Void) // return type must be void + { + continue; + } + + var sb = new StringBuilder(); + while (paramCount > 0 && sb != null) + { + switch (signature.ReadSignatureTypeCode()) + { + case SignatureTypeCode.String: + sb.Append(value.ReadSerializedString()); + break; + default: + sb = null; + break; + } + + paramCount--; + if (paramCount != 0) + { + sb?.Append(':'); + } + } + + if (sb != null) + { + list.Add(sb.ToString()); + } + } + } + } + return list; + } + } +} diff --git a/test/SdkTests/SdkTests.csproj b/test/SdkTests/SdkTests.csproj index 40cb6f5e4..769da7f5f 100644 --- a/test/SdkTests/SdkTests.csproj +++ b/test/SdkTests/SdkTests.csproj @@ -63,7 +63,7 @@ - + diff --git a/tools/sdk-readme-table-generator/TableGenerator.Tests/TableGenerator.Tests.fsproj b/tools/sdk-readme-table-generator/TableGenerator.Tests/TableGenerator.Tests.fsproj index fc35c3646..2234374c1 100644 --- a/tools/sdk-readme-table-generator/TableGenerator.Tests/TableGenerator.Tests.fsproj +++ b/tools/sdk-readme-table-generator/TableGenerator.Tests/TableGenerator.Tests.fsproj @@ -1,6 +1,6 @@  - netcoreapp6.0 + net6.0 @@ -14,4 +14,4 @@ - \ No newline at end of file + diff --git a/tools/sdk-readme-table-generator/TableGenerator/Program.fs b/tools/sdk-readme-table-generator/TableGenerator/Program.fs index 5398c1f82..c9a721aa2 100644 --- a/tools/sdk-readme-table-generator/TableGenerator/Program.fs +++ b/tools/sdk-readme-table-generator/TableGenerator/Program.fs @@ -11,10 +11,7 @@ let inputBranches = AkaMsChannel = Some("8.0.1xx/daily") } { GitBranchName = "release/7.0.2xx" DisplayName = "Release/7.0.2xx
(7.0.x Runtime)" - AkaMsChannel = Some("7.0.2xx/daily") } - { GitBranchName = "release/7.0.1xx" - DisplayName = "Release/7.0.1xx
(7.0.x Runtime)" - AkaMsChannel = Some("7.0.1xx/daily") }] + AkaMsChannel = Some("7.0.2xx/daily") }] let referentNotes = """Reference notes: diff --git a/tools/sdk-readme-table-generator/TableGenerator/TableGenerator.fsproj b/tools/sdk-readme-table-generator/TableGenerator/TableGenerator.fsproj index d64c91c15..6564d2f11 100644 --- a/tools/sdk-readme-table-generator/TableGenerator/TableGenerator.fsproj +++ b/tools/sdk-readme-table-generator/TableGenerator/TableGenerator.fsproj @@ -2,7 +2,7 @@ Exe - netcoreapp6.0 + net6.0