From 451aa785b5c5174a2ce53fb75f136815ff79b734 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 20 May 2026 17:19:05 -0700 Subject: [PATCH] ci: add dedicated nightly pipeline for C# emitter against TypeSpec Next Adds packages/http-client-csharp/eng/pipeline/nightly.yml so the nightly TypeSpec Next validation runs on its own ADO pipeline definition. This separates reporting from the publish pipeline and skips package publishing and the azure-sdk-for-net PR stage. The publish pipeline retains its UseTypeSpecNext parameter for manual runs as requested. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../eng/pipeline/nightly.yml | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 packages/http-client-csharp/eng/pipeline/nightly.yml diff --git a/packages/http-client-csharp/eng/pipeline/nightly.yml b/packages/http-client-csharp/eng/pipeline/nightly.yml new file mode 100644 index 00000000000..12aa644d38c --- /dev/null +++ b/packages/http-client-csharp/eng/pipeline/nightly.yml @@ -0,0 +1,89 @@ +# Dedicated nightly pipeline for the C# emitter against TypeSpec Next. +# +# This pipeline builds and tests the C# emitter with TypeSpec @next dependencies +# but does NOT publish packages and does NOT open an azure-sdk-for-net PR. The +# schedule itself is configured on the ADO pipeline definition, so reporting and +# triage of nightly TypeSpec Next failures is separated from release/publish runs. +# +# The publish pipeline (publish.yml) still exposes a UseTypeSpecNext parameter for +# manual runs that need a published @next-based build. + +trigger: none +pr: none + +parameters: + - name: UseTypeSpecNext + displayName: Use TypeSpec Next (update dependencies to @next versions) + type: boolean + default: true + + - name: RunRegenChecks + displayName: Run regen/generation checks against TypeSpec Next + type: boolean + default: true + + # Primary Node.js version used by the artifact-emitting Build_linux job. Must match + # the PrimaryNodeVersion default in eng/emitters/pipelines/templates/stages/emitter-stages.yml. + - name: PrimaryNodeVersion + type: string + default: "24.x" + +extends: + template: /eng/common/pipelines/templates/1es-redirect.yml + + parameters: + stages: + - template: /eng/emitters/pipelines/templates/stages/emitter-stages.yml + parameters: + BuildPrereleaseVersion: true + UseTypeSpecNext: ${{ parameters.UseTypeSpecNext }} + Publish: "none" + PackagePath: /packages/http-client-csharp + EmitterPackageJsonPath: packages/http-client-csharp/package.json + PrimaryNodeVersion: ${{ parameters.PrimaryNodeVersion }} + Packages: + - name: typespec-http-client-csharp + file: typespec-http-client-csharp-*.tgz + type: npm + - name: Microsoft.TypeSpec.Generator + file: Microsoft.TypeSpec.Generator.*.nupkg + type: nuget + - name: Microsoft.TypeSpec.Generator.ClientModel + file: Microsoft.TypeSpec.Generator.ClientModel.*.nupkg + type: nuget + - name: Microsoft.TypeSpec.Generator.Input + file: Microsoft.TypeSpec.Generator.Input.*.nupkg + type: nuget + - name: Microsoft.TypeSpec.Generator.Customization + file: Microsoft.TypeSpec.Generator.Customization.*.nupkg + type: nuget + UnitTestArgs: -UnitTests + ${{ if parameters.RunRegenChecks }}: + TestMatrix: + RegenCheck: + TestArguments: -GenerationChecks + StagePrefix: "CSharp" + LanguageShortName: "csharp" + HasNugetPackages: true + CadlRanchName: "@typespec/http-client-csharp" + AdditionalInitializeSteps: + - task: UseDotNet@2 + inputs: + displayName: "Install .NET 8" + performMultiLevelLookup: true + useGlobalJson: false + version: 8.x + workingDirectory: $(Build.SourcesDirectory)/packages/http-client-csharp + - task: UseDotNet@2 + inputs: + displayName: "Install .NET 9" + performMultiLevelLookup: true + useGlobalJson: false + version: 9.x + workingDirectory: $(Build.SourcesDirectory)/packages/http-client-csharp + - task: UseDotNet@2 + inputs: + displayName: "Install .NET 10" + performMultiLevelLookup: true + useGlobalJson: true + workingDirectory: $(Build.SourcesDirectory)/packages/http-client-csharp