lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [lucenenet] branch master updated: Changed build to always use 1 target framework per VM and refactored test binaries so they will be smaller to download per VM.
Date Thu, 02 Apr 2020 12:08:37 GMT
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


The following commit(s) were added to refs/heads/master by this push:
     new db53430  Changed build to always use 1 target framework per VM and refactored test
binaries so they will be smaller to download per VM.
db53430 is described below

commit db5343012ff9cbf0936c4a61abc3412decb9b7a0
Author: Shad Storhaug <shad@shadstorhaug.com>
AuthorDate: Thu Apr 2 06:32:38 2020 +0700

    Changed build to always use 1 target framework per VM and refactored test binaries so
they will be smaller to download per VM.
    
    * Increased maximum parallel jobs
    
    * Eliminated publish-test-results-for-target-frameworks.yml
    
    * Setup publish-test-results-for-target-frameworks.yml to accept a framework parameter
    
    * run-tests-on-os.yml: Changed template to only support a single target framework
    
    * Changed pipeline to zip each target framework's test binaries individually, so downloads
don't take so long
---
 Lucene.Net.sln                                     |  23 +++-
 azure-pipelines.yml                                |  34 ++++--
 .../publish-test-results-for-target-frameworks.yml |  67 ------------
 .../publish-test-results-for-test-projects.yml     | 116 +++++++++++++--------
 build/azure-templates/run-tests-on-os.yml          |  23 ++--
 5 files changed, 131 insertions(+), 132 deletions(-)

diff --git a/Lucene.Net.sln b/Lucene.Net.sln
index b19c811..3e222f8 100644
--- a/Lucene.Net.sln
+++ b/Lucene.Net.sln
@@ -1,11 +1,28 @@
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.29728.190
+# Visual Studio 15
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+VisualStudioVersion = 15.0.26730.8
 MinimumVisualStudioVersion = 15.0.26730.8
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "azure-templates", "azure-templates",
"{05CE3A39-40D4-452D-AFE0-E57E536A08C6}"
 	ProjectSection(SolutionItems) = preProject
 		build\azure-templates\publish-nuget-packages.yml = build\azure-templates\publish-nuget-packages.yml
-		build\azure-templates\publish-test-results-for-target-frameworks.yml = build\azure-templates\publish-test-results-for-target-frameworks.yml
 		build\azure-templates\publish-test-results-for-test-projects.yml = build\azure-templates\publish-test-results-for-test-projects.yml
 		build\azure-templates\publish-test-results.yml = build\azure-templates\publish-test-results.yml
 		build\azure-templates\run-tests-on-os.yml = build\azure-templates\run-tests-on-os.yml
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index d3d2b30..5712013 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -117,11 +117,27 @@ stages:
     - template: 'build/azure-templates/show-all-environment-variables.yml'
 
     - task: ArchiveFiles@2
-      displayName: 'Zip $(PublishTempDirectory)'
+      displayName: 'Zip $(PublishTempDirectory)/netcoreapp3.1'
       inputs:
-        rootFolderOrFile: '$(PublishTempDirectory)'
+        rootFolderOrFile: '$(PublishTempDirectory)/netcoreapp3.1'
         includeRootFolder: false
-        archiveFile: '$(PublishDirectory)/$(PublishedArtifactZipFileName)'
+        archiveFile: '$(PublishDirectory)/netcoreapp3.1/$(PublishedArtifactZipFileName)'
+      condition: and(succeeded(), ne(variables['RunTests'], 'false'))
+
+    - task: ArchiveFiles@2
+      displayName: 'Zip $(PublishTempDirectory)/netcoreapp2.2'
+      inputs:
+        rootFolderOrFile: '$(PublishTempDirectory)/netcoreapp2.2'
+        includeRootFolder: false
+        archiveFile: '$(PublishDirectory)/netcoreapp2.2/$(PublishedArtifactZipFileName)'
+      condition: and(succeeded(), ne(variables['RunTests'], 'false'))
+
+    - task: ArchiveFiles@2
+      displayName: 'Zip $(PublishTempDirectory)/net48'
+      inputs:
+        rootFolderOrFile: '$(PublishTempDirectory)/net48'
+        includeRootFolder: false
+        archiveFile: '$(PublishDirectory)/net48/$(PublishedArtifactZipFileName)'
       condition: and(succeeded(), ne(variables['RunTests'], 'false'))
 
     - powershell: |
