From 0f245a30a1f1b44774c182798442b6c06dc82205 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Wed, 16 Dec 2020 20:22:40 -0800 Subject: [PATCH 1/9] Disable Portable PDB conversion --- build/publish.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/publish.proj b/build/publish.proj index 47849ca21b..e35ac8f123 100644 --- a/build/publish.proj +++ b/build/publish.proj @@ -23,7 +23,7 @@ 180 - true + false From 99034da5b0c0de3678cd395da0c28740ca86a344 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Wed, 16 Dec 2020 20:23:17 -0800 Subject: [PATCH 2/9] Push packages to artifacts --- build/vsts-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/vsts-ci.yml b/build/vsts-ci.yml index 041cbe5660..83f12746b7 100644 --- a/build/vsts-ci.yml +++ b/build/vsts-ci.yml @@ -243,6 +243,16 @@ phases: displayName: sign packages continueOnError: false + # The generated .nupkgs and .snupkgs packages are published to Azure artifacts, + # in case we need to debug them. They're found under Release/Shipping + - task: PublishBuildArtifacts@1 + displayName: Push packages and symbol packages to Azure Artifacts + inputs: + pathToPublish: $(Build.SourcesDirectory)/artifacts/packages + artifactName: PackageAssets + artifactType: container + continueOnError: true + - task: NuGetAuthenticate@0 inputs: nuGetServiceConnections: machinelearning-dnceng-public-feed # To allow publishing to a feed of another organization From 0b4b558c38f440c2359e39d1f7a5b495c3f33331 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Wed, 16 Dec 2020 20:23:35 -0800 Subject: [PATCH 3/9] Fix symbols issues --- .../Microsoft.ML.CpuMath.csproj | 19 +++---- .../Microsoft.ML.FastTree.csproj | 16 +++--- .../Microsoft.ML.Mkl.Components.csproj | 17 ++++--- .../Microsoft.ML.Mkl.Redist.csproj | 17 ++++--- .../Microsoft.ML.Recommender.csproj | 16 +++--- src/Microsoft.ML/Microsoft.ML.csproj | 50 ++++++++++++++++--- 6 files changed, 95 insertions(+), 40 deletions(-) diff --git a/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj b/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj index 7e39f41e47..a0c141a8da 100644 --- a/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj +++ b/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj @@ -1,40 +1,41 @@  - netstandard2.0;netcoreapp3.1 Microsoft.ML.CpuMath Microsoft.ML.CpuMath contains optimized math routines for ML.NET. true $(DefineConstants);CPUMATH_INFRASTRUCTURE + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.FastTree/Microsoft.ML.FastTree.csproj b/src/Microsoft.ML.FastTree/Microsoft.ML.FastTree.csproj index 8b8ca3bcb6..144bee96f6 100644 --- a/src/Microsoft.ML.FastTree/Microsoft.ML.FastTree.csproj +++ b/src/Microsoft.ML.FastTree/Microsoft.ML.FastTree.csproj @@ -1,17 +1,15 @@  - netstandard2.0 Microsoft.ML.FastTree ML.NET component for FastTree $(DefineConstants);USE_FASTTREENATIVE;NO_STORE;CORECLR true + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - - all @@ -22,9 +20,15 @@ all - - - + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.csproj b/src/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.csproj index 1f931abe55..8f19609e97 100644 --- a/src/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.csproj +++ b/src/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.csproj @@ -1,17 +1,15 @@  - netstandard2.0 Microsoft.ML.Mkl.Components true ML.NET additional learners making use of Intel Mkl. + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - - all @@ -22,11 +20,9 @@ all - - + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.csproj b/src/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.csproj index e281e66258..6d932ff89a 100644 --- a/src/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.csproj +++ b/src/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.csproj @@ -1,23 +1,28 @@ - Intel - false - false + true + true netstandard2.0 LICENSE.txt $(MSBuildProjectName) contains the MKL library redistributed as a NuGet package. $(PackageTags) MLNET MKL + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - false - - + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.Recommender/Microsoft.ML.Recommender.csproj b/src/Microsoft.ML.Recommender/Microsoft.ML.Recommender.csproj index 0ad068fc7e..92955776e8 100644 --- a/src/Microsoft.ML.Recommender/Microsoft.ML.Recommender.csproj +++ b/src/Microsoft.ML.Recommender/Microsoft.ML.Recommender.csproj @@ -1,16 +1,14 @@ - netstandard2.0 Microsoft.ML.Recommender true LIBMF, the core computation library for matrix factorization in ML.NET + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - - all @@ -18,10 +16,16 @@ all - - - + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML/Microsoft.ML.csproj b/src/Microsoft.ML/Microsoft.ML.csproj index 890578d317..d2c6040632 100644 --- a/src/Microsoft.ML/Microsoft.ML.csproj +++ b/src/Microsoft.ML/Microsoft.ML.csproj @@ -1,17 +1,40 @@ - netstandard2.0 - false + $(NoWarn);NU5127;NU5128 ML.NET is a cross-platform open-source machine learning framework which makes machine learning accessible to .NET developers. + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - - + + true + all + + + true + all + + + true + all + + + true + all + + + true + all + + + true + all + + @@ -19,9 +42,24 @@ - - + + + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage + + + + + + + + + + + + + + \ No newline at end of file From 80fb8fc388edd470a712416b17e4043561bc06e5 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Wed, 16 Dec 2020 20:31:26 -0800 Subject: [PATCH 4/9] Added note about Microsoft.ML.dll --- src/Microsoft.ML/Microsoft.ML.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Microsoft.ML/Microsoft.ML.csproj b/src/Microsoft.ML/Microsoft.ML.csproj index d2c6040632..763233927b 100644 --- a/src/Microsoft.ML/Microsoft.ML.csproj +++ b/src/Microsoft.ML/Microsoft.ML.csproj @@ -2,6 +2,10 @@ netstandard2.0 + $(NoWarn);NU5127;NU5128 ML.NET is a cross-platform open-source machine learning framework which makes machine learning accessible to .NET developers. From 88361fbd2a0e3115dc6bd079d803aef31f61e4f2 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Wed, 16 Dec 2020 21:17:46 -0800 Subject: [PATCH 5/9] try out just packing --- build/ci/job-template.yml | 105 +------------------------------------- 1 file changed, 1 insertion(+), 104 deletions(-) diff --git a/build/ci/job-template.yml b/build/ci/job-template.yml index d8cbaac732..bff68ea9ef 100644 --- a/build/ci/job-template.yml +++ b/build/ci/job-template.yml @@ -93,109 +93,6 @@ jobs: targetType: inline script: Get-ChildItem -Path '$(Build.SourcesDirectory)\packages\*\runtimes\*' -Recurse | Select -ExpandProperty FullName | Where {$_ -notlike '*\win-*'} | sort length -Descending | Remove-Item -Recurse -Confirm:$false -Force displayName: Clean up non-Windows runtime folders of NuGet Packages to save disk space - - ${{ if eq(parameters.nightlyBuild, 'true') }}: - - script: $(dotnetPath) restore $(nightlyBuildProjPath) - displayName: Restore nightly build project - - script: $(dotnetPath) list $(nightlyBuildProjPath) package --source $(nugetFeed) --outdated > $(versionFilePath) - displayName: List latest package versions - - script: $(dotnetPath) run --project $(packageUpdaterProjPath) - displayName: Update package versions for nightly build - - ${{ if eq(parameters.buildScript, 'build.cmd') }}: - - powershell: | - Get-ChildItem -Path '.\artifacts\bin\*' -Recurse | - Select -ExpandProperty FullName | - Where {$_ -NotMatch '.*\\Microsoft\.ML\.NightlyBuild\.Tests.*|.*\\Native.*'} | - sort length -Descending | - Remove-Item -force - Write-Output "Done cleaning up usless project..." - displayName: Clean up useless project - - script: $(dotnetPath) msbuild -restore $(nightlyBuildProjPath) /p:ReferenceTypeForTestFramework="Nuget" /p:Configuration=$(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} - displayName: Build Nightly-Build Project with latest package versions - - script: $(dotnetPath) msbuild $(runNightlyBuildProj) /t:RunNightlyBuildTests /p:Configuration=$(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} - displayName: Run Nightly Build Tests - ${{ if eq(parameters.nightlyBuild, 'false') }}: - - ${{ if eq(parameters.innerLoop, 'false') }}: - - ${{ if and(eq(parameters.runSpecific, 'false'), eq(parameters.useVSTestTask, 'false')) }}: - # TODO: Code coverage needs to be fixed. - - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages /p:Coverage=${{ parameters.codeCoverage }} - displayName: Run All Tests. - - ${{ if and(eq(parameters.runSpecific, 'true'), eq(parameters.useVSTestTask, 'false')) }}: - - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:TestRunnerAdditionalArguments='-trait$(spaceValue)Category=RunSpecificTest' /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages /p:Coverage=${{ parameters.codeCoverage }} - displayName: Run Specific Tests. - - ${{ if and(eq(parameters.buildScript, 'build.cmd'), eq(parameters.useVSTestTask, 'true')) }}: - - task: VSTest@2 - displayName: Run Tests with VSTest - inputs: - testSelector: testAssemblies - testAssemblyVer2: | - **\*test.dll - **\*tests.dll - !**\obj\** - runSettingsFile: $(Build.SourcesDirectory)/tools-local/vstest.runsettings - searchFolder: '$(System.DefaultWorkingDirectory)' - vstestLocationMethod: 'version' - vsTestVersion: 'latest' - runInParallel: False - runTestsInIsolation: True - codeCoverageEnabled: ${{ parameters.codeCoverage }} - otherConsoleOptions: ${{ parameters.vsTestConfiguration }} - dontDistribute: True - diagnosticsEnabled: False - collectDumpOn: onAbortOnly - publishRunAttachments: true - - ${{ if eq(parameters.innerLoop, 'true') }}: - - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:TestRunnerAdditionalArguments='-notrait$(spaceValue)Category=SkipInCI' /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages /p:Coverage=${{ parameters.codeCoverage }} - displayName: Run CI Tests. - - script: $(dotnetPath) msbuild -restore build/Codecoverage.proj - displayName: Upload coverage to codecov.io - condition: and(succeeded(), eq(${{ parameters.codeCoverage }}, True)) - - task: PublishTestResults@2 - displayName: Publish Test Results - condition: succeededOrFailed() - inputs: - testRunner: 'xUnit' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults' - # Upload all test results except performance test project. On CI by default performance tests - # will not run and test result files will still be generate without details. Avoid uploading - # performance test result to avoid warnings on publish test result stage. - testResultsFiles: | - **/*.xml - !**/*PerformanceTests*.xml - testRunTitle: Machinelearning_Tests_${{ parameters.name }}_$(_configuration)_$(Build.BuildNumber) - configuration: $(_configuration) - mergeTestResults: true - - task: CopyFiles@2 - displayName: Stage build logs - condition: not(succeeded()) - inputs: - sourceFolder: $(Build.SourcesDirectory) - contents: 'artifacts/log/**' - targetFolder: $(Build.ArtifactStagingDirectory) - - task: CopyFiles@2 - displayName: Stage test output - condition: not(succeeded()) - inputs: - sourceFolder: $(Build.SourcesDirectory) - contents: | - artifacts/TestResults/** - targetFolder: $(Build.ArtifactStagingDirectory) - - task: CopyFiles@2 - displayName: Stage process dump and pdb if any - condition: not(succeeded()) - inputs: - sourceFolder: $(Build.SourcesDirectory) - contents: | - *.dmp - CrashDumps/*.dmp - artifacts/bin/**/*.pdb - targetFolder: $(Build.ArtifactStagingDirectory) - - task: PublishBuildArtifacts@1 - displayName: Publish build and test logs - condition: not(succeeded()) - inputs: - pathToPublish: $(Build.ArtifactStagingDirectory) - artifactName: ${{ parameters.name }} $(_config_short) - artifactType: container - - ${{ if eq(parameters.nightlyBuild, 'false') }}: - - script: ${{ parameters.buildScript }} /p:Build=false -pack -ci /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages + - script: ${{ parameters.buildScript }} -pack -ci /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages displayName: Build Packages From 09541eca04380d3fe40b6d9421d28260171d5353 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Wed, 16 Dec 2020 21:41:44 -0800 Subject: [PATCH 6/9] Return Build=false, but actually use configuration --- build/ci/job-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ci/job-template.yml b/build/ci/job-template.yml index bff68ea9ef..c195f7c7d8 100644 --- a/build/ci/job-template.yml +++ b/build/ci/job-template.yml @@ -94,5 +94,5 @@ jobs: script: Get-ChildItem -Path '$(Build.SourcesDirectory)\packages\*\runtimes\*' -Recurse | Select -ExpandProperty FullName | Where {$_ -notlike '*\win-*'} | sort length -Descending | Remove-Item -Recurse -Confirm:$false -Force displayName: Clean up non-Windows runtime folders of NuGet Packages to save disk space - ${{ if eq(parameters.nightlyBuild, 'false') }}: - - script: ${{ parameters.buildScript }} -pack -ci /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages + - script: ${{ parameters.buildScript }} -pack -ci -configuration $(_configuration) /p:Build=false /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages displayName: Build Packages From 7c5f225d38b3fb8d9717f7bf86f2095db0cb4f31 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Wed, 16 Dec 2020 22:01:25 -0800 Subject: [PATCH 7/9] Added missing TargetArchitecture --- build/ci/job-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ci/job-template.yml b/build/ci/job-template.yml index c195f7c7d8..6850ce8560 100644 --- a/build/ci/job-template.yml +++ b/build/ci/job-template.yml @@ -94,5 +94,5 @@ jobs: script: Get-ChildItem -Path '$(Build.SourcesDirectory)\packages\*\runtimes\*' -Recurse | Select -ExpandProperty FullName | Where {$_ -notlike '*\win-*'} | sort length -Descending | Remove-Item -Recurse -Confirm:$false -Force displayName: Clean up non-Windows runtime folders of NuGet Packages to save disk space - ${{ if eq(parameters.nightlyBuild, 'false') }}: - - script: ${{ parameters.buildScript }} -pack -ci -configuration $(_configuration) /p:Build=false /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages + - script: ${{ parameters.buildScript }} -pack -ci -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} /p:Build=false /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages displayName: Build Packages From 5e78cadf465766ec96a8574df12d9c66f6ad33e6 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Wed, 16 Dec 2020 22:21:43 -0800 Subject: [PATCH 8/9] add back tests --- build/ci/job-template.yml | 107 +++++++++++++++++++++++++++++++++++++- 1 file changed, 105 insertions(+), 2 deletions(-) diff --git a/build/ci/job-template.yml b/build/ci/job-template.yml index 6850ce8560..6e868ebb0c 100644 --- a/build/ci/job-template.yml +++ b/build/ci/job-template.yml @@ -93,6 +93,109 @@ jobs: targetType: inline script: Get-ChildItem -Path '$(Build.SourcesDirectory)\packages\*\runtimes\*' -Recurse | Select -ExpandProperty FullName | Where {$_ -notlike '*\win-*'} | sort length -Descending | Remove-Item -Recurse -Confirm:$false -Force displayName: Clean up non-Windows runtime folders of NuGet Packages to save disk space + - ${{ if eq(parameters.nightlyBuild, 'true') }}: + - script: $(dotnetPath) restore $(nightlyBuildProjPath) + displayName: Restore nightly build project + - script: $(dotnetPath) list $(nightlyBuildProjPath) package --source $(nugetFeed) --outdated > $(versionFilePath) + displayName: List latest package versions + - script: $(dotnetPath) run --project $(packageUpdaterProjPath) + displayName: Update package versions for nightly build + - ${{ if eq(parameters.buildScript, 'build.cmd') }}: + - powershell: | + Get-ChildItem -Path '.\artifacts\bin\*' -Recurse | + Select -ExpandProperty FullName | + Where {$_ -NotMatch '.*\\Microsoft\.ML\.NightlyBuild\.Tests.*|.*\\Native.*'} | + sort length -Descending | + Remove-Item -force + Write-Output "Done cleaning up usless project..." + displayName: Clean up useless project + - script: $(dotnetPath) msbuild -restore $(nightlyBuildProjPath) /p:ReferenceTypeForTestFramework="Nuget" /p:Configuration=$(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} + displayName: Build Nightly-Build Project with latest package versions + - script: $(dotnetPath) msbuild $(runNightlyBuildProj) /t:RunNightlyBuildTests /p:Configuration=$(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} + displayName: Run Nightly Build Tests - ${{ if eq(parameters.nightlyBuild, 'false') }}: - - script: ${{ parameters.buildScript }} -pack -ci -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} /p:Build=false /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages - displayName: Build Packages + - ${{ if eq(parameters.innerLoop, 'false') }}: + - ${{ if and(eq(parameters.runSpecific, 'false'), eq(parameters.useVSTestTask, 'false')) }}: + # TODO: Code coverage needs to be fixed. + - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages /p:Coverage=${{ parameters.codeCoverage }} + displayName: Run All Tests. + - ${{ if and(eq(parameters.runSpecific, 'true'), eq(parameters.useVSTestTask, 'false')) }}: + - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:TestRunnerAdditionalArguments='-trait$(spaceValue)Category=RunSpecificTest' /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages /p:Coverage=${{ parameters.codeCoverage }} + displayName: Run Specific Tests. + - ${{ if and(eq(parameters.buildScript, 'build.cmd'), eq(parameters.useVSTestTask, 'true')) }}: + - task: VSTest@2 + displayName: Run Tests with VSTest + inputs: + testSelector: testAssemblies + testAssemblyVer2: | + **\*test.dll + **\*tests.dll + !**\obj\** + runSettingsFile: $(Build.SourcesDirectory)/tools-local/vstest.runsettings + searchFolder: '$(System.DefaultWorkingDirectory)' + vstestLocationMethod: 'version' + vsTestVersion: 'latest' + runInParallel: False + runTestsInIsolation: True + codeCoverageEnabled: ${{ parameters.codeCoverage }} + otherConsoleOptions: ${{ parameters.vsTestConfiguration }} + dontDistribute: True + diagnosticsEnabled: False + collectDumpOn: onAbortOnly + publishRunAttachments: true + - ${{ if eq(parameters.innerLoop, 'true') }}: + - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:TestRunnerAdditionalArguments='-notrait$(spaceValue)Category=SkipInCI' /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages /p:Coverage=${{ parameters.codeCoverage }} + displayName: Run CI Tests. + - script: $(dotnetPath) msbuild -restore build/Codecoverage.proj + displayName: Upload coverage to codecov.io + condition: and(succeeded(), eq(${{ parameters.codeCoverage }}, True)) + - task: PublishTestResults@2 + displayName: Publish Test Results + condition: succeededOrFailed() + inputs: + testRunner: 'xUnit' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults' + # Upload all test results except performance test project. On CI by default performance tests + # will not run and test result files will still be generate without details. Avoid uploading + # performance test result to avoid warnings on publish test result stage. + testResultsFiles: | + **/*.xml + !**/*PerformanceTests*.xml + testRunTitle: Machinelearning_Tests_${{ parameters.name }}_$(_configuration)_$(Build.BuildNumber) + configuration: $(_configuration) + mergeTestResults: true + - task: CopyFiles@2 + displayName: Stage build logs + condition: not(succeeded()) + inputs: + sourceFolder: $(Build.SourcesDirectory) + contents: 'artifacts/log/**' + targetFolder: $(Build.ArtifactStagingDirectory) + - task: CopyFiles@2 + displayName: Stage test output + condition: not(succeeded()) + inputs: + sourceFolder: $(Build.SourcesDirectory) + contents: | + artifacts/TestResults/** + targetFolder: $(Build.ArtifactStagingDirectory) + - task: CopyFiles@2 + displayName: Stage process dump and pdb if any + condition: not(succeeded()) + inputs: + sourceFolder: $(Build.SourcesDirectory) + contents: | + *.dmp + CrashDumps/*.dmp + artifacts/bin/**/*.pdb + targetFolder: $(Build.ArtifactStagingDirectory) + - task: PublishBuildArtifacts@1 + displayName: Publish build and test logs + condition: not(succeeded()) + inputs: + pathToPublish: $(Build.ArtifactStagingDirectory) + artifactName: ${{ parameters.name }} $(_config_short) + artifactType: container + - ${{ if eq(parameters.nightlyBuild, 'false') }}: + - script: ${{ parameters.buildScript }} /p:Build=false -pack -ci /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages + displayName: Build Packages \ No newline at end of file From ba8ff976e120017643c38d82bb016a772ce12b93 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Wed, 16 Dec 2020 22:22:29 -0800 Subject: [PATCH 9/9] Added missing flags --- build/ci/job-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ci/job-template.yml b/build/ci/job-template.yml index 6e868ebb0c..d1ebf59c6f 100644 --- a/build/ci/job-template.yml +++ b/build/ci/job-template.yml @@ -197,5 +197,5 @@ jobs: artifactName: ${{ parameters.name }} $(_config_short) artifactType: container - ${{ if eq(parameters.nightlyBuild, 'false') }}: - - script: ${{ parameters.buildScript }} /p:Build=false -pack -ci /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages + - script: ${{ parameters.buildScript }} /p:Build=false -pack -ci -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages displayName: Build Packages \ No newline at end of file