diff --git a/.azure/pipelines/build.yaml b/.azure/pipelines/build.yaml index 0b16af51e7..de42b1cd7b 100644 --- a/.azure/pipelines/build.yaml +++ b/.azure/pipelines/build.yaml @@ -43,6 +43,10 @@ parameters: displayName: Skip tests type: boolean default: false + - name: publish_nuget + displayName: Publish to nuget.org + type: boolean + default: false - name: frameworks displayName: Frameworks type: object @@ -78,7 +82,7 @@ extends: parameters: settings: skipBuildTagsForGitHubPullRequests: true - pool: + pool: name: $(pool_name) image: $(pool_image) os: windows @@ -95,6 +99,7 @@ extends: codesign: ${{ parameters.codesign }} skip_test: ${{ parameters.skip_test }} publish_nightly: false + publish_nuget: ${{ parameters.publish_nuget }} frameworks: ${{ parameters.frameworks }} tests_categories: ${{ parameters.tests_categories }} runCodeQL3000: ${{ parameters.runCodeQL3000 }} \ No newline at end of file diff --git a/.azure/pipelines/nightly-main.yaml b/.azure/pipelines/nightly-main.yaml index a8c2b5003d..37f1065093 100644 --- a/.azure/pipelines/nightly-main.yaml +++ b/.azure/pipelines/nightly-main.yaml @@ -43,4 +43,5 @@ extends: version_suffix: nightly.$(Build.BuildNumber) codesign: true publish_nightly: true + publish_nuget: false skip_test: true \ No newline at end of file diff --git a/.azure/pipelines/templates/build.yaml b/.azure/pipelines/templates/build.yaml index a0ede4a648..90afbca15d 100644 --- a/.azure/pipelines/templates/build.yaml +++ b/.azure/pipelines/templates/build.yaml @@ -30,6 +30,10 @@ parameters: displayName: Publish to orleans-nightly type: boolean default: false + - name: publish_nuget + displayName: Publish to nuget.org + type: boolean + default: false - name: frameworks displayName: Frameworks type: object @@ -80,6 +84,16 @@ jobs: nuGetFeedType: internal publishVstsFeed: $(publishVstsFeed) allowPackageConflicts: true + - ${{ if and(eq(parameters.codesign, true), eq(parameters.publish_nuget, true)) }}: + - output: nuget + condition: succeeded() + useDotNetTask: false + packageParentPath: $(Pipeline.Workspace) + packagesToPush: $(build.sourcesdirectory)/Artifacts/${{parameters.build_configuration}}/**/*.nupkg + nuGetFeedType: external + publishFeedCredentials: dotnet-orleans-nuget + publishPackageMetadata: true + allowPackageConflicts: true steps: - ${{ if eq(variables.microbuild_signing, true) }}: - task: MicroBuildSigningPlugin@4 @@ -252,6 +266,12 @@ jobs: displayName: ${{category}} on ${{framework}} timeoutInMinutes: 120 dependsOn: Build + templateContext: + outputs: + - output: pipelineArtifact + targetPath: '$(Build.ArtifactStagingDirectory)/test_outputs_${{category}}_${{framework}}_$(Build.BuildId)' + artifactName: 'test_outputs_${{category}}_${{framework}}' + condition: succeededOrFailed() steps: - checkout: self - task: UseDotNet@2 @@ -292,7 +312,7 @@ jobs: inputs: command: 'test' testRunTitle: ${{category}} on ${{framework}} - arguments: '--no-build --logger "trx;LogFilePrefix=testresults-${{framework}}-{{category}}" --framework ${{framework}} --configuration "${{parameters.build_configuration}}" --filter Category=${{category}} -- -parallel none -noshadow' + arguments: '--no-build --logger "trx;LogFilePrefix=testresults-${{framework}}-${{category}}" --framework ${{framework}} --configuration "${{parameters.build_configuration}}" --filter Category=${{category}} --blame-crash-dump-type full --blame-hang-timeout 10m --blame-hang-dump-type full -- -parallel none -noshadow' publishTestResults: false # Doesn't merge correctly, use the explicit PublishTestResults task instead - task: PublishTestResults@2 displayName: Publishing test results @@ -301,4 +321,18 @@ jobs: testResultsFormat: VSTest testResultsFiles: '**/testresults-*.trx' mergeTestResults: true - testRunTitle: ${{category}} on ${{framework}} \ No newline at end of file + testRunTitle: ${{category}} on ${{framework}} + - task: CopyFiles@2 + displayName: 'Copy test logs' + condition: succeededOrFailed() + inputs: + Contents: '**\*.log' + TargetFolder: '$(Build.ArtifactStagingDirectory)/test_outputs_${{category}}_${{framework}}_$(Build.BuildId)' + OverWrite: true + - task: CopyFiles@2 + displayName: 'Copy crash dumps' + condition: succeededOrFailed() + inputs: + Contents: '**\*.dmp' + TargetFolder: '$(Build.ArtifactStagingDirectory)/test_outputs_${{category}}_${{framework}}_$(Build.BuildId)' + OverWrite: true \ No newline at end of file