@@ -257,10 +273,10 @@ stages:
     - template: 'build/azure-templates/run-tests-on-os.yml'
       parameters:
         osName: $(osName)
-        testTargetFrameworks: 'netcoreapp3.1'
+        framework: 'netcoreapp3.1'
         testResultsArtifactName: '$(TestResultsArtifactName)'
         publishedArtifactZipFileName: '$(PublishedArtifactZipFileName)'
-        maximumParallelJobs: 7
+        maximumParallelJobs: 8
         maximumAllowedFailures: $(maximumAllowedFailures)
 
   - job: Test_netcoreapp2_2
@@ -286,10 +302,10 @@ stages:
     - template: 'build/azure-templates/run-tests-on-os.yml'
       parameters:
         osName: $(osName)
-        testTargetFrameworks: 'netcoreapp2.2'
+        framework: 'netcoreapp2.2'
         testResultsArtifactName: '$(TestResultsArtifactName)'
         publishedArtifactZipFileName: '$(PublishedArtifactZipFileName)'
-        maximumParallelJobs: 7
+        maximumParallelJobs: 8
         maximumAllowedFailures: $(maximumAllowedFailures)
 
   - job: Test_net48_Windows
@@ -301,10 +317,10 @@ stages:
     - template: 'build/azure-templates/run-tests-on-os.yml'
       parameters:
         osName: 'Windows'
-        testTargetFrameworks: 'net48'
+        framework: 'net48'
         testResultsArtifactName: '$(TestResultsArtifactName)'
         publishedArtifactZipFileName: '$(PublishedArtifactZipFileName)'
-        maximumParallelJobs: 8
+        maximumParallelJobs: 9
         maximumAllowedFailures: 4 # Maximum allowed failures for a successful build
 
 
diff --git a/build/azure-templates/publish-test-results-for-target-frameworks.yml b/build/azure-templates/publish-test-results-for-target-frameworks.yml
deleted file mode 100644
index 6c0c982..0000000
--- a/build/azure-templates/publish-test-results-for-target-frameworks.yml
+++ /dev/null
@@ -1,67 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# Runs Publish Test Results task for a specific framework
-
-parameters:
-  testProjectName: '' # The name of the test project
-  osName: '' # The name of the operating system for display purposes.
-  testResultsFormat: VSTest # Specify the format of the results files you want to publish.
The following formats are supported: JUnit, NUnit, VSTest, XUnit, CTest
-  testResultsArtifactName: 'testresults' # The name of the Azure DevOps build artifact where
the test results will be published. Default 'testresults'.
-  testResultsFileName: 'TestResults.trx' # The name of the file (not path) of the test results.
Default 'TestResults.trx'.
-
-steps:
-#- powershell: |
-#    function EnsureNotNullOrEmpty([string]$param, [string]$nameOfParam) {
-#        if ([string]::IsNullOrEmpty($param)) {
-#            Write-Host "##vso[task.logissue type=error;]Missing template parameter \"$nameOfParam\""
-#            Write-Host "##vso[task.complete result=Failed;]"
-#        }
-#    }
-#    EnsureNotNullOrEmpty('${{ parameters.testProjectName }}', 'testProjectName')
-#    EnsureNotNullOrEmpty('${{ parameters.osName }}', 'osName')
-#    EnsureNotNullOrEmpty('${{ parameters.testResultsFormat }}', 'testResultsFormat')
-#    EnsureNotNullOrEmpty('${{ parameters.testResultsArtifactName }}', 'testResultsArtifactName')
-#    EnsureNotNullOrEmpty('${{ parameters.testResultsFileName }}', 'testResultsFileName')
-#  displayName: 'Validate Template Parameters'
-
-- template: publish-test-results.yml
-  parameters:
-    framework: 'netcoreapp3.1'
-    testProjectName: '${{ parameters.testProjectName }}'
-    osName: '${{ parameters.osName }}'
-    testResultsFormat: '${{ parameters.testResultsFormat }}'
-    testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
-    testResultsFileName: '${{ parameters.testResultsFileName }}'
-
-- template: publish-test-results.yml
-  parameters:
-    framework: 'netcoreapp2.2'
-    testProjectName: '${{ parameters.testProjectName }}'
-    osName: '${{ parameters.osName }}'
-    testResultsFormat: '${{ parameters.testResultsFormat }}'
-    testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
-    testResultsFileName: '${{ parameters.testResultsFileName }}'
-
-- template: publish-test-results.yml
-  parameters:
-    framework: 'net48'
-    testProjectName: '${{ parameters.testProjectName }}'
-    osName: '${{ parameters.osName }}'
-    testResultsFormat: '${{ parameters.testResultsFormat }}'
-    testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
-    testResultsFileName: '${{ parameters.testResultsFileName }}'
\ No newline at end of file
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 1f1f3ef..3cc61d1 100644
--- a/build/azure-templates/publish-test-results-for-test-projects.yml
+++ b/build/azure-templates/publish-test-results-for-test-projects.yml
@@ -29,10 +29,11 @@
 #    $projectName = [System.IO.Path]::GetFileNameWithoutExtension($testProject)
 #
 #    $block = `
