This is an automated email from the ASF dual-hosted git repository. nightowl888 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit b1b0e03b48aee5b95737c8dcf77fe72b01a3b247 Author: Shad Storhaug <[email protected]> AuthorDate: Sat Nov 19 15:11:16 2022 +0700 azure-pipelines.yml: Added tests for net7.0 --- .../publish-test-results-for-test-projects.yml | 18 ++---- .build/azure-templates/run-tests-on-os.yml | 8 +++ azure-pipelines.yml | 69 +++++++++++++++++++++- 3 files changed, 80 insertions(+), 15 deletions(-) diff --git a/.build/azure-templates/publish-test-results-for-test-projects.yml b/.build/azure-templates/publish-test-results-for-test-projects.yml index 2f54790df..7ee98b752 100644 --- a/.build/azure-templates/publish-test-results-for-test-projects.yml +++ b/.build/azure-templates/publish-test-results-for-test-projects.yml @@ -70,7 +70,7 @@ steps: # displayName: 'Validate Template Parameters' -# Special case: Only supports .NET Standard 2.0 +# Special case: Only supports .NET Standard 1.3 - template: publish-test-results.yml parameters: testProjectName: 'Lucene.Net.Tests.CodeAnalysis' @@ -81,21 +81,11 @@ steps: testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' -# Special case: Only supports net6.0, net5.0, and netcoreapp3.1 +# Special case: Only supports net7.0 and net6.0 - template: publish-test-results.yml parameters: testProjectName: 'Lucene.Net.Tests.Cli' - framework: 'net6.0' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml - vsTestPlatform: '${{ parameters.vsTestPlatform }}' - osName: '${{ parameters.osName }}' - testResultsFormat: '${{ parameters.testResultsFormat }}' - testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' - testResultsFileName: '${{ parameters.testResultsFileName }}' - -- template: publish-test-results.yml - parameters: - testProjectName: 'Lucene.Net.Tests.Cli' - framework: 'net5.0' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml + framework: 'net7.0' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml vsTestPlatform: '${{ parameters.vsTestPlatform }}' osName: '${{ parameters.osName }}' testResultsFormat: '${{ parameters.testResultsFormat }}' @@ -105,7 +95,7 @@ steps: - template: publish-test-results.yml parameters: testProjectName: 'Lucene.Net.Tests.Cli' - framework: 'netcoreapp3.1' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml + framework: 'net6.0' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml vsTestPlatform: '${{ parameters.vsTestPlatform }}' osName: '${{ parameters.osName }}' testResultsFormat: '${{ parameters.testResultsFormat }}' diff --git a/.build/azure-templates/run-tests-on-os.yml b/.build/azure-templates/run-tests-on-os.yml index 9250f0bee..146a79835 100644 --- a/.build/azure-templates/run-tests-on-os.yml +++ b/.build/azure-templates/run-tests-on-os.yml @@ -104,6 +104,14 @@ steps: performMultiLevelLookup: '${{ variables.PerformMultiLevelLookup }}' condition: and(succeeded(), contains('${{ parameters.framework }}', 'net5.')) +- task: UseDotNet@2 + displayName: 'Use .NET sdk 6.0.403' + inputs: + packageType: 'sdk' + version: '5.0.403' + performMultiLevelLookup: '${{ variables.PerformMultiLevelLookup }}' + condition: and(succeeded(), contains('${{ parameters.framework }}', 'net6.')) + #- template: 'show-all-files.yml' # Uncomment for debugging - pwsh: | $framework = '${{ parameters.framework }}' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3f3341dbf..513b30aca 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -55,7 +55,7 @@ variables: - name: BuildCounter value: $[counter(variables['VersionSuffix'],coalesce(variables['BuildCounterSeed'], 1250))] - name: DotNetSDKVersion - value: '6.0.100' + value: '7.0.100' - name: DocumentationArtifactName value: 'docs' - name: DocumentationArtifactZipFileName @@ -229,6 +229,13 @@ stages: publishLocation: 'pipeline' condition: and(succeeded(), ne(variables['ArtifactFeedID'], '')) + - template: '.build/azure-templates/publish-test-binaries.yml' + parameters: + publishDirectory: $(PublishTempDirectory) + framework: 'net7.0' + binaryArtifactName: '$(BinaryArtifactName)' + testSettingsFilePath: '$(Build.ArtifactStagingDirectory)/$(TestSettingsFileName)' + - template: '.build/azure-templates/publish-test-binaries.yml' parameters: publishDirectory: $(PublishTempDirectory) @@ -318,6 +325,66 @@ stages: displayName: 'Test Stage:' jobs: + - job: Test_net7_0_x64 + condition: and(succeeded(), ne(variables['RunTests'], 'false')) + strategy: + matrix: + Windows: + osName: 'Windows' + imageName: 'windows-latest' + maximumParallelJobs: 8 + maximumAllowedFailures: 0 # Maximum allowed failures for a successful build + Linux: + osName: 'Linux' + imageName: 'ubuntu-latest' + maximumParallelJobs: 7 + maximumAllowedFailures: 0 # Maximum allowed failures for a successful build + macOS: + osName: 'macOS' + imageName: 'macOS-latest' + maximumParallelJobs: 7 + maximumAllowedFailures: 0 # Maximum allowed failures for a successful build + displayName: 'Test net7.0,x64 on' + pool: + vmImage: $(imageName) + steps: + - template: '.build/azure-templates/run-tests-on-os.yml' + parameters: + osName: $(osName) + framework: 'net7.0' + vsTestPlatform: 'x64' + testBinariesArtifactName: '$(TestBinariesArtifactName)' + nugetArtifactName: '$(NuGetArtifactName)' + testResultsArtifactName: '$(TestResultsArtifactName)' + maximumParallelJobs: $(maximumParallelJobs) + maximumAllowedFailures: $(maximumAllowedFailures) + dotNetSdkVersion: '$(DotNetSDKVersion)' + + - job: Test_net7_0_x86 # Only run Nightly or if explicitly enabled with RunX86Tests + condition: and(succeeded(), ne(variables['RunTests'], 'false'), or(eq(variables['IsNightly'], 'true'), eq(variables['RunX86Tests'], 'true'))) + strategy: + matrix: + Windows: + osName: 'Windows' + imageName: 'windows-latest' + maximumParallelJobs: 8 + maximumAllowedFailures: 0 # Maximum allowed failures for a successful build + displayName: 'Test net7.0,x86 on' + pool: + vmImage: $(imageName) + steps: + - template: '.build/azure-templates/run-tests-on-os.yml' + parameters: + osName: $(osName) + framework: 'net7.0' + vsTestPlatform: 'x86' + testBinariesArtifactName: '$(TestBinariesArtifactName)' + nugetArtifactName: '$(NuGetArtifactName)' + testResultsArtifactName: '$(TestResultsArtifactName)' + maximumParallelJobs: $(maximumParallelJobs) + maximumAllowedFailures: $(maximumAllowedFailures) + dotNetSdkVersion: '$(DotNetSDKVersion)' + - job: Test_net6_0_x64 condition: and(succeeded(), ne(variables['RunTests'], 'false')) strategy:
