From b25e8e020b713cd09415eb284951851ed0ee1f89 Mon Sep 17 00:00:00 2001 From: "Kevin Ransom (msft)" Date: Wed, 20 Mar 2024 09:45:31 -0700 Subject: [PATCH] Update Microsoft.Build dependency for Dev17.5 (#16897) * Nuget.config * -PR.yaml, + update microsoft.build package version * update pipelines * update perl version * Nuget cache hash --- NuGet.config | 4 + azure-pipelines-PR.yml | 776 ++++++++++++++++++ azure-pipelines.yml | 6 + eng/Versions.props | 4 +- global.json | 2 +- .../core/printing/output.1000.stdout.bsl | 2 +- .../core/printing/output.200.stdout.bsl | 2 +- .../core/printing/output.multiemit.stdout.bsl | 2 +- .../core/printing/output.off.stdout.bsl | 2 +- tests/fsharp/core/printing/output.stdout.bsl | 2 +- 10 files changed, 794 insertions(+), 8 deletions(-) create mode 100644 azure-pipelines-PR.yml diff --git a/NuGet.config b/NuGet.config index 5b0a8ef0a09..f891305e99a 100644 --- a/NuGet.config +++ b/NuGet.config @@ -13,8 +13,12 @@ + + + + diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml new file mode 100644 index 00000000000..5138b7d3c59 --- /dev/null +++ b/azure-pipelines-PR.yml @@ -0,0 +1,776 @@ +# CI and PR triggers +trigger: + branches: + include: + - main + - dev16.1 + - feature/* + - release/* + paths: + include: + - '*' + exclude: + - .github/* + - docs/ + - .vscode/* + - .devcontainer/* + - tests/scripts/ + - attributions.md + - CODE_OF_CONDUCT.md + - DEVGUIDE.md + - INTERNAL.md + - Language-Version-History.md + - License.txt + - README.md + - release-notes.md + - TESTGUIDE.md + +pr: + branches: + include: + - main + - dev16.1 + - feature/* + - release/* + paths: + include: + - '*' + exclude: + - .github/* + - docs/ + - attributions.md + - CODE_OF_CONDUCT.md + - DEVGUIDE.md + - INTERNAL.md + - Language-Version-History.md + - License.txt + - README.md + - release-notes.md + - TESTGUIDE.md + +variables: + - name: _TeamName + value: FSharp + - name: _BuildConfig + value: Release + - name: _PublishUsingPipelines + value: true + - name: _DotNetArtifactsCategory + value: .NETCore + - name: VisualStudioDropName + value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber) + - name: Codeql.Enabled + value: true + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - name: _DotNetValidationArtifactsCategory + value: .NETCoreValidation + - group: DotNet-FSharp-SDLValidation-Params + - ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}: + - name: RunningAsPullRequest + value: true + # Pick up pool provider name behavior from shared yaml template + - template: /eng/common/templates/variables/pool-providers.yml + +# Variables defined in yml cannot be overridden at queue time; instead overridable variables must be defined in the web UI. +# Commenting out until something like this is supported: https://github.com/Microsoft/azure-pipelines-yaml/pull/129 +#variables: +#- name: SkipTests +# defaultValue: false + +stages: +- stage: build + displayName: Build + jobs: + + #-------------------------------------------------------------------------------------------------------------------# + # Signed build # + #-------------------------------------------------------------------------------------------------------------------# + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.5') }}: + - template: /eng/common/templates/job/onelocbuild.yml + parameters: + MirrorRepo: fsharp + MirrorBranch: release/dev17.5 + LclSource: lclFilesfromPackage + LclPackageId: 'LCL-JUNO-PROD-FSHARP' + - template: /eng/common/templates/jobs/jobs.yml + parameters: + enableMicrobuild: true + enablePublishBuildArtifacts: true + enablePublishTestResults: false + enablePublishBuildAssets: true + enablePublishUsingPipelines: $(_PublishUsingPipelines) + enableSourceBuild: true + enableTelemetry: true + helixRepo: dotnet/fsharp + jobs: + - job: Full_Signed + pool: + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals windows.vs2022.amd64 + timeoutInMinutes: 300 + variables: + - group: DotNet-Blob-Feed + - group: DotNet-Symbol-Server-Pats + - group: DotNet-DevDiv-Insertion-Workflow-Variables + - name: _SignType + value: Real + - name: _DotNetPublishToBlobFeed + value: true + steps: + - checkout: self + clean: true + - template: /eng/restore-internal-tools.yml + - script: eng\CIBuild.cmd + -configuration $(_BuildConfig) + -prepareMachine + -testAll + -officialSkipTests $(SkipTests) + /p:SignType=$(_SignType) + /p:DotNetSignType=$(_SignType) + /p:MicroBuild_SigningEnabled=true + /p:OverridePackageSource=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + /p:TeamName=$(_TeamName) + /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) + /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + /p:DotNetPublishToBlobFeed=true + /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) + /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) + /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) + /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) + /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + /p:PublishToSymbolServer=true + /p:VisualStudioDropName=$(VisualStudioDropName) + /p:GenerateSbom=true + env: + NativeToolsOnMachine: true + - script: .\tests\EndToEndBuildTests\EndToEndBuildTests.cmd -c $(_BuildConfig) + displayName: End to end build tests + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + continueOnError: true + condition: ne(variables['SkipTests'], 'true') + - task: PublishBuildArtifacts@1 + displayName: Publish Test Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_BuildConfig)' + ArtifactName: 'Test Logs' + publishLocation: Container + continueOnError: true + condition: ne(variables['SkipTests'], 'true') + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Packages + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\packages\$(_BuildConfig)' + ArtifactName: 'Packages' + condition: succeeded() + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact VSSetup + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\Insertion' + ArtifactName: 'VSSetup' + condition: succeeded() + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Nightly + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\VisualFSharpDebug.vsix' + ArtifactName: 'Nightly' + condition: succeeded() + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact Symbols + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\SymStore\$(_BuildConfig)' + ArtifactName: 'NativeSymbols' + condition: succeeded() + - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1 + displayName: Upload VSTS Drop + inputs: + DropName: $(VisualStudioDropName) + DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(_BuildConfig)\Insertion' + AccessToken: $(dn-bot-devdiv-drop-rw-code-rw) + condition: succeeded() + + #-------------------------------------------------------------------------------------------------------------------# + # PR builds without logs publishing # + #-------------------------------------------------------------------------------------------------------------------# + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/jobs/jobs.yml + parameters: + enableMicrobuild: false + enablePublishBuildArtifacts: false + enablePublishTestResults: false + enablePublishBuildAssets: false + enablePublishUsingPipelines: $(_PublishUsingPipelines) + enableSourceBuild: false + enableTelemetry: true + helixRepo: dotnet/fsharp + jobs: + # Determinism, we want to run it only in PR builds + - job: Determinism_Debug + condition: eq(variables['Build.Reason'], 'PullRequest') + variables: + - name: _SignType + value: Test + pool: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals $(WindowsMachineQueueName) + timeoutInMinutes: 90 + steps: + - checkout: self + clean: true + - task: UseDotNet@2 + displayName: install SDK + inputs: + packageType: sdk + useGlobalJson: true + includePreviewVersions: false + workingDirectory: $(Build.SourcesDirectory) + installationPath: $(Build.SourcesDirectory)/.dotnet + - script: .\eng\test-determinism.cmd -configuration Debug + displayName: Determinism tests with Debug configuration + - task: PublishPipelineArtifact@1 + displayName: Publish Determinism Logs + inputs: + targetPath: '$(Build.SourcesDirectory)/artifacts/log/Debug' + artifactName: 'Determinism_Debug Attempt $(System.JobAttempt) Logs' + continueOnError: true + condition: not(succeeded()) + + # Check code formatting + - job: CheckCodeFormatting + pool: + vmImage: $(UbuntuMachineQueueName) + steps: + - checkout: self + clean: true + - script: dotnet --list-sdks + displayName: Report dotnet SDK versions + - task: UseDotNet@2 + displayName: install SDK + inputs: + packageType: sdk + useGlobalJson: true + includePreviewVersions: true + workingDirectory: $(Build.SourcesDirectory) + installationPath: $(Agent.ToolsDirectory)/dotnet + - script: dotnet tool restore + env: + DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 + displayName: Install tools + - script: dotnet fantomas src -r --check + env: + DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 + displayName: Check code formatting (run 'dotnet fantomas src -r' to fix) + + # Check whether package with current version has been published to nuget.org + # We will try to restore both FSharp.Core and FCS and if restore is _successful_, package version needs to be bumped. + # NOTE: This CI check should only run on the release branches. + - job: Check_Published_Package_Versions + condition: or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), or(startsWith(variables['System.PullRequest.SourceBranch'], 'release/dev'), startsWith(variables['System.PullRequest.TargetBranch'], 'release/dev'))) + pool: + vmImage: $(UbuntuMachineQueueName) + strategy: + maxParallel: 2 + matrix: + FCS: + _project: "FSharp.Compiler.Service_notshipped.fsproj" + FSCore: + _project: "FSharp.Core_notshipped.fsproj" + steps: + - checkout: self + clean: true + - task: UseDotNet@2 + displayName: install SDK + inputs: + packageType: sdk + useGlobalJson: true + includePreviewVersions: true + workingDirectory: $(Build.SourcesDirectory) + installationPath: $(Agent.ToolsDirectory)/dotnet + - pwsh: ./check.ps1 -project $(_project) + workingDirectory: $(Build.SourcesDirectory)/buildtools/checkpackages + env: + DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 + displayName: Check published package version + + + #-------------------------------------------------------------------------------------------------------------------# + # PR builds # + #-------------------------------------------------------------------------------------------------------------------# + - ${{ if eq(variables['System.TeamProject'], 'public') }}: + - template: /eng/common/templates/jobs/jobs.yml + parameters: + enableMicrobuild: true + enablePublishBuildArtifacts: true + enablePublishTestResults: false + enablePublishBuildAssets: true + enablePublishUsingPipelines: $(_PublishUsingPipelines) + enableSourceBuild: true + enableTelemetry: true + helixRepo: dotnet/fsharp + jobs: + + # Windows + - job: Windows + pool: + # The PR build definition sets this variable: + # WindowsMachineQueueName=Windows.vs2022.amd64.open + # and there is an alternate build definition that sets this to a queue that is always scouting the + # next preview of Visual Studio. + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals $(WindowsMachineQueueName) + timeoutInMinutes: 120 + strategy: + maxParallel: 4 + matrix: + desktop_release: + _configuration: Release + _testKind: testDesktop + coreclr_release: + _configuration: Release + _testKind: testCoreclr + fsharpqa_release: + _configuration: Release + _testKind: testFSharpQA + vs_release: + _configuration: Release + _testKind: testVs + steps: + - checkout: self + clean: true + - script: eng\CIBuild.cmd -configuration $(_configuration) -$(_testKind) + env: + NativeToolsOnMachine: true + displayName: Build / Test + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)' + continueOnError: true + condition: ne(variables['_testKind'], 'testFSharpQA') + - task: PublishBuildArtifacts@1 + displayName: Publish Test Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)' + ArtifactName: 'Windows $(_configuration) $(_testKind) test logs' + publishLocation: Container + continueOnError: true + condition: failed() + - script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj + displayName: Dump NuGet cache contents + condition: failed() + - task: PublishBuildArtifacts@1 + displayName: Publish NuGet cache contents + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\NugetPackageRootContents' + ArtifactName: 'NuGetPackageContents Windows $(_testKind)' + publishLocation: Container + continueOnError: true + condition: failed() + + # Windows With Compressed Metadata + - job: WindowsCompressedMetadata + pool: + # The PR build definition sets this variable: + # WindowsMachineQueueName=Windows.vs2022.amd64.open + # and there is an alternate build definition that sets this to a queue that is always scouting the + # next preview of Visual Studio. + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals $(WindowsMachineQueueName) + timeoutInMinutes: 120 + strategy: + maxParallel: 4 + matrix: + desktop_release: + _configuration: Release + _testKind: testDesktop + coreclr_release: + _configuration: Release + _testKind: testCoreclr + fsharpqa_release: + _configuration: Release + _testKind: testFSharpQA + vs_release: + _configuration: Release + _testKind: testVs + steps: + - checkout: self + clean: true + - script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind) + env: + NativeToolsOnMachine: true + displayName: Build / Test + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_configuration)' + continueOnError: true + condition: ne(variables['_testKind'], 'testFSharpQA') + - task: PublishBuildArtifacts@1 + displayName: Publish Test Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults\$(_configuration)' + ArtifactName: 'Windows $(_configuration) $(_testKind) test logs' + publishLocation: Container + continueOnError: true + condition: failed() + - script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj + displayName: Dump NuGet cache contents + condition: failed() + - task: PublishBuildArtifacts@1 + displayName: Publish NuGet cache contents + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\artifacts\NugetPackageRootContents' + ArtifactName: 'NuGetPackageContents Windows $(_testKind)' + publishLocation: Container + continueOnError: true + condition: failed() + + # Mock official build + - job: MockOfficial + pool: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals $(WindowsMachineQueueName) + steps: + - checkout: self + clean: true + - pwsh: .\eng\MockBuild.ps1 + displayName: Build with OfficialBuildId + + # Linux + - job: Linux + pool: + vmImage: $(UbuntuMachineQueueName) + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr + displayName: Build / Test + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + continueOnError: true + condition: always() + - task: PublishBuildArtifacts@1 + displayName: Publish Test Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + ArtifactName: 'Linux $(_BuildConfig) test logs' + publishLocation: Container + continueOnError: true + condition: failed() + - script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj + displayName: Dump NuGet cache contents + condition: failed() + - task: PublishBuildArtifacts@1 + displayName: Publish NuGet cache contents + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/NugetPackageRootContents' + ArtifactName: 'NuGetPackageContents Linux' + publishLocation: Container + continueOnError: true + condition: failed() + + # MacOS + - job: MacOS + pool: + vmImage: macos-11 + variables: + - name: _SignType + value: Test + steps: + - checkout: self + clean: true + - script: ./eng/cibuild.sh --configuration $(_BuildConfig) --testcoreclr + displayName: Build / Test + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'NUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + continueOnError: true + condition: always() + - task: PublishBuildArtifacts@1 + displayName: Publish Test Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + ArtifactName: 'MacOS $(_BuildConfig) test logs' + publishLocation: Container + continueOnError: true + condition: failed() + - script: dotnet build $(Build.SourcesDirectory)/eng/DumpPackageRoot/DumpPackageRoot.csproj + displayName: Dump NuGet cache contents + condition: failed() + - task: PublishBuildArtifacts@1 + displayName: Publish NuGet cache contents + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/NugetPackageRootContents' + ArtifactName: 'NuGetPackageContents Mac' + publishLocation: Container + continueOnError: true + condition: failed() + + # End to end build + - job: EndToEndBuildTests + pool: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals $(WindowsMachineQueueName) + steps: + - checkout: self + clean: true + - script: .\Build.cmd -c Release -pack + - script: .\tests\EndToEndBuildTests\EndToEndBuildTests.cmd -c Release + displayName: End to end build tests + + # Up-to-date - disabled due to it being flaky + #- job: UpToDate_Windows + # pool: + # vmImage: windows-latest + # steps: + # - checkout: self + # clean: true + # - task: PowerShell@2 + # displayName: Run up-to-date build check + # inputs: + # filePath: eng\tests\UpToDate.ps1 + # arguments: -configuration $(_BuildConfig) -ci -binaryLog + + # Run Build with --test:ParallelCheckingWithSignatureFilesOn + - job: ParallelCheckingWithSignatureFiles + condition: eq(variables['Build.Reason'], 'PullRequest') + variables: + - name: _SignType + value: Test + pool: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals $(WindowsMachineQueueName) + timeoutInMinutes: 90 + steps: + - checkout: self + clean: true + - task: UseDotNet@2 + displayName: install SDK + inputs: + packageType: sdk + useGlobalJson: true + includePreviewVersions: false + workingDirectory: $(Build.SourcesDirectory) + installationPath: $(Build.SourcesDirectory)/.dotnet + - script: .\build.cmd -c Release -binaryLog /p:ParallelCheckingWithSignatureFilesOn=true + displayName: ParallelCheckingWithSignatureFiles build with Debug configuration + - task: PublishPipelineArtifact@1 + displayName: Publish ParallelCheckingWithSignatureFiles Logs + inputs: + targetPath: '$(Build.SourcesDirectory)/artifacts/log/Release' + artifactName: 'ParallelCheckingWithSignatureFiles Attempt $(System.JobAttempt) Logs' + continueOnError: true + + # Plain build Windows + - job: Plain_Build_Windows + pool: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals $(WindowsMachineQueueName) + variables: + - name: _BuildConfig + value: Debug + steps: + - checkout: self + clean: true + - script: .\Build.cmd + displayName: Initial build + - script: dotnet --list-sdks + displayName: Report dotnet SDK versions + - task: UseDotNet@2 + displayName: install SDK + inputs: + packageType: sdk + useGlobalJson: true + includePreviewVersions: true + workingDirectory: $(Build.SourcesDirectory) + installationPath: $(Agent.ToolsDirectory)/dotnet + - script: dotnet build .\FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\" + env: + DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 + displayName: Regular rebuild of FSharp.sln + - script: dotnet build .\FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" + workingDirectory: $(Build.SourcesDirectory) + env: + DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 + displayName: Regular rebuild of FSharp.Compiler.Service.sln + + # Plain build Linux + - job: Plain_Build_Linux + pool: + vmImage: $(UbuntuMachineQueueName) + variables: + - name: _BuildConfig + value: Debug + steps: + - checkout: self + clean: true + - script: ./build.sh + displayName: Initial build + - script: dotnet --list-sdks + displayName: Report dotnet SDK versions + - task: UseDotNet@2 + displayName: install SDK + inputs: + packageType: sdk + useGlobalJson: true + includePreviewVersions: true + workingDirectory: $(Build.SourcesDirectory) + installationPath: $(Agent.ToolsDirectory)/dotnet + - script: dotnet build ./FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\" + env: + DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 + displayName: Regular rebuild of FSharp.sln + - script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" + workingDirectory: $(Build.SourcesDirectory) + env: + DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 + displayName: Regular rebuild of FSharp.Compiler.Service.sln + + # Plain build Mac + - job: Plain_Build_MacOS + pool: + vmImage: macos-11 + variables: + - name: _BuildConfig + value: Debug + steps: + - checkout: self + clean: true + - script: ./build.sh + displayName: Initial build + - script: dotnet --list-sdks + displayName: Report dotnet SDK versions + - task: UseDotNet@2 + displayName: install SDK + inputs: + packageType: sdk + useGlobalJson: true + includePreviewVersions: true + workingDirectory: $(Build.SourcesDirectory) + installationPath: $(Agent.ToolsDirectory)/dotnet + - script: dotnet build ./FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\" + env: + DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 + displayName: Regular rebuild of FSharp.sln + - script: dotnet build ./FSharp.Compiler.Service.sln /bl:\"artifacts/log/$(_BuildConfig)/ServiceRegularBuild.binlog\" + workingDirectory: $(Build.SourcesDirectory) + env: + DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 + displayName: Regular rebuild of FSharp.Compiler.Service.sln + + # Test trimming on Windows + - job: Build_And_Test_Trimming_Windows + pool: + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals $(WindowsMachineQueueName) + strategy: + maxParallel: 2 + matrix: + compressed_metadata: + _kind: "-compressAllMetadata" + classic_metadata: + _kind: "" + variables: + - name: _BuildConfig + value: Release + steps: + - checkout: self + clean: true + - task: UseDotNet@2 + displayName: install SDK + inputs: + packageType: sdk + useGlobalJson: true + includePreviewVersions: true + workingDirectory: $(Build.SourcesDirectory) + installationPath: $(Agent.ToolsDirectory)/dotnet + - script: dotnet --list-sdks + displayName: Report dotnet SDK versions + - script: .\Build.cmd $(_kind) -pack -c $(_BuildConfig) + displayName: Initial build and prepare packages. + - script: dotnet publish -c $(_BuildConfig) -bl:\"./bin/$(_BuildConfig)/net7.0/win-x64/publish/Trimming.binlog\" + displayName: Build and publish a trim test package. + workingDirectory: $(Build.SourcesDirectory)/tests/projects/SelfContained_Trimming_Test + - script: .\check.cmd + displayName: Check the state of the trimmed app. + workingDirectory: $(Build.SourcesDirectory)/tests/projects/SelfContained_Trimming_Test + - task: PublishPipelineArtifact@1 + displayName: Publish Trim Tests Logs + inputs: + targetPath: '$(Build.SourcesDirectory)/tests/projects/SelfContained_Trimming_Test/bin/$(_BuildConfig)/net7.0/win-x64/publish' + artifactName: 'Trim Test Logs Attempt $(System.JobAttempt) Logs $(_kind)' + continueOnError: true + condition: always() + + # Arcade-powered source build + # turned off until https://github.com/dotnet/source-build/issues/1795 is fixed + # - template: /eng/common/templates/jobs/jobs.yml + # parameters: + # enablePublishUsingPipelines: true + # enablePublishBuildArtifacts: true + # enablePublishBuildAssets: true + # artifacts: + # publish: + # artifacts: true + # manifests: true + # runSourceBuild: true + # sourceBuildParameters: + # includeDefaultManagedPlatform: true + +#---------------------------------------------------------------------------------------------------------------------# +# Post Build # +#---------------------------------------------------------------------------------------------------------------------# +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: eng/common/templates/post-build/post-build.yml + parameters: + publishingInfraVersion: 3 + # Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved. + enableSymbolValidation: false + # SourceLink improperly looks for generated files. See https://github.com/dotnet/arcade/issues/3069 + enableSourceLinkValidation: false + # Enable SDL validation, passing through values from the 'DotNet-FSharp-SDLValidation-Params' group. + SDLValidationParameters: + enable: true + params: >- + -SourceToolsList @("policheck","credscan") + -TsaInstanceURL $(_TsaInstanceURL) + -TsaProjectName $(_TsaProjectName) + -TsaNotificationEmail $(_TsaNotificationEmail) + -TsaCodebaseAdmin $(_TsaCodebaseAdmin) + -TsaBugAreaPath $(_TsaBugAreaPath) + -TsaIterationPath $(_TsaIterationPath) + -TsaRepositoryName "FSharp" + -TsaCodebaseName "FSharp-GitHub" + -TsaPublish $True + -PoliCheckAdditionalRunConfigParams @("UserExclusionPath < $(Build.SourcesDirectory)/eng/policheck_exclusions.xml") + +#---------------------------------------------------------------------------------------------------------------------# +# VS Insertion # +#---------------------------------------------------------------------------------------------------------------------# +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: eng/release/insert-into-vs.yml + parameters: + componentBranchName: refs/heads/release/dev17.5 + insertTargetBranch: rel/d17.5 + insertTeamEmail: fsharpteam@microsoft.com + insertTeamName: 'F#' + completeInsertion: 'auto' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c7ca2f8bf1c..5138b7d3c59 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -142,6 +142,8 @@ stages: /p:PublishToSymbolServer=true /p:VisualStudioDropName=$(VisualStudioDropName) /p:GenerateSbom=true + env: + NativeToolsOnMachine: true - script: .\tests\EndToEndBuildTests\EndToEndBuildTests.cmd -c $(_BuildConfig) displayName: End to end build tests - task: PublishTestResults@2 @@ -341,6 +343,8 @@ stages: - checkout: self clean: true - script: eng\CIBuild.cmd -configuration $(_configuration) -$(_testKind) + env: + NativeToolsOnMachine: true displayName: Build / Test - task: PublishTestResults@2 displayName: Publish Test Results @@ -399,6 +403,8 @@ stages: - checkout: self clean: true - script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind) + env: + NativeToolsOnMachine: true displayName: Build / Test - task: PublishTestResults@2 displayName: Publish Test Results diff --git a/eng/Versions.props b/eng/Versions.props index e5852db8752..6e9a23ad41b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -15,7 +15,7 @@ 7 0 - 201 + 202 0 @@ -102,7 +102,7 @@ 17.5.0-preview-1-33020-520 17.5.202-pre-g89e17c9f72 17.4.27 - 17.4.0-preview-22469-04 + 17.5.0 $(RoslynVersion) $(RoslynVersion) diff --git a/global.json b/global.json index 7e6c01c2efc..8a2093db665 100644 --- a/global.json +++ b/global.json @@ -15,7 +15,7 @@ "xcopy-msbuild": "17.3.1" }, "native-tools": { - "perl": "5.32.1.1" + "perl": "5.38.0.1" }, "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.22554.2", diff --git a/tests/fsharp/core/printing/output.1000.stdout.bsl b/tests/fsharp/core/printing/output.1000.stdout.bsl index 71b706800bb..5cb76992d3c 100644 --- a/tests/fsharp/core/printing/output.1000.stdout.bsl +++ b/tests/fsharp/core/printing/output.1000.stdout.bsl @@ -2765,7 +2765,7 @@ val ShortName: string = "hi" > val list2: int list = [1] module FSI_0317. - C6f6ae524efb4d95b2b2eaa363022f9d4a28c777f788498ca81a55b9ec1aad1a + 1b7a9d320091d10fbac9691c10ee13bed243d3b01c7fe995d7b24c6c073f5ea7 {"ImmutableField0":6} type R1 = diff --git a/tests/fsharp/core/printing/output.200.stdout.bsl b/tests/fsharp/core/printing/output.200.stdout.bsl index ad24f0b8ff0..36231a5ba90 100644 --- a/tests/fsharp/core/printing/output.200.stdout.bsl +++ b/tests/fsharp/core/printing/output.200.stdout.bsl @@ -2010,7 +2010,7 @@ val ShortName: string = "hi" > val list2: int list = [1] module FSI_0317. - C6f6ae524efb4d95b2b2eaa363022f9d4a28c777f788498ca81a55b9ec1aad1a + 1b7a9d320091d10fbac9691c10ee13bed243d3b01c7fe995d7b24c6c073f5ea7 {"ImmutableField0":6} type R1 = diff --git a/tests/fsharp/core/printing/output.multiemit.stdout.bsl b/tests/fsharp/core/printing/output.multiemit.stdout.bsl index ef51dfc4078..655830541a3 100644 --- a/tests/fsharp/core/printing/output.multiemit.stdout.bsl +++ b/tests/fsharp/core/printing/output.multiemit.stdout.bsl @@ -6312,7 +6312,7 @@ val ShortName: string = "hi" > val list2: int list = [1] module FSI_0316. - C6f6ae524efb4d95b2b2eaa363022f9d4a28c777f788498ca81a55b9ec1aad1a + 1b7a9d320091d10fbac9691c10ee13bed243d3b01c7fe995d7b24c6c073f5ea7 {"ImmutableField0":6} type R1 = diff --git a/tests/fsharp/core/printing/output.off.stdout.bsl b/tests/fsharp/core/printing/output.off.stdout.bsl index 234cfc2e4fd..8e667d06a92 100644 --- a/tests/fsharp/core/printing/output.off.stdout.bsl +++ b/tests/fsharp/core/printing/output.off.stdout.bsl @@ -1779,7 +1779,7 @@ val ShortName: string = "hi" > val list2: int list module FSI_0317. - C6f6ae524efb4d95b2b2eaa363022f9d4a28c777f788498ca81a55b9ec1aad1a + 1b7a9d320091d10fbac9691c10ee13bed243d3b01c7fe995d7b24c6c073f5ea7 {"ImmutableField0":6} type R1 = diff --git a/tests/fsharp/core/printing/output.stdout.bsl b/tests/fsharp/core/printing/output.stdout.bsl index ef51dfc4078..655830541a3 100644 --- a/tests/fsharp/core/printing/output.stdout.bsl +++ b/tests/fsharp/core/printing/output.stdout.bsl @@ -6312,7 +6312,7 @@ val ShortName: string = "hi" > val list2: int list = [1] module FSI_0316. - C6f6ae524efb4d95b2b2eaa363022f9d4a28c777f788498ca81a55b9ec1aad1a + 1b7a9d320091d10fbac9691c10ee13bed243d3b01c7fe995d7b24c6c073f5ea7 {"ImmutableField0":6} type R1 =