-#        "- template: publish-test-results-for-target-frameworks.yml`n" + `
+#        "- template: publish-test-results.yml`n" + `
 #        "  parameters:`n" + `
 #        "    testProjectName: '$projectName'`n" + `
 #        "    osName: '$`{`{ parameters.osName `}`}'`n" + `
+#        "    framework: '$`{`{ parameters.framework `}`}'`n" + `
 #        "    testResultsFormat: '$`{`{ parameters.testResultsFormat `}`}'`n" + `
 #        "    testResultsArtifactName: '$`{`{ parameters.testResultsArtifactName `}`}'`n"
+ `
 #        "    testResultsFileName: '$`{`{ parameters.testResultsFileName `}`}'`n" + `
@@ -45,6 +46,7 @@
 
 parameters:
   osName: '' # The name of the operating system for display purposes.
+  framework: '' # The target framework to publish.
   testResultsFormat: VSTest # Specify the format of the results files you want to publish.
The following formats are supported: JUnit, NUnit, VSTest, XUnit, CTest
   testResultsArtifactName: 'testresults' # The name of the Azure DevOps build artifact where
the test results will be published. Default 'testresults'.
   testResultsFileName: 'TestResults.trx' # The name of the file (not path) of the test results.
Default 'TestResults.trx'.
@@ -63,18 +65,11 @@ steps:
 #    EnsureNotNullOrEmpty('${{ parameters.testResultsFileName }}', 'testResultsFileName')
 #  displayName: 'Validate Template Parameters'
 
-- template: publish-test-results-for-target-frameworks.yml
-  parameters:
-    testProjectName: 'Lucene.Net.Tests.ICU'
-    osName: '${{ parameters.osName }}'
-    testResultsFormat: '${{ parameters.testResultsFormat }}'
-    testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
-    testResultsFileName: '${{ parameters.testResultsFileName }}'
 
 # Special case: Only supports .NET Standard 2.0
 - template: publish-test-results.yml
   parameters:
-    framework: 'netcoreapp2.2'
+    framework: 'netcoreapp2.2' # Since condtions are not supported for templates, we check
for the file existence within publish-test-results.yml
     testProjectName: 'Lucene.Net.Tests.CodeAnalysis'
     osName: '${{ parameters.osName }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
@@ -84,7 +79,7 @@ steps:
 # Special case: Only supports .netcoreapp3.1
 - template: publish-test-results.yml
   parameters:
