From 1ca717720a6685706a9ad33672f58bea1ce4c8e7 Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 30 Sep 2024 14:00:40 -0700 Subject: [PATCH 01/18] new pr piepline --- build/pr.yml | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 build/pr.yml diff --git a/build/pr.yml b/build/pr.yml new file mode 100644 index 00000000..a1ac759f --- /dev/null +++ b/build/pr.yml @@ -0,0 +1,88 @@ +# Pull request validation for Windows against the `future` and `release/*` branches +# See https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for reference +trigger: + branches: + include: + - main + - release/* + +pr: + autoCancel: true # indicates whether additional pushes to a PR should cancel in-progress runs for the same PR. Defaults to true + branches: + include: # branch names which will trigger a build + - main + - release/* + +name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) + +variables: +- template: variables/nuget.yml +- name: configuration + value: Release + + +stages: +- stage: linux + displayName: Linux (Ubuntu) + dependsOn: [] + jobs: + # - template: templates/build.yml + # parameters: + # name: 'net_core_tests_ubuntu_22' + # displayName: 'Unit Tests (Ubuntu-22)' + # vmImage: 'ubuntu-22.04' + # scriptFileName: './build.sh' + # scriptArgs: RunTests #' incremental' # Run tests incremental-ly + # outputDirectory: 'TestResults' + # artifactName: 'net_core_tests_ubuntu_22-$(Build.BuildId)' + # packageFeed: $(packageFeed) + - job: ubuntu_22 + displayName: 'Ubuntu-22' + timeoutInMinutes: 120 + pool: + vmImage: 'ubuntu-22.04' + steps: + - template: templates/install-dotnet.yaml + - template: templates/install-nuget.yaml + - template: templates/restore-nuget-packages.yaml + - task: DotNetCoreCLI@2 + displayName: Build + inputs: + command: 'build' + projects: 'DotNetty.sln' + #msbuildArgs: '/p' + #platform: 'Any CPU' + configuration: $(configuration) + #maximumCpuCount: true + - task: DotNetCoreCLI@2 + displayName: Test + inputs: + command: 'test' + projects: 'test/DotNetty.Codecs.Http2.Tests/DotNetty.Codecs.Http2.Tests.csproj' + arguments: '--no-build -c $(configuration) -f net6.0 --logger:"console;verbosity=normal" ' + publishTestResults: true + + + # - task: Bash@3 + # displayName: Build (Linux) + # inputs: + # filePath: ${{ parameters.scriptFileName }} + # arguments: ${{ parameters.scriptArgs }} + # continueOnError: true + # condition: in( variables['Agent.OS'], 'Linux', 'Darwin' ) + + # - task: CopyFiles@2 + # displayName: 'Copy Build Output' + # inputs: + # sourceFolder: ${{ parameters.outputDirectory }} + # contents: '**\*' + # targetFolder: $(Build.ArtifactStagingDirectory) + # continueOnError: boolean # 'true' if future steps should run even if this step fails; defaults to 'false' + # - task: PublishTestResults@2 + # displayName: 'Publish test results' + # inputs: + # testRunner: VSTest + # testResultsFiles: '**/*.trx' #TestResults folder usually + # testRunTitle: ${{ parameters.name }} + # mergeTestResults: true + # failTaskOnFailedTests: false \ No newline at end of file From 9d593cafed745aca030a60b9f02877bb67a6d009 Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 00:51:00 -0800 Subject: [PATCH 02/18] win build --- build/pr-validation.yaml | 147 ++++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 70 deletions(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index f61711f6..286f60ae 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -16,87 +16,94 @@ variables: stages: - stage: windows - displayName: Windows + displayName: Windows 2022 jobs: - job: WindowsBuild displayName: Build (Windows 2022) pool: vmImage: windows-2022 - demands: Cmd steps: - - checkout: self # self represents the repo where the initial Pipelines YAML file was found - clean: false # whether to fetch clean each time - submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules - persistCredentials: true - template: templates/install-dotnet.yaml - template: templates/install-nuget.yaml - template: templates/restore-nuget-packages.yaml - - template: templates/install-build-dependencies.yaml - parameters: - packageFeed: $(packageFeed) - - task: BatchScript@1 - displayName: Windows Build + - task: VSBuild@1 + displayName: 'Build $(solution)' inputs: - filename: build.cmd - arguments: 'Build' #Add ' incremental' to build incremental-ly - continueOnError: true - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - - task: CopyFiles@2 - displayName: 'Copy Build Output' - inputs: - sourceFolder: Artifacts - contents: '*' - targetFolder: $(Build.ArtifactStagingDirectory) - continueOnError: boolean # 'true' if future steps should run even if this step fails; defaults to 'false' - - script: 'echo 1>&2' - failOnStderr: true - displayName: 'If above is partially succeeded, then fail' - condition: eq(variables['Agent.JobStatus'], 'SucceededWithIssues') + solution: 'DotNetty.sln' + configuration: '$(configuration)' + maximumCpuCount: true + # - checkout: self # self represents the repo where the initial Pipelines YAML file was found + # clean: false # whether to fetch clean each time + # persistCredentials: true + # - template: templates/install-dotnet.yaml + # - template: templates/install-nuget.yaml + # - template: templates/restore-nuget-packages.yaml + # - template: templates/install-build-dependencies.yaml + # parameters: + # packageFeed: $(packageFeed) + # - task: BatchScript@1 + # displayName: Windows Build + # inputs: + # filename: build.cmd + # arguments: 'Build' #Add ' incremental' to build incremental-ly + # continueOnError: true + # condition: eq( variables['Agent.OS'], 'Windows_NT' ) + # - task: CopyFiles@2 + # displayName: 'Copy Build Output' + # inputs: + # sourceFolder: Artifacts + # contents: '*' + # targetFolder: $(Build.ArtifactStagingDirectory) + # continueOnError: boolean # 'true' if future steps should run even if this step fails; defaults to 'false' + # - script: 'echo 1>&2' + # failOnStderr: true + # displayName: 'If above is partially succeeded, then fail' + # condition: eq(variables['Agent.JobStatus'], 'SucceededWithIssues') - - template: templates/azure-pipeline.template.yaml - parameters: - name: 'net_core_tests_windows_2022' - displayName: 'Unit Tests (Windows 2022)' - vmImage: 'windows-2022' - scriptFileName: build.cmd - scriptArgs: RunTests - outputDirectory: 'TestResults' #Add ' incremental' to Run tests incremental-ly - artifactName: 'net_core_tests_windows-$(Build.BuildId)' - packageFeed: $(packageFeed) + # - template: templates/azure-pipeline.template.yaml + # parameters: + # name: 'net_core_tests_windows_2022' + # displayName: 'Unit Tests (Windows 2022)' + # vmImage: 'windows-2022' + # scriptFileName: build.cmd + # scriptArgs: RunTests + # outputDirectory: 'TestResults' #Add ' incremental' to Run tests incremental-ly + # artifactName: 'net_core_tests_windows-$(Build.BuildId)' + # packageFeed: $(packageFeed) - - template: templates/azure-pipeline.template.yaml - parameters: - name: 'net_core_tests_windows_2019' - displayName: 'Unit Tests (Windows 2019)' - vmImage: 'windows-2019' - scriptFileName: build.cmd - scriptArgs: RunTests #Add ' incremental' to Run tests incremental-ly - outputDirectory: 'TestResults' - artifactName: 'net_core_tests_windows-$(Build.BuildId)' - packageFeed: $(packageFeed) + # - template: templates/azure-pipeline.template.yaml + # parameters: + # name: 'net_core_tests_windows_2019' + # displayName: 'Unit Tests (Windows 2019)' + # vmImage: 'windows-2019' + # scriptFileName: build.cmd + # scriptArgs: RunTests #Add ' incremental' to Run tests incremental-ly + # outputDirectory: 'TestResults' + # artifactName: 'net_core_tests_windows-$(Build.BuildId)' + # packageFeed: $(packageFeed) -- stage: linux - displayName: Linux (Ubuntu) - dependsOn: [] - jobs: - - template: templates/azure-pipeline.template.yaml - parameters: - name: 'net_core_tests_ubuntu_20' - displayName: 'Unit Tests (Ubuntu-20)' - vmImage: 'ubuntu-20.04' - scriptFileName: './build.sh' - scriptArgs: RunTests #Add ' incremental' to Run tests incremental-ly - outputDirectory: 'TestResults' - artifactName: 'net_core_tests_ubuntu_16-$(Build.BuildId)' - packageFeed: $(packageFeed) +# - stage: linux +# displayName: Linux (Ubuntu) +# dependsOn: [] +# jobs: +# - template: templates/azure-pipeline.template.yaml +# parameters: +# name: 'net_core_tests_ubuntu_20' +# displayName: 'Unit Tests (Ubuntu-20)' +# vmImage: 'ubuntu-20.04' +# scriptFileName: './build.sh' +# scriptArgs: RunTests #Add ' incremental' to Run tests incremental-ly +# outputDirectory: 'TestResults' +# artifactName: 'net_core_tests_ubuntu_16-$(Build.BuildId)' +# packageFeed: $(packageFeed) - - template: templates/azure-pipeline.template.yaml - parameters: - name: 'net_core_tests_ubuntu_22' - displayName: 'Unit Tests (Ubuntu-22)' - vmImage: 'ubuntu-22.04' - scriptFileName: './build.sh' - scriptArgs: RunTests #' incremental' # Run tests incremental-ly - outputDirectory: 'TestResults' - artifactName: 'net_core_tests_ubuntu_22-$(Build.BuildId)' - packageFeed: $(packageFeed) +# - template: templates/azure-pipeline.template.yaml +# parameters: +# name: 'net_core_tests_ubuntu_22' +# displayName: 'Unit Tests (Ubuntu-22)' +# vmImage: 'ubuntu-22.04' +# scriptFileName: './build.sh' +# scriptArgs: RunTests #' incremental' # Run tests incremental-ly +# outputDirectory: 'TestResults' +# artifactName: 'net_core_tests_ubuntu_22-$(Build.BuildId)' +# packageFeed: $(packageFeed) From 938a4d855d24a806de2064141b08c3ea4f7d405a Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 01:10:17 -0800 Subject: [PATCH 03/18] net471 tests --- build/pr-validation.yaml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index 286f60ae..7da8bd2b 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -27,11 +27,45 @@ stages: - template: templates/install-nuget.yaml - template: templates/restore-nuget-packages.yaml - task: VSBuild@1 - displayName: 'Build $(solution)' + displayName: 'build' inputs: solution: 'DotNetty.sln' configuration: '$(configuration)' maximumCpuCount: true + - task: VSTest@2 + displayName: 'test (net472)' + inputs: + testSelector: 'testAssemblies' + testAssemblyVer2: | + test\*.Tests\bin\$(configuration)\net4*\**\*.Tests.dll + !test\DotNetty.Suite.Tests\bin\$(configuration)\net4*\**\*.Tests.dll + !test\DotNetty.Buffers.ReaderWriter.Tests\bin\$(configuration)\net4*\**\*.Tests.dll + resultsFolder: '$(Build.SourcesDirectory)\TestResults' + testRunTitle: 'test (net472)' + configuration: '$(configuration)' + publishRunAttachments: true + #runSettingsFile: '$(Build.SourcesDirectory)\cit.runsettings' + #runInParallel: true + #codeCoverageEnabled: true + #failOnMinTestsNotRun: true + #rerunFailedTests: true + + # - task: VSTest@2 + # displayName: 'test (net6)' + # inputs: + # testSelector: 'testAssemblies' + # testAssemblyVer2: | + # Proxy\test\**\bin\$(buildConfiguration)\net6*\*.Tests.dll + # resultsFolder: '$(Build.SourcesDirectory)\out\logs\TestResults' + # runSettingsFile: '$(Build.SourcesDirectory)\cit.runsettings' + # runInParallel: true + # codeCoverageEnabled: true + # testRunTitle: 'test' + # configuration: '$(buildConfiguration)' + # publishRunAttachments: true + # failOnMinTestsNotRun: true + # rerunFailedTests: true + # - checkout: self # self represents the repo where the initial Pipelines YAML file was found # clean: false # whether to fetch clean each time # persistCredentials: true From 91a2887addbbcc9b0fe16ed190aac079f8836977 Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 01:19:59 -0800 Subject: [PATCH 04/18] ubuntu build --- build/pr-validation.yaml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index 7da8bd2b..4729186c 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -15,11 +15,12 @@ variables: value: Release stages: -- stage: windows +- stage: Windows 2022 displayName: Windows 2022 jobs: - - job: WindowsBuild - displayName: Build (Windows 2022) + - job: default + displayName: default + timeoutInMinutes: 60 pool: vmImage: windows-2022 steps: @@ -49,6 +50,27 @@ stages: #codeCoverageEnabled: true #failOnMinTestsNotRun: true #rerunFailedTests: true +- stage: Ubuntu 22 + displayName: Ubuntu 22 + dependsOn: [] + jobs: + - job: default + displayName: 'default' + timeoutInMinutes: 60 + pool: + vmImage: 'ubuntu-22.04' + steps: + - template: templates/install-dotnet.yaml + - template: templates/install-nuget.yaml + - template: templates/restore-nuget-packages.yaml + - task: DotNetCoreCLI@2 + displayName: build + inputs: + command: 'build' + projects: 'DotNetty.sln' + configuration: $(configuration) + arguments: '-m' + #maximumCpuCount: true # - task: VSTest@2 # displayName: 'test (net6)' From 21fd33bacb193f38f011a3d66e09f7dc46278d1b Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 09:14:41 -0800 Subject: [PATCH 05/18] net8 and net9 unit tests --- build/pr-validation.yaml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index 4729186c..c4ec0738 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -50,6 +50,45 @@ stages: #codeCoverageEnabled: true #failOnMinTestsNotRun: true #rerunFailedTests: true + - task: VSTest@2 + displayName: 'test (net6.0)' + inputs: + testSelector: 'testAssemblies' + testAssemblyVer2: | + test\*.Tests\bin\$(configuration)\net6.0\**\*.Tests.dll + !test\DotNetty.Transport.Tests\bin\$(configuration)\net6.0\**\*.Tests.dll + !test\DotNetty.Suite.Tests\bin\$(configuration)\net6.0\**\*.Tests.dll + !test\DotNetty.Handlers.Proxy.Tests\bin\$(configuration)\net6.0\**\*.Tests.dll + resultsFolder: '$(Build.SourcesDirectory)\TestResults' + testRunTitle: 'test (net6.0)' + configuration: '$(configuration)' + publishRunAttachments: true + - task: VSTest@2 + displayName: 'test (net8.0)' + inputs: + testSelector: 'testAssemblies' + testAssemblyVer2: | + test\*.Tests\bin\$(configuration)\net8.0\**\*.Tests.dll + !test\DotNetty.Transport.Tests\bin\$(configuration)\net8.0\**\*.Tests.dll + !test\DotNetty.Suite.Tests\bin\$(configuration)\net8.0\**\*.Tests.dll + !test\DotNetty.Handlers.Proxy.Tests\bin\$(configuration)\net8.0\**\*.Tests.dll + resultsFolder: '$(Build.SourcesDirectory)\TestResults' + testRunTitle: 'test (net8.0)' + configuration: '$(configuration)' + publishRunAttachments: true + - task: VSTest@2 + displayName: 'test (net9.0)' + inputs: + testSelector: 'testAssemblies' + testAssemblyVer2: | + test\*.Tests\bin\$(configuration)\net9.0\**\*.Tests.dll + !test\DotNetty.Transport.Tests\bin\$(configuration)\net9.0\**\*.Tests.dll + !test\DotNetty.Suite.Tests\bin\$(configuration)\net9.0\**\*.Tests.dll + !test\DotNetty.Handlers.Proxy.Tests\bin\$(configuration)\net9.0\**\*.Tests.dll + resultsFolder: '$(Build.SourcesDirectory)\TestResults' + testRunTitle: 'test (net9.0)' + configuration: '$(configuration)' + publishRunAttachments: true - stage: Ubuntu 22 displayName: Ubuntu 22 dependsOn: [] From 7d437846e72c20493ef2da66b168fe8739a3d238 Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 10:45:14 -0800 Subject: [PATCH 06/18] fix stage names --- build/pr-validation.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index c4ec0738..36fd1d08 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -15,7 +15,7 @@ variables: value: Release stages: -- stage: Windows 2022 +- stage: Windows_2022 displayName: Windows 2022 jobs: - job: default @@ -89,7 +89,7 @@ stages: testRunTitle: 'test (net9.0)' configuration: '$(configuration)' publishRunAttachments: true -- stage: Ubuntu 22 +- stage: Ubuntu_22 displayName: Ubuntu 22 dependsOn: [] jobs: From ba5b8bb7a986de10d11a462fcf0e08bec54ee78d Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 11:32:27 -0800 Subject: [PATCH 07/18] templatize windows test configuration --- build/pr-validation.yaml | 151 ++++++++++++++++++++++++--------------- 1 file changed, 92 insertions(+), 59 deletions(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index 36fd1d08..5a399440 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -9,9 +9,23 @@ pr: name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) +parameters: + - name: windowsTestConfig + displayName: Configuration for windows test jobs + type: object + default: + net471: + exclusion: [ "DotNetty.Suite.Tests", "DotNetty.Buffers.ReaderWriter.Tests"] + net6.0: + exclusion: [ "DotNetty.Transport.Tests", "DotNetty.Suite.Tests", "DotNetty.Handlers.Proxy.Tests"] + net8.0: + exclusion: [ "DotNetty.Transport.Tests", "DotNetty.Suite.Tests", "DotNetty.Handlers.Proxy.Tests"] + net9.0: + exclusion: [ "DotNetty.Transport.Tests", "DotNetty.Suite.Tests", "DotNetty.Handlers.Proxy.Tests"] + variables: - template: variables/nuget.yml -- name: configuration +- name: buildConfiguration value: Release stages: @@ -31,64 +45,83 @@ stages: displayName: 'build' inputs: solution: 'DotNetty.sln' - configuration: '$(configuration)' + configuration: '$(buildConfiguration)' maximumCpuCount: true - - task: VSTest@2 - displayName: 'test (net472)' - inputs: - testSelector: 'testAssemblies' - testAssemblyVer2: | - test\*.Tests\bin\$(configuration)\net4*\**\*.Tests.dll - !test\DotNetty.Suite.Tests\bin\$(configuration)\net4*\**\*.Tests.dll - !test\DotNetty.Buffers.ReaderWriter.Tests\bin\$(configuration)\net4*\**\*.Tests.dll - resultsFolder: '$(Build.SourcesDirectory)\TestResults' - testRunTitle: 'test (net472)' - configuration: '$(configuration)' - publishRunAttachments: true - #runSettingsFile: '$(Build.SourcesDirectory)\cit.runsettings' - #runInParallel: true - #codeCoverageEnabled: true - #failOnMinTestsNotRun: true - #rerunFailedTests: true - - task: VSTest@2 - displayName: 'test (net6.0)' - inputs: - testSelector: 'testAssemblies' - testAssemblyVer2: | - test\*.Tests\bin\$(configuration)\net6.0\**\*.Tests.dll - !test\DotNetty.Transport.Tests\bin\$(configuration)\net6.0\**\*.Tests.dll - !test\DotNetty.Suite.Tests\bin\$(configuration)\net6.0\**\*.Tests.dll - !test\DotNetty.Handlers.Proxy.Tests\bin\$(configuration)\net6.0\**\*.Tests.dll - resultsFolder: '$(Build.SourcesDirectory)\TestResults' - testRunTitle: 'test (net6.0)' - configuration: '$(configuration)' - publishRunAttachments: true - - task: VSTest@2 - displayName: 'test (net8.0)' - inputs: - testSelector: 'testAssemblies' - testAssemblyVer2: | - test\*.Tests\bin\$(configuration)\net8.0\**\*.Tests.dll - !test\DotNetty.Transport.Tests\bin\$(configuration)\net8.0\**\*.Tests.dll - !test\DotNetty.Suite.Tests\bin\$(configuration)\net8.0\**\*.Tests.dll - !test\DotNetty.Handlers.Proxy.Tests\bin\$(configuration)\net8.0\**\*.Tests.dll - resultsFolder: '$(Build.SourcesDirectory)\TestResults' - testRunTitle: 'test (net8.0)' - configuration: '$(configuration)' - publishRunAttachments: true - - task: VSTest@2 - displayName: 'test (net9.0)' - inputs: - testSelector: 'testAssemblies' - testAssemblyVer2: | - test\*.Tests\bin\$(configuration)\net9.0\**\*.Tests.dll - !test\DotNetty.Transport.Tests\bin\$(configuration)\net9.0\**\*.Tests.dll - !test\DotNetty.Suite.Tests\bin\$(configuration)\net9.0\**\*.Tests.dll - !test\DotNetty.Handlers.Proxy.Tests\bin\$(configuration)\net9.0\**\*.Tests.dll - resultsFolder: '$(Build.SourcesDirectory)\TestResults' - testRunTitle: 'test (net9.0)' - configuration: '$(configuration)' - publishRunAttachments: true + - ${{ each testConfig in parameters.windowsTestConfig }}: + - task: VSTest@2 + displayName: 'test (${{ testConfig }})' + inputs: + testSelector: 'testAssemblies' + testAssemblyVer2: | + test\*.Tests\bin\$(buildConfiguration)\${{ testConfig }}\**\*.Tests.dll + ${{ each proj in parameters.windowsTestConfig[testConfig].exclusion }}: + !test\${{ proj }}\bin\$(buildConfiguration)\${{ testConfig }}\**\*.Tests.dll + resultsFolder: '$(Build.SourcesDirectory)\TestResults' + testRunTitle: 'test (${{ testConfig }})' + configuration: '$(buildConfiguration)' + publishRunAttachments: true + #runSettingsFile: '$(Build.SourcesDirectory)\cit.runsettings' + #runInParallel: true + #codeCoverageEnabled: true + #failOnMinTestsNotRun: true + #rerunFailedTests: true + + # - task: VSTest@2 + # displayName: 'test (net472)' + # inputs: + # testSelector: 'testAssemblies' + # testAssemblyVer2: | + # test\*.Tests\bin\$(buildConfiguration)\net4*\**\*.Tests.dll + # !test\DotNetty.Suite.Tests\bin\$(buildConfiguration)\net4*\**\*.Tests.dll + # !test\DotNetty.Buffers.ReaderWriter.Tests\bin\$(buildConfiguration)\net4*\**\*.Tests.dll + # resultsFolder: '$(Build.SourcesDirectory)\TestResults' + # testRunTitle: 'test (net472)' + # configuration: '$(buildConfiguration)' + # publishRunAttachments: true + # #runSettingsFile: '$(Build.SourcesDirectory)\cit.runsettings' + # #runInParallel: true + # #codeCoverageEnabled: true + # #failOnMinTestsNotRun: true + # #rerunFailedTests: true + # - task: VSTest@2 + # displayName: 'test (net6.0)' + # inputs: + # testSelector: 'testAssemblies' + # testAssemblyVer2: | + # test\*.Tests\bin\$(buildConfiguration)\net6.0\**\*.Tests.dll + # !test\DotNetty.Transport.Tests\bin\$(buildConfiguration)\net6.0\**\*.Tests.dll + # !test\DotNetty.Suite.Tests\bin\$(buildConfiguration)\net6.0\**\*.Tests.dll + # !test\DotNetty.Handlers.Proxy.Tests\bin\$(buildConfiguration)\net6.0\**\*.Tests.dll + # resultsFolder: '$(Build.SourcesDirectory)\TestResults' + # testRunTitle: 'test (net6.0)' + # configuration: '$(buildConfiguration)' + # publishRunAttachments: true + # - task: VSTest@2 + # displayName: 'test (net8.0)' + # inputs: + # testSelector: 'testAssemblies' + # testAssemblyVer2: | + # test\*.Tests\bin\$(buildConfiguration)\net8.0\**\*.Tests.dll + # !test\DotNetty.Transport.Tests\bin\$(buildConfiguration)\net8.0\**\*.Tests.dll + # !test\DotNetty.Suite.Tests\bin\$(buildConfiguration)\net8.0\**\*.Tests.dll + # !test\DotNetty.Handlers.Proxy.Tests\bin\$(buildConfiguration)\net8.0\**\*.Tests.dll + # resultsFolder: '$(Build.SourcesDirectory)\TestResults' + # testRunTitle: 'test (net8.0)' + # configuration: '$(buildConfiguration)' + # publishRunAttachments: true + # - task: VSTest@2 + # displayName: 'test (net9.0)' + # inputs: + # testSelector: 'testAssemblies' + # testAssemblyVer2: | + # test\*.Tests\bin\$(buildConfiguration)\net9.0\**\*.Tests.dll + # !test\DotNetty.Transport.Tests\bin\$(buildConfiguration)\net9.0\**\*.Tests.dll + # !test\DotNetty.Suite.Tests\bin\$(buildConfiguration)\net9.0\**\*.Tests.dll + # !test\DotNetty.Handlers.Proxy.Tests\bin\$(buildConfiguration)\net9.0\**\*.Tests.dll + # resultsFolder: '$(Build.SourcesDirectory)\TestResults' + # testRunTitle: 'test (net9.0)' + # configuration: '$(buildConfiguration)' + # publishRunAttachments: true - stage: Ubuntu_22 displayName: Ubuntu 22 dependsOn: [] @@ -107,7 +140,7 @@ stages: inputs: command: 'build' projects: 'DotNetty.sln' - configuration: $(configuration) + configuration: $(buildConfiguration) arguments: '-m' #maximumCpuCount: true From 7deebc8e2dfcaeca5ae6c39807b76a5171117537 Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 11:42:26 -0800 Subject: [PATCH 08/18] templatize windows test configuration --- build/pr-validation.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index 5a399440..11e42351 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -53,9 +53,8 @@ stages: inputs: testSelector: 'testAssemblies' testAssemblyVer2: | - test\*.Tests\bin\$(buildConfiguration)\${{ testConfig }}\**\*.Tests.dll ${{ each proj in parameters.windowsTestConfig[testConfig].exclusion }}: - !test\${{ proj }}\bin\$(buildConfiguration)\${{ testConfig }}\**\*.Tests.dll + !test\${{ proj }}\bin\$(buildConfiguration)\${{ testConfig }}\**\*.Tests.dll resultsFolder: '$(Build.SourcesDirectory)\TestResults' testRunTitle: 'test (${{ testConfig }})' configuration: '$(buildConfiguration)' From d155baeb7e48e240ac830ef1d16e48e9e977f295 Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 14:54:51 -0800 Subject: [PATCH 09/18] use join instead of each --- build/pr-validation.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index 11e42351..4d1b67d0 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -52,9 +52,9 @@ stages: displayName: 'test (${{ testConfig }})' inputs: testSelector: 'testAssemblies' - testAssemblyVer2: | - ${{ each proj in parameters.windowsTestConfig[testConfig].exclusion }}: - !test\${{ proj }}\bin\$(buildConfiguration)\${{ testConfig }}\**\*.Tests.dll + testAssemblyVer2: | + test\*.Tests\bin\$(buildConfiguration)\${{ testConfig }}\**\*.Tests.dll + ${{ join('\n!test\\', parameters.windowsTestConfig[testConfig].exclusion) }} resultsFolder: '$(Build.SourcesDirectory)\TestResults' testRunTitle: 'test (${{ testConfig }})' configuration: '$(buildConfiguration)' From f2e363d8e35a543c8c4dd3ee265b2634bda8a6cc Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 14:56:53 -0800 Subject: [PATCH 10/18] temporarily remove exclusion --- build/pr-validation.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index 4d1b67d0..3be4ccbb 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -54,7 +54,6 @@ stages: testSelector: 'testAssemblies' testAssemblyVer2: | test\*.Tests\bin\$(buildConfiguration)\${{ testConfig }}\**\*.Tests.dll - ${{ join('\n!test\\', parameters.windowsTestConfig[testConfig].exclusion) }} resultsFolder: '$(Build.SourcesDirectory)\TestResults' testRunTitle: 'test (${{ testConfig }})' configuration: '$(buildConfiguration)' From fcfbb978c9ce7729c454da051da9464d6ab50909 Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 15:09:19 -0800 Subject: [PATCH 11/18] use key property --- build/pr-validation.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index 3be4ccbb..b0280351 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -49,10 +49,10 @@ stages: maximumCpuCount: true - ${{ each testConfig in parameters.windowsTestConfig }}: - task: VSTest@2 - displayName: 'test (${{ testConfig }})' + displayName: 'test (${{ testConfig.key }})' inputs: testSelector: 'testAssemblies' - testAssemblyVer2: | + testAssemblyVer2: | test\*.Tests\bin\$(buildConfiguration)\${{ testConfig }}\**\*.Tests.dll resultsFolder: '$(Build.SourcesDirectory)\TestResults' testRunTitle: 'test (${{ testConfig }})' From 8d1137c3bbd576c26199a1ebae1e75c258918807 Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 15:10:40 -0800 Subject: [PATCH 12/18] don't parametrize test filter --- build/pr-validation.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index b0280351..9a45cf79 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -49,11 +49,11 @@ stages: maximumCpuCount: true - ${{ each testConfig in parameters.windowsTestConfig }}: - task: VSTest@2 - displayName: 'test (${{ testConfig.key }})' + displayName: 'test (${{ testConfig }})' inputs: testSelector: 'testAssemblies' testAssemblyVer2: | - test\*.Tests\bin\$(buildConfiguration)\${{ testConfig }}\**\*.Tests.dll + test\*.Tests\bin\$(buildConfiguration)\net4*\**\*.Tests.dll resultsFolder: '$(Build.SourcesDirectory)\TestResults' testRunTitle: 'test (${{ testConfig }})' configuration: '$(buildConfiguration)' From c9dde4758d36f24a636793094db093f3478efe40 Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 15:14:37 -0800 Subject: [PATCH 13/18] define two parameters as iterator --- build/pr-validation.yaml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index 9a45cf79..efb7b641 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -47,17 +47,21 @@ stages: solution: 'DotNetty.sln' configuration: '$(buildConfiguration)' maximumCpuCount: true - - ${{ each testConfig in parameters.windowsTestConfig }}: - - task: VSTest@2 - displayName: 'test (${{ testConfig }})' - inputs: - testSelector: 'testAssemblies' - testAssemblyVer2: | - test\*.Tests\bin\$(buildConfiguration)\net4*\**\*.Tests.dll - resultsFolder: '$(Build.SourcesDirectory)\TestResults' - testRunTitle: 'test (${{ testConfig }})' - configuration: '$(buildConfiguration)' - publishRunAttachments: true + - ${{ each netVersion, config in parameters.windowsTestConfig }}: + - script: | + echo "Testing for .NET version: ${{ netVersion }}" + echo "Excluding folders: ${{ join(config.exclusion, ', ') }}" + # - ${{ each testConfig in parameters.windowsTestConfig }}: + # - task: VSTest@2 + # displayName: 'test (${{ testConfig }})' + # inputs: + # testSelector: 'testAssemblies' + # testAssemblyVer2: | + # test\*.Tests\bin\$(buildConfiguration)\net4*\**\*.Tests.dll + # resultsFolder: '$(Build.SourcesDirectory)\TestResults' + # testRunTitle: 'test (${{ testConfig }})' + # configuration: '$(buildConfiguration)' + # publishRunAttachments: true #runSettingsFile: '$(Build.SourcesDirectory)\cit.runsettings' #runInParallel: true #codeCoverageEnabled: true From d3e724e13747b8133395944801b47b68207f3c2e Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 15:15:48 -0800 Subject: [PATCH 14/18] define two parameters as iterator --- build/pr-validation.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index efb7b641..c268620d 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -47,9 +47,9 @@ stages: solution: 'DotNetty.sln' configuration: '$(buildConfiguration)' maximumCpuCount: true - - ${{ each netVersion, config in parameters.windowsTestConfig }}: + - ${{ each config in parameters.windowsTestConfig }}: - script: | - echo "Testing for .NET version: ${{ netVersion }}" + echo "Testing for .NET version: ${{ config }}" echo "Excluding folders: ${{ join(config.exclusion, ', ') }}" # - ${{ each testConfig in parameters.windowsTestConfig }}: # - task: VSTest@2 From baba5c80822c506619fb1945645f5d9100283969 Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 15:20:04 -0800 Subject: [PATCH 15/18] use config.key --- build/pr-validation.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index c268620d..c1da11c1 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -49,8 +49,7 @@ stages: maximumCpuCount: true - ${{ each config in parameters.windowsTestConfig }}: - script: | - echo "Testing for .NET version: ${{ config }}" - echo "Excluding folders: ${{ join(config.exclusion, ', ') }}" + echo "Testing for .NET version: ${{ config.key }}" # - ${{ each testConfig in parameters.windowsTestConfig }}: # - task: VSTest@2 # displayName: 'test (${{ testConfig }})' From 65b9d6c9b4c2ef56106e239bb68750e29220e38a Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 17:55:20 -0800 Subject: [PATCH 16/18] templatize vstest with exclusion --- build/pr-validation.yaml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index c1da11c1..b36702cb 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -47,20 +47,21 @@ stages: solution: 'DotNetty.sln' configuration: '$(buildConfiguration)' maximumCpuCount: true - - ${{ each config in parameters.windowsTestConfig }}: - - script: | - echo "Testing for .NET version: ${{ config.key }}" - # - ${{ each testConfig in parameters.windowsTestConfig }}: - # - task: VSTest@2 - # displayName: 'test (${{ testConfig }})' - # inputs: - # testSelector: 'testAssemblies' - # testAssemblyVer2: | - # test\*.Tests\bin\$(buildConfiguration)\net4*\**\*.Tests.dll - # resultsFolder: '$(Build.SourcesDirectory)\TestResults' - # testRunTitle: 'test (${{ testConfig }})' - # configuration: '$(buildConfiguration)' - # publishRunAttachments: true + # - ${{ each config in parameters.windowsTestConfig }}: + # - script: | + # echo "Testing for .NET version: ${{ config.key }}" + - ${{ each testConfig in parameters.windowsTestConfig }}: + - task: VSTest@2 + displayName: 'test (${{ testConfig.key }})' + inputs: + testSelector: 'testAssemblies' + testAssemblyVer2: | + test\*.Tests\bin\$(buildConfiguration)\${{ testConfig.key }}\**\*.Tests.dll + ${{ join(testConfig.exclusion, '\n!test\\') | replace('!', '!test\\') }}\bin\$(buildConfiguration)\${{ testConfig.key }}\**\*.Tests.dll + resultsFolder: '$(Build.SourcesDirectory)\TestResults' + testRunTitle: 'test (${{ testConfig.key }})' + configuration: '$(buildConfiguration)' + publishRunAttachments: true #runSettingsFile: '$(Build.SourcesDirectory)\cit.runsettings' #runInParallel: true #codeCoverageEnabled: true From 23a28600a5a1cc58b012e3b0b63d81f6c6080e4d Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 17:55:48 -0800 Subject: [PATCH 17/18] remove unsupported pipe --- build/pr-validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index b36702cb..15aa2435 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -57,7 +57,7 @@ stages: testSelector: 'testAssemblies' testAssemblyVer2: | test\*.Tests\bin\$(buildConfiguration)\${{ testConfig.key }}\**\*.Tests.dll - ${{ join(testConfig.exclusion, '\n!test\\') | replace('!', '!test\\') }}\bin\$(buildConfiguration)\${{ testConfig.key }}\**\*.Tests.dll + ${{ join(testConfig.exclusion, '\n!test\\') resultsFolder: '$(Build.SourcesDirectory)\TestResults' testRunTitle: 'test (${{ testConfig.key }})' configuration: '$(buildConfiguration)' From 41703d6d56567be6c86759f902ffdd616ca6c7c4 Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Mon, 20 Jan 2025 17:56:24 -0800 Subject: [PATCH 18/18] close expression --- build/pr-validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pr-validation.yaml b/build/pr-validation.yaml index 15aa2435..753f8e09 100644 --- a/build/pr-validation.yaml +++ b/build/pr-validation.yaml @@ -57,7 +57,7 @@ stages: testSelector: 'testAssemblies' testAssemblyVer2: | test\*.Tests\bin\$(buildConfiguration)\${{ testConfig.key }}\**\*.Tests.dll - ${{ join(testConfig.exclusion, '\n!test\\') + ${{ join(testConfig.exclusion, '\n!test\\') }} resultsFolder: '$(Build.SourcesDirectory)\TestResults' testRunTitle: 'test (${{ testConfig.key }})' configuration: '$(buildConfiguration)'