-    framework: 'netcoreapp3.1'
+    framework: 'netcoreapp3.1' # Since condtions are not supported for templates, we check
for the file existence within publish-test-results.yml
     testProjectName: 'Lucene.Net.Tests.Cli'
     osName: '${{ parameters.osName }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
@@ -94,7 +89,7 @@ steps:
 # Special case: Only supports .net48
 - template: publish-test-results.yml
   parameters:
-    framework: 'net48'
+    framework: 'net48' # Since condtions are not supported for templates, we check for the
file existence within publish-test-results.yml
     testProjectName: 'Lucene.Net.Tests.Analysis.OpenNLP'
     osName: '${{ parameters.osName }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
@@ -102,234 +97,273 @@ steps:
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
+  parameters:
+    testProjectName: 'Lucene.Net.Tests.ICU'
+    osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
+    testResultsFormat: '${{ parameters.testResultsFormat }}'
+    testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
+    testResultsFileName: '${{ parameters.testResultsFileName }}'
+
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests._A-D'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests._E-I'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests._J-S'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests._T-U'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests._U-Z'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Analysis.Common'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Analysis.Kuromoji'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Analysis.Morfologik'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Analysis.Phonetic'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Analysis.SmartCn'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Analysis.Stempel'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Benchmark'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Classification'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Codecs'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Demo'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Expressions'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Facet'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Grouping'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Highlighter'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Join'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Memory'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Misc'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Queries'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.QueryParser'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Replicator'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Sandbox'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Spatial'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.Suggest'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
     testResultsFileName: '${{ parameters.testResultsFileName }}'
 
-- template: publish-test-results-for-target-frameworks.yml
+- template: publish-test-results.yml
   parameters:
     testProjectName: 'Lucene.Net.Tests.TestFramework'
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
     testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
-    testResultsFileName: '${{ parameters.testResultsFileName }}'
\ No newline at end of file
+    testResultsFileName: '${{ parameters.testResultsFileName }}'
+
diff --git a/build/azure-templates/run-tests-on-os.yml b/build/azure-templates/run-tests-on-os.yml
index 480bb9e..8000748 100644
--- a/build/azure-templates/run-tests-on-os.yml
+++ b/build/azure-templates/run-tests-on-os.yml
@@ -21,7 +21,7 @@
 
 parameters:
   osName: 'Windows' # The name of the operating system for display purposes.
-  testTargetFrameworks: '' # A semicolon separated list of target frameworks indicating which
frameworks tests will be run on. See: https://docs.microsoft.com/en-us/dotnet/standard/frameworks.
+  framework: '' # The target framework indicating which framework tests will be run on. See:
https://docs.microsoft.com/en-us/dotnet/standard/frameworks.
   binaryArtifactName: 'testbinaries' # The name of the Azure DevOps build artifact where
the test assemblies will be downloaded from. Default 'testbinaries'.
   testResultsArtifactName: 'testresults' # The name of the Azure DevOps build artifact where
the test results will be published. Default 'testresults'.
   vsTestPlatform: 'x64' # Target platform architecture used for test execution. Valid values
are x86, x64, and ARM.
@@ -41,7 +41,7 @@ steps:
         }
     }
     EnsureNotNullOrEmpty('${{ parameters.osName }}', 'osName')
-    EnsureNotNullOrEmpty('${{ parameters.testTargetFrameworks }}', 'testTargetFrameworks')
+    EnsureNotNullOrEmpty('${{ parameters.framework }}', 'framework')
     EnsureNotNullOrEmpty('${{ parameters.binaryArtifactName }}', 'binaryArtifactName')
     EnsureNotNullOrEmpty('${{ parameters.testResultsArtifactName }}', 'testResultsArtifactName')
     EnsureNotNullOrEmpty('${{ parameters.vsTestPlatform }}', 'vsTestPlatform')
@@ -56,25 +56,26 @@ steps:
   displayName: 'Use .NET Core sdk 3.1.100'
   inputs:
     version: 3.1.100
-  condition: and(succeeded(), contains('${{ parameters.testTargetFrameworks }}', 'netcoreapp3.'))
+  condition: and(succeeded(), contains('${{ parameters.framework }}', 'netcoreapp3.'))
 
 - task: DownloadBuildArtifacts@0
   displayName: 'Download Build Artifacts: ${{ parameters.binaryArtifactName }}'
   inputs:
     artifactName: ${{ parameters.binaryArtifactName }}
     downloadPath: '$(System.DefaultWorkingDirectory)'
+    itemPattern: '**/${{ parameters.framework }}/*.*'
 
 #- template: 'show-all-files.yml' # Uncomment for debugging
 
 - task: ExtractFiles@1
   displayName: 'Extract files from ${{ parameters.publishedArtifactZipFileName }}'
   inputs:
-    archiveFilePatterns: '${{ parameters.binaryArtifactName }}/${{ parameters.publishedArtifactZipFileName
}}'
-    destinationFolder: '$(System.DefaultWorkingDirectory)/${{ parameters.binaryArtifactName
}}'
+    archiveFilePatterns: '${{ parameters.binaryArtifactName }}/${{ parameters.framework }}/${{
parameters.publishedArtifactZipFileName }}'
+    destinationFolder: '$(System.DefaultWorkingDirectory)/${{ parameters.binaryArtifactName
}}/${{ parameters.framework }}/'
     cleanDestinationFolder: false
 
 - powershell: |
-    $testTargetFrameworksString = '${{ parameters.testTargetFrameworks }}'
+    $framework = '${{ parameters.framework }}'
     $testBinaryRootDirectory = "$(System.DefaultWorkingDirectory)"
     $testResultsArtifactDirectory = "${{ format('$(Build.ArtifactStagingDirectory)/{0}',parameters.testResultsArtifactName)
}}"
     $testPlatform = '${{ parameters.vsTestPlatform }}'
@@ -83,7 +84,6 @@ steps:
     $testResultsFileName = '${{ parameters.testResultsFileName }}'
     $maximumParalellJobs = '${{ parameters.maximumParallelJobs }}'
     $where = '${{ parameters.where }}'
-    $testTargetFrameworks = $testTargetFrameworksString.Split([char]',',[char]';')
     
     function SeparateVersionDigits([string]$digits) {
         return (&{ for ($i = 0;$i -lt $digits.Length;$i++) { $digits.Substring($i,1)
}}) -join '.'
@@ -144,7 +144,7 @@ steps:
             }
     
             $fwork = ConvertFrameworkName($framework)
-            $testResultDirectory = "$testResultsArtifactDirectory/$testOSName/$framework/$testName"
               
+            $testResultDirectory = "$testResultsArtifactDirectory/$testOSName/$framework/$testName"
             if (!(Test-Path "$testResultDirectory")) {
                 New-Item "$testResultDirectory" -ItemType Directory -Force
             }
@@ -178,9 +178,7 @@ steps:
         }
     }
     
-    foreach ($framework in $testTargetFrameworks) {
-        RunTests -Framework "$framework" -FileRegexPattern "$testBinaryFilesPattern"
-    }
+    RunTests -Framework "$framework" -FileRegexPattern "$testBinaryFilesPattern"
     
     if ($maximumParalellJobs -gt 1) {
         # Wait for it all to complete
@@ -201,7 +199,7 @@ steps:
     }
     
     $global:LASTEXITCODE = 0 # Force the script to continue on error
-  displayName: 'dotnet vstest ${{ parameters.testTargetFrameworks }}'
+  displayName: 'dotnet vstest ${{ parameters.framework }}'
   ignoreLASTEXITCODE: true
 
 #- template: 'show-all-files.yml' # Uncomment for debugging
@@ -223,6 +221,7 @@ steps:
 - template: 'publish-test-results-for-test-projects.yml'
   parameters:
     osName: '${{ parameters.osName }}'
+    framework: '${{ parameters.framework }}'
 
 - pwsh: |
     $maximumAllowedFailures = '${{ parameters.maximumAllowedFailures }}'


Mime
View raw message