You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2020/07/03 15:25:49 UTC

[lucenenet] branch master updated (53c44eb -> a8d3771)

This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git.


    from 53c44eb  missing packages from downloads
     new d484b33  build improvements. Pipeline caching.
     new e55fe8d  added missing publish
     new a74ce6c  Lucene.Net.Tests: Combined T-Z into a single project
     new c4acbd5  Lucene.Net.Tests: Split E-I int E-I and I-J
     new a8d3771  azure-pipelines.yml: Reduced maximum parallel jobs to 6 on macOS and Linux, 7 on Windows

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Lucene.Net.sln                                     |  22 +--
 azure-pipelines.yml                                | 168 +++++++++++----------
 build/azure-templates/publish-nuget-packages.yml   |  16 +-
 .../publish-test-results-for-test-projects.yml     |   6 +-
 build/azure-templates/run-tests-on-os.yml          |  33 ++--
 build/build.ps1                                    |  16 +-
 .../Lucene.Net.TestFramework.csproj                |   4 +-
 .../Lucene.Net.Tests._E-I.csproj                   |  22 ++-
 .../Lucene.Net.Tests._I-J.csproj}                  |  38 +++--
 .../Lucene.Net.Tests._T-Z.csproj}                  |  21 +--
 .../Index/TestBinaryDocValuesUpdates.cs            |   4 +
 src/Lucene.Net.Tests/Index/TestIndexWriter.cs      |   7 +
 src/Lucene.Net.Tests/Util/TestNumericUtils.cs      |  10 --
 src/Lucene.Net/Lucene.Net.csproj                   |   4 +-
 14 files changed, 198 insertions(+), 173 deletions(-)
 rename src/{Lucene.Net.Tests._U-Z/Lucene.Net.Tests._U-Z.csproj => Lucene.Net.Tests._I-J/Lucene.Net.Tests._I-J.csproj} (57%)
 rename src/{Lucene.Net.Tests._T-U/Lucene.Net.Tests._T-U.csproj => Lucene.Net.Tests._T-Z/Lucene.Net.Tests._T-Z.csproj} (80%)


[lucenenet] 03/05: Lucene.Net.Tests: Combined T-Z into a single project

Posted by ni...@apache.org.
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 a74ce6cafbd5a38c6abdc4f2d7fbf8be713cedef
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Fri Jul 3 20:43:05 2020 +0700

    Lucene.Net.Tests: Combined T-Z into a single project
---
 Lucene.Net.sln                                     | 20 +++----
 .../publish-test-results-for-test-projects.yml     | 11 +---
 .../Lucene.Net.TestFramework.csproj                |  3 +-
 .../Lucene.Net.Tests._T-Z.csproj}                  | 21 ++++---
 .../Lucene.Net.Tests._U-Z.csproj                   | 69 ----------------------
 src/Lucene.Net.Tests/Util/TestNumericUtils.cs      | 10 ----
 src/Lucene.Net/Lucene.Net.csproj                   |  3 +-
 7 files changed, 24 insertions(+), 113 deletions(-)

diff --git a/Lucene.Net.sln b/Lucene.Net.sln
index b11d8e5..9c6c592 100644
--- a/Lucene.Net.sln
+++ b/Lucene.Net.sln
@@ -178,9 +178,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.Tests._E-I", "sr
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.Tests._J-S", "src\Lucene.Net.Tests._J-S\Lucene.Net.Tests._J-S.csproj", "{5BE1EBA7-876C-4E9D-A78C-46A0D6F588C9}"
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.Tests._T-U", "src\Lucene.Net.Tests._T-U\Lucene.Net.Tests._T-U.csproj", "{DF60E276-91AD-4386-A5B5-13EB24E335E6}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.Tests._U-Z", "src\Lucene.Net.Tests._U-Z\Lucene.Net.Tests._U-Z.csproj", "{083EEC05-D092-4F84-8004-41F0C7192ABD}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.Tests._T-Z", "src\Lucene.Net.Tests._T-Z\Lucene.Net.Tests._T-Z.csproj", "{2C6C2EDE-C4B6-45D3-8E86-CDAE0A629FD6}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.TestFramework", "src\Lucene.Net.TestFramework\Lucene.Net.TestFramework.csproj", "{845F8491-348C-4242-A58A-1979E8338B5D}"
 EndProject
@@ -414,18 +412,18 @@ Global
 		{8251BB22-EDA9-4850-A9B7-259C5B171040}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{8251BB22-EDA9-4850-A9B7-259C5B171040}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{8251BB22-EDA9-4850-A9B7-259C5B171040}.Release|Any CPU.Build.0 = Release|Any CPU
+		{1FD12FC1-BE00-4EA3-8377-2043A6D6E6E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{1FD12FC1-BE00-4EA3-8377-2043A6D6E6E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{1FD12FC1-BE00-4EA3-8377-2043A6D6E6E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{1FD12FC1-BE00-4EA3-8377-2043A6D6E6E6}.Release|Any CPU.Build.0 = Release|Any CPU
 		{5BE1EBA7-876C-4E9D-A78C-46A0D6F588C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{5BE1EBA7-876C-4E9D-A78C-46A0D6F588C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{5BE1EBA7-876C-4E9D-A78C-46A0D6F588C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{5BE1EBA7-876C-4E9D-A78C-46A0D6F588C9}.Release|Any CPU.Build.0 = Release|Any CPU
-		{DF60E276-91AD-4386-A5B5-13EB24E335E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{DF60E276-91AD-4386-A5B5-13EB24E335E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{DF60E276-91AD-4386-A5B5-13EB24E335E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{DF60E276-91AD-4386-A5B5-13EB24E335E6}.Release|Any CPU.Build.0 = Release|Any CPU
-		{083EEC05-D092-4F84-8004-41F0C7192ABD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{083EEC05-D092-4F84-8004-41F0C7192ABD}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{083EEC05-D092-4F84-8004-41F0C7192ABD}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{083EEC05-D092-4F84-8004-41F0C7192ABD}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2C6C2EDE-C4B6-45D3-8E86-CDAE0A629FD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{2C6C2EDE-C4B6-45D3-8E86-CDAE0A629FD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2C6C2EDE-C4B6-45D3-8E86-CDAE0A629FD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{2C6C2EDE-C4B6-45D3-8E86-CDAE0A629FD6}.Release|Any CPU.Build.0 = Release|Any CPU
 		{845F8491-348C-4242-A58A-1979E8338B5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{845F8491-348C-4242-A58A-1979E8338B5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{845F8491-348C-4242-A58A-1979E8338B5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
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 04f6eb3..b40f02c 100644
--- a/build/azure-templates/publish-test-results-for-test-projects.yml
+++ b/build/azure-templates/publish-test-results-for-test-projects.yml
@@ -135,16 +135,7 @@ steps:
 
 - 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.yml
-  parameters:
-    testProjectName: 'Lucene.Net.Tests._U-Z'
+    testProjectName: 'Lucene.Net.Tests._T-Z'
     osName: '${{ parameters.osName }}'
     framework: '${{ parameters.framework }}'
     testResultsFormat: '${{ parameters.testResultsFormat }}'
diff --git a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
index 5dfda54..0739bcb 100644
--- a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
+++ b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
@@ -94,8 +94,7 @@
     <InternalsVisibleTo Include="Lucene.Net.Tests._A-D" />
     <InternalsVisibleTo Include="Lucene.Net.Tests._E-I" />
     <InternalsVisibleTo Include="Lucene.Net.Tests._J-S" />
-    <InternalsVisibleTo Include="Lucene.Net.Tests._T-U" />
-    <InternalsVisibleTo Include="Lucene.Net.Tests._U-Z" />
+    <InternalsVisibleTo Include="Lucene.Net.Tests._T-Z" />
     
     <InternalsVisibleTo Include="Lucene.Net.Tests.Analysis.Common" />
     <InternalsVisibleTo Include="Lucene.Net.Tests.Analysis.Kuromoji" />
diff --git a/src/Lucene.Net.Tests._T-U/Lucene.Net.Tests._T-U.csproj b/src/Lucene.Net.Tests._T-Z/Lucene.Net.Tests._T-Z.csproj
similarity index 80%
rename from src/Lucene.Net.Tests._T-U/Lucene.Net.Tests._T-U.csproj
rename to src/Lucene.Net.Tests._T-Z/Lucene.Net.Tests._T-Z.csproj
index 6a45a77..dcf546a 100644
--- a/src/Lucene.Net.Tests._T-U/Lucene.Net.Tests._T-U.csproj
+++ b/src/Lucene.Net.Tests._T-Z/Lucene.Net.Tests._T-Z.csproj
@@ -26,15 +26,14 @@
   <PropertyGroup>
     <PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
 
-    <AssemblyTitle>Lucene.Net.Tests._T-U</AssemblyTitle>
+    <AssemblyTitle>Lucene.Net.Tests._T-Z</AssemblyTitle>
     <RootNamespace>Lucene.Net</RootNamespace>
     <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
     <RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
   </PropertyGroup>
   
   <ItemGroup>
-    <Compile Include="..\Lucene.Net.Tests\Util\*.cs" LinkBase="Util" />
-    <Compile Remove="..\Lucene.Net.Tests\Util\TestOfflineSorter.cs" Link="Util\TestOfflineSorter.cs" />
+    <Compile Include="..\Lucene.Net.Tests\Util\**\*.cs" LinkBase="Util" />
     <Compile Remove="..\Lucene.Net.Tests\Util\JunitCompat\**\*;..\Lucene.Net.Tests\Util\TestMaxFailuresRule.cs" />
   </ItemGroup>
   
@@ -45,15 +44,19 @@
     <ProjectReference Include="..\Lucene.Net.QueryParser\Lucene.Net.QueryParser.csproj" />
     <ProjectReference Include="..\Lucene.Net.TestFramework\Lucene.Net.TestFramework.csproj" />
   </ItemGroup>
-  
-  <Import Project="$(SolutionDir)build/TestReferences.Common.targets" />
 
-  <PropertyGroup>
-    <DefineConstants>$(DefineConstants);FEATURE_UTIL_TESTS</DefineConstants>
-  </PropertyGroup>
+  <Import Project="$(SolutionDir)build/TestReferences.Common.targets" />
 
   <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
-    <PackageReference Include="System.Net.Primitives" Version="$(SystemNetPrimitivesPackageVersion)"/>
+    <PackageReference Include="System.Net.Primitives" Version="$(SystemNetPrimitivesPackageVersion)" />
+  </ItemGroup>
+
+  <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
+    <Compile Remove="..\Lucene.Net.Tests\Support\TestCase.cs" />
+  </ItemGroup>
+
+  <ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
+    <PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="$(SystemRuntimeInteropServicesRuntimeInformationPackageVersion)" />
   </ItemGroup>
   
   <ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
diff --git a/src/Lucene.Net.Tests._U-Z/Lucene.Net.Tests._U-Z.csproj b/src/Lucene.Net.Tests._U-Z/Lucene.Net.Tests._U-Z.csproj
deleted file mode 100644
index 10f2307..0000000
--- a/src/Lucene.Net.Tests._U-Z/Lucene.Net.Tests._U-Z.csproj
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- 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.
-
--->
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <Import Project="$(SolutionDir)TestTargetFramework.props" />
-  
-  <PropertyGroup>
-    <PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
-
-    <AssemblyTitle>Lucene.Net.Tests._U-Z</AssemblyTitle>
-    <RootNamespace>Lucene.Net</RootNamespace>
-    <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
-    <RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
-  </PropertyGroup>
-  
-  <ItemGroup>
-    <Compile Include="..\Lucene.Net.Tests\Util\TestOfflineSorter.cs" Link="Util\TestOfflineSorter.cs" />
-    <Compile Include="..\Lucene.Net.Tests\Util\Automaton\**\*.cs" LinkBase="Util\Automaton" />
-    <Compile Include="..\Lucene.Net.Tests\Util\Fst\**\*.cs" LinkBase="Util\Fst" />
-    <Compile Include="..\Lucene.Net.Tests\Util\Packed\**\*.cs" LinkBase="Util\Packed" />
-    <Compile Remove="..\Lucene.Net.Tests\Util\JunitCompat\**\*;..\Lucene.Net.Tests\Util\TestMaxFailuresRule.cs" />
-  </ItemGroup>
-  
-  <ItemGroup>
-    <ProjectReference Include="..\Lucene.Net.Codecs\Lucene.Net.Codecs.csproj" />
-    <ProjectReference Include="..\Lucene.Net.Facet\Lucene.Net.Facet.csproj" />
-    <ProjectReference Include="..\Lucene.Net.Queries\Lucene.Net.Queries.csproj" />
-    <ProjectReference Include="..\Lucene.Net.QueryParser\Lucene.Net.QueryParser.csproj" />
-    <ProjectReference Include="..\Lucene.Net.TestFramework\Lucene.Net.TestFramework.csproj" />
-  </ItemGroup>
-  
-  <Import Project="$(SolutionDir)build/TestReferences.Common.targets" />
-
-  <PropertyGroup>
-    <DefineConstants>$(DefineConstants);FEATURE_UTIL_TESTS</DefineConstants>
-  </PropertyGroup>
-
-  <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
-    <PackageReference Include="System.Net.Primitives" Version="$(SystemNetPrimitivesPackageVersion)"/>
-  </ItemGroup>
-  
-  <ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
-    <Reference Include="System" />
-    <Reference Include="Microsoft.CSharp" />
-  </ItemGroup>
-  
-  <ItemGroup>
-    <Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
-  </ItemGroup>
-</Project>
\ No newline at end of file
diff --git a/src/Lucene.Net.Tests/Util/TestNumericUtils.cs b/src/Lucene.Net.Tests/Util/TestNumericUtils.cs
index 7f83222..03e4af5 100644
--- a/src/Lucene.Net.Tests/Util/TestNumericUtils.cs
+++ b/src/Lucene.Net.Tests/Util/TestNumericUtils.cs
@@ -28,8 +28,6 @@ namespace Lucene.Net.Util
     public class TestNumericUtils : LuceneTestCase
     {
 
-#if FEATURE_UTIL_TESTS
-
         [Test]
         public virtual void TestLongConversionAndOrdering()
         {
@@ -190,8 +188,6 @@ namespace Lucene.Net.Util
             }
         }
 
-#endif
-
         public static readonly double[] DOUBLE_NANs = new double[] {
             double.NaN,
             J2N.BitConversion.Int64BitsToDouble(0x7ff0000000000001L),
@@ -200,8 +196,6 @@ namespace Lucene.Net.Util
             J2N.BitConversion.Int64BitsToDouble(unchecked((long)0xffffffffffffffffL))
         };
 
-#if FEATURE_UTIL_TESTS
-
         [Test]
         public virtual void TestSortableDoubleNaN()
         {
@@ -233,7 +227,6 @@ namespace Lucene.Net.Util
                 Assert.IsTrue(intVals[i - 1] < intVals[i], "check sort order");
             }
         }
-#endif
 
         public static readonly float[] FLOAT_NANs = new float[] {
             float.NaN,
@@ -243,8 +236,6 @@ namespace Lucene.Net.Util
             J2N.BitConversion.Int32BitsToSingle(unchecked((int)0xffffffff))
         };
 
-#if FEATURE_UTIL_TESTS
-
         [Test]
         public virtual void TestSortableFloatNaN()
         {
@@ -558,6 +549,5 @@ namespace Lucene.Net.Util
             // a 0-length range should reproduce the range itself
             AssertIntRangeSplit(9500, 9500, 4, false, new int[] { unchecked((int)0x8000251c), unchecked((int)0x8000251c) }, new int[] { 0 });
         }
-#endif
     }
 }
\ No newline at end of file
diff --git a/src/Lucene.Net/Lucene.Net.csproj b/src/Lucene.Net/Lucene.Net.csproj
index b15c14e..c83e3bb 100644
--- a/src/Lucene.Net/Lucene.Net.csproj
+++ b/src/Lucene.Net/Lucene.Net.csproj
@@ -117,8 +117,7 @@
     <InternalsVisibleTo Include="Lucene.Net.Tests._A-D" />
     <InternalsVisibleTo Include="Lucene.Net.Tests._E-I" />
     <InternalsVisibleTo Include="Lucene.Net.Tests._J-S" />
-    <InternalsVisibleTo Include="Lucene.Net.Tests._T-U" />
-    <InternalsVisibleTo Include="Lucene.Net.Tests._U-Z" />
+    <InternalsVisibleTo Include="Lucene.Net.Tests._T-Z" />
 
     <InternalsVisibleTo Include="Lucene.Net.Tests.Analysis.Common" />
     <InternalsVisibleTo Include="Lucene.Net.Tests.Analysis.Kuromoji" />


[lucenenet] 04/05: Lucene.Net.Tests: Split E-I int E-I and I-J

Posted by ni...@apache.org.
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 c4acbd597a9b6700813b69a6e6c119e59611abae
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Fri Jul 3 20:48:07 2020 +0700

    Lucene.Net.Tests: Split E-I int E-I and I-J
---
 Lucene.Net.sln                                     |  2 ++
 .../publish-test-results-for-test-projects.yml     |  9 ++++++
 .../Lucene.Net.TestFramework.csproj                |  1 +
 .../Lucene.Net.Tests._E-I.csproj                   | 22 ++++++++++----
 .../Lucene.Net.Tests._I-J.csproj}                  | 35 +++++++++++++++-------
 .../Index/TestBinaryDocValuesUpdates.cs            |  4 +++
 src/Lucene.Net.Tests/Index/TestIndexWriter.cs      |  7 +++++
 src/Lucene.Net/Lucene.Net.csproj                   |  1 +
 8 files changed, 64 insertions(+), 17 deletions(-)

diff --git a/Lucene.Net.sln b/Lucene.Net.sln
index 9c6c592..389ea17 100644
--- a/Lucene.Net.sln
+++ b/Lucene.Net.sln
@@ -176,6 +176,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.Tests._A-D", "sr
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.Tests._E-I", "src\Lucene.Net.Tests._E-I\Lucene.Net.Tests._E-I.csproj", "{8251BB22-EDA9-4850-A9B7-259C5B171040}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.Tests._I-J", "src\Lucene.Net.Tests._I-J\Lucene.Net.Tests._I-J.csproj", "{1FD12FC1-BE00-4EA3-8377-2043A6D6E6E6}"
+EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.Tests._J-S", "src\Lucene.Net.Tests._J-S\Lucene.Net.Tests._J-S.csproj", "{5BE1EBA7-876C-4E9D-A78C-46A0D6F588C9}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net.Tests._T-Z", "src\Lucene.Net.Tests._T-Z\Lucene.Net.Tests._T-Z.csproj", "{2C6C2EDE-C4B6-45D3-8E86-CDAE0A629FD6}"
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 b40f02c..038ec93 100644
--- a/build/azure-templates/publish-test-results-for-test-projects.yml
+++ b/build/azure-templates/publish-test-results-for-test-projects.yml
@@ -126,6 +126,15 @@ steps:
 
 - template: publish-test-results.yml
   parameters:
+    testProjectName: 'Lucene.Net.Tests._I-J'
+    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._J-S'
     osName: '${{ parameters.osName }}'
     framework: '${{ parameters.framework }}'
diff --git a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
index 0739bcb..18cca06 100644
--- a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
+++ b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
@@ -93,6 +93,7 @@
     
     <InternalsVisibleTo Include="Lucene.Net.Tests._A-D" />
     <InternalsVisibleTo Include="Lucene.Net.Tests._E-I" />
+    <InternalsVisibleTo Include="Lucene.Net.Tests._I-J" />
     <InternalsVisibleTo Include="Lucene.Net.Tests._J-S" />
     <InternalsVisibleTo Include="Lucene.Net.Tests._T-Z" />
     
diff --git a/src/Lucene.Net.Tests._E-I/Lucene.Net.Tests._E-I.csproj b/src/Lucene.Net.Tests._E-I/Lucene.Net.Tests._E-I.csproj
index f0a702a..ecd0200 100644
--- a/src/Lucene.Net.Tests._E-I/Lucene.Net.Tests._E-I.csproj
+++ b/src/Lucene.Net.Tests._E-I/Lucene.Net.Tests._E-I.csproj
@@ -31,12 +31,22 @@
     <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
     <RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
   </PropertyGroup>
-  
+
   <ItemGroup>
-    <Compile Include="..\Lucene.Net.Tests\Index\**\*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\BinaryTokenStream.cs" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestA*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestB*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestC*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestD*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestE*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestF*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestG*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestH*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestI*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestJ*.cs" LinkBase="Index" />
     <EmbeddedResource Include="..\Lucene.Net.Tests\Index\*.zip" LinkBase="Index" />
   </ItemGroup>
-  
+
   <ItemGroup>
     <ProjectReference Include="..\Lucene.Net.Codecs\Lucene.Net.Codecs.csproj" />
     <ProjectReference Include="..\Lucene.Net.Facet\Lucene.Net.Facet.csproj" />
@@ -44,13 +54,13 @@
     <ProjectReference Include="..\Lucene.Net.QueryParser\Lucene.Net.QueryParser.csproj" />
     <ProjectReference Include="..\Lucene.Net.TestFramework\Lucene.Net.TestFramework.csproj" />
   </ItemGroup>
-  
+
   <Import Project="$(SolutionDir)build/TestReferences.Common.targets" />
-  
+
   <PropertyGroup>
     <DefineConstants>$(DefineConstants);FEATURE_INDEXWRITER_TESTS</DefineConstants>
   </PropertyGroup>
-
+  
   <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
     <PackageReference Include="System.Net.Primitives" Version="$(SystemNetPrimitivesPackageVersion)"/>
   </ItemGroup>
diff --git a/src/Lucene.Net.Tests._E-I/Lucene.Net.Tests._E-I.csproj b/src/Lucene.Net.Tests._I-J/Lucene.Net.Tests._I-J.csproj
similarity index 57%
copy from src/Lucene.Net.Tests._E-I/Lucene.Net.Tests._E-I.csproj
copy to src/Lucene.Net.Tests._I-J/Lucene.Net.Tests._I-J.csproj
index f0a702a..66346fe 100644
--- a/src/Lucene.Net.Tests._E-I/Lucene.Net.Tests._E-I.csproj
+++ b/src/Lucene.Net.Tests._I-J/Lucene.Net.Tests._I-J.csproj
@@ -26,17 +26,34 @@
   <PropertyGroup>
     <PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
 
-    <AssemblyTitle>Lucene.Net.Tests._E-I</AssemblyTitle>
+    <AssemblyTitle>Lucene.Net.Tests._I-J</AssemblyTitle>
     <RootNamespace>Lucene.Net</RootNamespace>
     <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
     <RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
   </PropertyGroup>
-  
+
   <ItemGroup>
-    <Compile Include="..\Lucene.Net.Tests\Index\**\*.cs" LinkBase="Index" />
-    <EmbeddedResource Include="..\Lucene.Net.Tests\Index\*.zip" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestBinaryDocValuesUpdates.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestIndexWriterReader.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestIndexWriter.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestK*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestL*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestM*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestN*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestO*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestP*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestQ*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestR*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestS*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestT*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestU*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestV*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestW*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestX*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestY*.cs" LinkBase="Index" />
+    <Compile Include="..\Lucene.Net.Tests\Index\TestZ*.cs" LinkBase="Index" />
   </ItemGroup>
-  
+
   <ItemGroup>
     <ProjectReference Include="..\Lucene.Net.Codecs\Lucene.Net.Codecs.csproj" />
     <ProjectReference Include="..\Lucene.Net.Facet\Lucene.Net.Facet.csproj" />
@@ -44,15 +61,11 @@
     <ProjectReference Include="..\Lucene.Net.QueryParser\Lucene.Net.QueryParser.csproj" />
     <ProjectReference Include="..\Lucene.Net.TestFramework\Lucene.Net.TestFramework.csproj" />
   </ItemGroup>
-  
+
   <Import Project="$(SolutionDir)build/TestReferences.Common.targets" />
-  
-  <PropertyGroup>
-    <DefineConstants>$(DefineConstants);FEATURE_INDEXWRITER_TESTS</DefineConstants>
-  </PropertyGroup>
 
   <ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
-    <PackageReference Include="System.Net.Primitives" Version="$(SystemNetPrimitivesPackageVersion)"/>
+    <PackageReference Include="System.Net.Primitives" Version="$(SystemNetPrimitivesPackageVersion)" />
   </ItemGroup>
   
   <ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
diff --git a/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs b/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs
index d266f9e..8e6ad4b 100644
--- a/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs
+++ b/src/Lucene.Net.Tests/Index/TestBinaryDocValuesUpdates.cs
@@ -105,6 +105,8 @@ namespace Lucene.Net.Index
             return doc;
         }
 
+#if FEATURE_INDEXWRITER_TESTS
+
         [Test]
         public virtual void TestUpdatesAreFlushed()
         {
@@ -1856,6 +1858,8 @@ namespace Lucene.Net.Index
             }
         }
 
+#endif
+
         private FacetsConfig GetFacetConfig()
         {
             FacetsConfig facetConfig = new FacetsConfig();
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriter.cs b/src/Lucene.Net.Tests/Index/TestIndexWriter.cs
index 1101ce2..d3320e6 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriter.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriter.cs
@@ -87,6 +87,8 @@ namespace Lucene.Net.Index
     {
         private static readonly FieldType StoredTextType = new FieldType(TextField.TYPE_NOT_STORED);
 
+#if FEATURE_INDEXWRITER_TESTS
+
         [Test]
         public virtual void TestDocCount()
         {
@@ -178,6 +180,8 @@ namespace Lucene.Net.Index
             writer.AddDocument(doc);
         }
 
+#endif
+
         public static void AssertNoUnreferencedFiles(Directory dir, string message)
         {
             string[] startFiles = dir.ListAll();
@@ -207,6 +211,8 @@ namespace Lucene.Net.Index
             return s;
         }
 
+#if FEATURE_INDEXWRITER_TESTS
+
         // Make sure we can open an index for create even when a
         // reader holds it open (this fails pre lock-less
         // commits on windows):
@@ -2945,5 +2951,6 @@ namespace Lucene.Net.Index
             r.Dispose();
             dir.Dispose();
         }
+#endif
     }
 }
\ No newline at end of file
diff --git a/src/Lucene.Net/Lucene.Net.csproj b/src/Lucene.Net/Lucene.Net.csproj
index c83e3bb..d8c21f1 100644
--- a/src/Lucene.Net/Lucene.Net.csproj
+++ b/src/Lucene.Net/Lucene.Net.csproj
@@ -116,6 +116,7 @@
     
     <InternalsVisibleTo Include="Lucene.Net.Tests._A-D" />
     <InternalsVisibleTo Include="Lucene.Net.Tests._E-I" />
+    <InternalsVisibleTo Include="Lucene.Net.Tests._I-J" />
     <InternalsVisibleTo Include="Lucene.Net.Tests._J-S" />
     <InternalsVisibleTo Include="Lucene.Net.Tests._T-Z" />
 


[lucenenet] 01/05: build improvements. Pipeline caching.

Posted by ni...@apache.org.
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 d484b330b38887d352473309ba14b2a9ff5ca5ae
Author: Michael <mi...@hotmail.com>
AuthorDate: Wed Jul 1 00:45:05 2020 +0700

    build improvements. Pipeline caching.
---
 azure-pipelines.yml                              | 143 +++++++++++------------
 build/azure-templates/publish-nuget-packages.yml |  16 +--
 build/azure-templates/run-tests-on-os.yml        |  33 +++---
 build/build.ps1                                  |  16 +--
 4 files changed, 94 insertions(+), 114 deletions(-)

diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 27f0469..4fd83bb 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -70,7 +70,9 @@ variables:
 - name: NuGetArtifactDirectory # NuGet binaries directory
   value: '$(Build.ArtifactStagingDirectory)/$(NuGetArtifactName)'
 - name: PublishedArtifactZipFileName
-  value: 'published.zip'
+  value: 'published.zip'  
+- name: NUGET_PACKAGES
+  value: $(Build.SourcesDirectory)\.nuget\packages
 
 stages:
 - stage: Build_Stage
@@ -81,19 +83,28 @@ stages:
     pool:
       vmImage: 'windows-2019'
 
+
     variables:
       PublishTempDirectory: '$(Build.BinariesDirectory)/publish'
 
     steps:
-    - powershell: |
-        $configuration = if ($env:BUILDCONFIGURATION) { $env:BUILDCONFIGURATION } else { "Release" }
-        Write-Host "##vso[task.setvariable variable=BuildConfiguration;]$configuration"
-      displayName: 'Setup Default Variable Values'
+    
+    - checkout: self # self represents the repo where the initial Pipelines YAML file was found
+      fetchDepth: 1  # the depth of commits to ask Git to fetch
 
     - task: UseDotNet@2
       displayName: 'Use .NET Core sdk 3.1.301'
       inputs:
         version: 3.1.301
+    
+    - task: Cache@2
+      displayName: 'Cache NuGet packages'
+      inputs:
+        key: 'nuget | "$(Agent.OS)" | **/*.csproj'
+        restoreKeys: |
+            nuget | "$(Agent.OS)"
+            nuget
+        path: $(NUGET_PACKAGES)
 
     - powershell: |
         Import-Module "$(BuildDirectory)/psake.psm1"
@@ -113,33 +124,8 @@ stages:
         Invoke-psake $(BuildDirectory)/build.ps1 -Task $tasks -properties $properties -parameters $parameters
         exit !($psake.build_success)
       displayName: 'PSake Build, Pack, and Publish'
-
     - template: 'build/azure-templates/show-all-environment-variables.yml'
-
-    - task: ArchiveFiles@2
-      displayName: 'Zip $(PublishTempDirectory)/netcoreapp3.1'
-      inputs:
-        rootFolderOrFile: '$(PublishTempDirectory)/netcoreapp3.1'
-        includeRootFolder: false
-        archiveFile: '$(PublishDirectory)/netcoreapp3.1/$(PublishedArtifactZipFileName)'
-      condition: and(succeeded(), ne(variables['RunTests'], 'false'))
-
-    - task: ArchiveFiles@2
-      displayName: 'Zip $(PublishTempDirectory)/netcoreapp2.1'
-      inputs:
-        rootFolderOrFile: '$(PublishTempDirectory)/netcoreapp2.1'
-        includeRootFolder: false
-        archiveFile: '$(PublishDirectory)/netcoreapp2.1/$(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: |
         $dir = '$(Build.ArtifactStagingDirectory)/$(VersionArtifactName)'
         if (!(Test-Path $dir)) { New-Item -ItemType Directory -Path "$dir" -Force }
@@ -147,7 +133,6 @@ stages:
         '$(FileVersion)' | Out-File -FilePath "$dir/$(FileVersionFileName)" -Force
         '$(Build.BuildNumber)' | Out-File -FilePath "$dir/$(BuildNumberFileName)" -Force
       displayName: 'Write Versions to Files'
-
     # If this is a release pipeline, copy the build.bat and Version.props files as version artifacts, which will 
     # overwrite the build.bat and Version.props files of the release.
     - task: CopyFiles@2
@@ -159,41 +144,47 @@ stages:
           Version.props
         TargetFolder: '$(Build.ArtifactStagingDirectory)/$(VersionArtifactName)'
       condition: and(succeeded(), eq(variables['IsRelease'], 'true'))
-
-    - task: PublishBuildArtifacts@1
+            
+    - task: PublishPipelineArtifact@1
       displayName: 'Publish Artifact: $(VersionArtifactName)'
       inputs:
-        PathtoPublish: '$(Build.ArtifactStagingDirectory)/$(VersionArtifactName)'
-        ArtifactName: '$(VersionArtifactName)'
-
+        targetPath: '$(Build.ArtifactStagingDirectory)/$(VersionArtifactName)'
+        artifact: '$(VersionArtifactName)'
+        publishLocation: 'pipeline'
+    
     # Copy the .pdb files as build artifacts, which will 
     # later be used to push to the Azure Artifacts symbol server.
     - task: CopyFiles@2
       displayName: 'Copy .pdb Files to: /$(DebugArtifactName)'
       inputs:
         SourceFolder: '$(System.DefaultWorkingDirectory)'
-        Contents: '**/bin/$(BuildConfiguration)/**/*.pdb'
+        Contents: |
+         **\**\bin\**\*.pdb
         TargetFolder: '$(Build.ArtifactStagingDirectory)/$(DebugArtifactName)'
-
-    - task: PublishBuildArtifacts@1
-      displayName: 'Publish Artifact: $(BinaryArtifactName)'
+        
+    - task: PublishPipelineArtifact@1
+      displayName: 'Publish Artifact: $(BinaryArtifactName)_netcoreapp3.1'
       inputs:
-        PathtoPublish: '$(Build.ArtifactStagingDirectory)/$(BinaryArtifactName)'
-        ArtifactName: '$(BinaryArtifactName)'
+        targetPath: '$(PublishTempDirectory)\netcoreapp3.1'
+        artifact: '$(BinaryArtifactName)_netcoreapp3.1'
+        publishLocation: 'pipeline'
       condition: and(succeeded(), ne(variables['RunTests'], 'false'))
-
-    - task: PublishBuildArtifacts@1
+      
+      
+    - task: PublishPipelineArtifact@1
       displayName: 'Publish Artifact: $(NuGetArtifactName)'
       inputs:
-        PathtoPublish: '$(Build.ArtifactStagingDirectory)/$(NuGetArtifactName)'
-        ArtifactName: '$(NuGetArtifactName)'
-
-    - task: PublishBuildArtifacts@1
+        targetPath: '$(Build.ArtifactStagingDirectory)/$(NuGetArtifactName)'
+        artifact: '$(NuGetArtifactName)'
+        publishLocation: 'pipeline'
+    
+    - task: PublishPipelineArtifact@1
       displayName: 'Publish Artifact: $(DebugArtifactName)'
       inputs:
-        PathtoPublish: '$(Build.ArtifactStagingDirectory)/$(DebugArtifactName)'
-        ArtifactName: '$(DebugArtifactName)'
-
+        targetPath: '$(Build.ArtifactStagingDirectory)/$(DebugArtifactName)'
+        artifact: '$(DebugArtifactName)'
+        publishLocation: 'pipeline'
+        
   - job: Docs
     condition: and(succeeded(), eq(variables['GenerateDocs'], 'true'))
     pool:
@@ -323,7 +314,6 @@ stages:
         maximumParallelJobs: 9
         maximumAllowedFailures: 4 # Maximum allowed failures for a successful build
 
-
 - stage: Publish_Stage
   displayName: 'Publish Stage:'
   jobs:
@@ -336,22 +326,27 @@ stages:
       vmImage: 'windows-2019'
 
     steps:
+    - checkout: none # self represents the repo where the initial Pipelines YAML file was found
     - template: 'build/azure-templates/show-all-environment-variables.yml'
 
-    - task: DownloadBuildArtifacts@0
+    - task: DownloadPipelineArtifact@0
       displayName: 'Download Build Artifacts: $(VersionArtifactName)'
       inputs:
         artifactName: '$(VersionArtifactName)'
-        downloadPath: '$(Build.ArtifactStagingDirectory)'
+        targetPath: version
 
+        
+    - powershell: | 
+        Get-ChildItem -Path $(System.DefaultWorkingDirectory)
+    - powershell: | 
+        Get-ChildItem -Path version
       # NOTE: We are setting Build.BuildNumber here to the NuGet package version to work around the limitation that
       # the version cannot be passed to the Index Sources & Publish Symbols task.
     - powershell: |
-        $version = Get-Content '$(Build.ArtifactStagingDirectory)/$(VersionArtifactName)/$(PackageVersionFileName)' -Raw
+        $version = Get-Content '$(VersionArtifactName)/$(PackageVersionFileName)' -Raw
         Write-Host "##vso[task.setvariable variable=PackageVersion;]$version"
         Write-Host "##vso[build.updatebuildnumber]$version"
       displayName: 'Read PackageVersion from File to Build.BuildNumber'
-
     - template: 'build/azure-templates/show-all-environment-variables.yml'
 
     - template: 'build/azure-templates/publish-nuget-packages.yml'
@@ -360,7 +355,6 @@ stages:
         nugetArtifactName: '$(NuGetArtifactName)'
         debugArtifactName: '$(DebugArtifactName)'
 
-
 - stage: Release_Stage
   displayName: 'Release Stage:'
   jobs:
@@ -371,39 +365,40 @@ stages:
       vmImage: 'windows-2019'
 
     steps:
+    - checkout: none # self represents the repo where the initial Pipelines YAML file was found
     - template: 'build/azure-templates/show-all-environment-variables.yml'
 
-    - task: DownloadBuildArtifacts@0
+
+    - task: DownloadPipelineArtifact@0
       displayName: 'Download Build Artifacts: $(NuGetArtifactName)'
       inputs:
         artifactName: '$(NuGetArtifactName)'
-        downloadPath: '$(Build.ArtifactStagingDirectory)'
+        targetPath: nuget
+
 
-    - task: DownloadBuildArtifacts@0
+    - task: DownloadPipelineArtifact@0
       displayName: 'Download Build Artifacts: $(VersionArtifactName)'
       inputs:
         artifactName: '$(VersionArtifactName)'
-        downloadPath: '$(Build.ArtifactStagingDirectory)'
-
+        targetPath: version
+        
     - template: 'build/azure-templates/show-all-files.yml' # Uncomment for debugging
 
       # NOTE: We are setting Build.BuildNumber here to the NuGet package version to work around the limitation that
       # the version cannot be passed to the Index Sources & Publish Symbols task.
     - powershell: |
-        $version = Get-Content '$(Build.ArtifactStagingDirectory)/$(VersionArtifactName)/$(PackageVersionFileName)' -Raw
+        $version = Get-Content '$(VersionArtifactName)/$(PackageVersionFileName)' -Raw
         $vcsLabel = 'Lucene.Net_' + $version.Replace('.', '_').Replace('-', '_')
         Write-Host "##vso[task.setvariable variable=VCSLabel;]$vcsLabel"
         Write-Host "##vso[task.setvariable variable=PackageVersion;]$version"
         Write-Host "##vso[build.updatebuildnumber]$version"
       displayName: 'Build VCS Label and Rehydrate Version Variables'
-
     - powershell: |
         $files = 'build.bat','Version.props'
         foreach ($file in $files) {
-            Copy-Item -Path "$(Build.ArtifactStagingDirectory)/$(VersionArtifactName)/$file" -Destination "$(Build.SourcesDirectory)/$file" -Force -ErrorAction Continue
+            Copy-Item -Path "$(VersionArtifactName)/$file" -Destination "$(Build.SourcesDirectory)/$file" -Force -ErrorAction Continue
         }
       displayName: 'Update build.bat and Version.props to build only version $(PackageVersion)'
-
     - template: 'build/azure-templates/show-all-environment-variables.yml'
 
     - task: CopyFiles@2
@@ -428,18 +423,18 @@ stages:
         archiveFile: '$(Build.ArtifactStagingDirectory)/$(ReleaseArtifactName)/Apache-Lucene.Net-$(PackageVersion).src.zip'
 
     - task: CopyFiles@2
-      displayName: 'Copy License/Notice Files to: $(Build.ArtifactStagingDirectory)/$(NuGetArtifactName)'
+      displayName: 'Copy License/Notice Files to: $(NuGetArtifactName)'
       inputs:
         SourceFolder: '$(Build.SourcesDirectory)'
         Contents: |
          LICENSE.txt
          NOTICE.txt
-        TargetFolder: '$(Build.ArtifactStagingDirectory)/$(NuGetArtifactName)'
+        TargetFolder: '$(NuGetArtifactName)'
 
     - task: ArchiveFiles@2
       displayName: 'Archive Binary Files'
       inputs:
-        rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/$(NuGetArtifactName)'
+        rootFolderOrFile: '$(NuGetArtifactName)'
         includeRootFolder: false
         archiveFile: '$(Build.ArtifactStagingDirectory)/$(ReleaseArtifactName)/Apache-Lucene.Net-$(PackageVersion).bin.zip'
 
@@ -455,11 +450,11 @@ stages:
         "TODO: Push release artifacts to dev (https://dist.apache.org/repos/dist/dev/lucenenet/)" + $nl + `
         "TODO: Start release [VOTE] (see https://www.apache.org/foundation/voting.html)" + $nl | Out-File -FilePath "$dir/RELEASE-TODO.txt" -Force
       displayName: 'Write RELEASE-TODO.txt'
-
-    - task: PublishBuildArtifacts@1
+    - task: PublishPipelineArtifact@1
       displayName: 'Publish Artifact: $(ReleaseArtifactName)'
       inputs:
-        PathtoPublish: '$(Build.ArtifactStagingDirectory)/$(ReleaseArtifactName)'
-        ArtifactName: '$(ReleaseArtifactName)'
+        targetPath: '$(Build.ArtifactStagingDirectory)/$(ReleaseArtifactName)'
+        artifact:  '$(ReleaseArtifactName)'
+        publishLocation: 'pipeline'
 
 # LUCENENET TODO: Write VCS Label (git tag) automatically
\ No newline at end of file
diff --git a/build/azure-templates/publish-nuget-packages.yml b/build/azure-templates/publish-nuget-packages.yml
index 83ac687..f718bcc 100644
--- a/build/azure-templates/publish-nuget-packages.yml
+++ b/build/azure-templates/publish-nuget-packages.yml
@@ -40,30 +40,30 @@ steps:
     EnsureNotNullOrEmpty('${{ parameters.testSymbolFilesConvention }}', 'testSymbolFilesConvention')
   displayName: 'Validate Template Parameters'
 
-- task: DownloadBuildArtifacts@0
+- task: DownloadPipelineArtifact@0
   displayName: 'Download Build Artifacts: ${{ parameters.nugetArtifactName }}'
   inputs:
-    artifactName: ${{ parameters.nugetArtifactName }}
-    downloadPath: '$(Build.ArtifactStagingDirectory)'
+    artifactName: '${{ parameters.nugetArtifactName }}'
+    targetPath: nuget
 
-- task: DownloadBuildArtifacts@0
+- task: DownloadPipelineArtifact@0
   displayName: 'Download Build Artifacts: ${{ parameters.debugArtifactName }}'
   inputs:
-    artifactName: ${{ parameters.debugArtifactName }}
-    downloadPath: '$(Build.ArtifactStagingDirectory)'
+    artifactName: '${{ parameters.debugArtifactName }}'
+    targetPath: debug
 
 - task: NuGetCommand@2
   displayName: 'NuGet push'
   inputs:
     command: push
-    packagesToPush: '$(Build.ArtifactStagingDirectory)/${{ parameters.nugetArtifactName }}/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/${{ parameters.nugetArtifactName }}/**/*.symbols.nupkg'
+    packagesToPush: '${{ parameters.nugetArtifactName }}/*.nupkg;!${{ parameters.nugetArtifactName }}/*.symbols.nupkg'
     publishVstsFeed: '/${{ parameters.artifactFeedID }}'
     allowPackageConflicts: true
 
 - task: PublishSymbols@2
   displayName: 'Publish symbols path'
   inputs:
-    SymbolsFolder: '$(Build.ArtifactStagingDirectory)/${{ parameters.debugArtifactName }}'
+    SymbolsFolder: '${{ parameters.debugArtifactName }}'
     SearchPattern: |
       **/bin/**/*.pdb
       !${{ parameters.testSymbolFilesConvention }}
diff --git a/build/azure-templates/run-tests-on-os.yml b/build/azure-templates/run-tests-on-os.yml
index 5b20620..56118b7 100644
--- a/build/azure-templates/run-tests-on-os.yml
+++ b/build/azure-templates/run-tests-on-os.yml
@@ -31,8 +31,10 @@ parameters:
   maximumParallelJobs: 8
   maximumAllowedFailures: 0
   where: '' # A test filter expression, as defined by dotnet vstest
-
+  
 steps:
+- checkout: none # self represents the repo where the initial Pipelines YAML file was found
+
 - powershell: |
     function EnsureNotNullOrEmpty([string]$param, [string]$nameOfParam) {
         if ([string]::IsNullOrEmpty($param)) {
@@ -52,6 +54,15 @@ steps:
     EnsureNotNullOrEmpty('${{ parameters.maximumAllowedFailures }}', 'maximumAllowedFailures')
   displayName: 'Validate Template Parameters'
 
+
+- task:  DownloadPipelineArtifact@2
+  displayName: 'Download Build Artifacts: ${{ parameters.binaryArtifactName }} to $(System.DefaultWorkingDirectory)\$(parameters.framework)'
+  inputs:
+    artifactName: '${{ parameters.binaryArtifactName }}_${{ parameters.framework }}'
+    targetPath: ${{ parameters.framework }}
+
+- powershell: | 
+    Get-ChildItem -Path $(System.DefaultWorkingDirectory)
 - task: UseDotNet@2
   displayName: 'Use .NET Core sdk 3.1.301'
   inputs:
@@ -64,22 +75,8 @@ steps:
     version: 2.1.807
   condition: and(succeeded(), contains('${{ parameters.framework }}', 'netcoreapp2.'))
 
-- 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.framework }}/${{ parameters.publishedArtifactZipFileName }}'
-    destinationFolder: '$(System.DefaultWorkingDirectory)/${{ parameters.binaryArtifactName }}/${{ parameters.framework }}/'
-    cleanDestinationFolder: false
-
 - powershell: |
     $framework = '${{ parameters.framework }}'
     $testBinaryRootDirectory = "$(System.DefaultWorkingDirectory)"
@@ -210,11 +207,11 @@ steps:
 
 #- template: 'show-all-files.yml' # Uncomment for debugging
 
-- task: PublishBuildArtifacts@1
+- task: PublishPipelineArtifact@1
   displayName: 'Publish Artifact: ${{ parameters.testResultsArtifactName }}'
   inputs:
-    PathtoPublish: '$(Build.ArtifactStagingDirectory)/${{ parameters.testResultsArtifactName }}'
-    ArtifactName: '${{ parameters.testResultsArtifactName }}'
+    targetPath: '$(Build.ArtifactStagingDirectory)/${{ parameters.testResultsArtifactName }}'
+    ArtifactName: '${{ parameters.testResultsArtifactName }}_${{ parameters.osName }}_${{ parameters.framework }}'
   condition: succeededOrFailed()
 
 # Due to the fact that it is not possible to loop a task and
diff --git a/build/build.ps1 b/build/build.ps1
index ead5044..27acf2f 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -27,7 +27,7 @@ properties {
 	[string]$publish_directory = "$release_directory/Publish"
 	[string]$solutionFile = "$base_directory/Lucene.Net.sln"
 	[string]$sdkPath = "$env:programfiles/dotnet/sdk"
-	[string]$sdkVersion = "3.1.100"
+	[string]$sdkVersion = "3.1.301"
 	[string]$globalJsonFile = "$base_directory/global.json"
 	[string]$versionPropsFile = "$base_directory/Version.props"
 	[string]$build_bat = "$base_directory/build.bat"
@@ -235,7 +235,7 @@ task Publish -depends Compile -description "This task uses dotnet publish to pac
 					param([string]$testProject, [string]$outputPath, [string]$logPath, [string]$framework, [string]$configuration, [string]$projectName)
 					Write-Host "Publishing '$testProject' on '$framework' to '$outputPath'..."
 					# Note: Cannot use Psake Exec in background
-					dotnet publish "$testProject" --output "$outputPath" --framework "$framework" --configuration "$configuration" --no-build --verbosity Detailed /p:TestFrameworks=true /p:Platform="$platform" > "$logPath/$projectName-dotnet-publish.log" 2> "$logPath/$projectName-dotnet-publish-error.log"
+					dotnet publish "$testProject" --output "$outputPath" --framework "$framework" --configuration "$configuration" --no-build --no-restore --verbosity Detailed /p:TestFrameworks=true /p:Platform="$platform" > "$logPath/$projectName-dotnet-publish.log" 2> "$logPath/$projectName-dotnet-publish-error.log"
 				}
 
 				# Execute the jobs in parallel
@@ -550,7 +550,6 @@ param(
 )
 
 $fileText = "<!--
-
  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
@@ -558,16 +557,13 @@ $fileText = "<!--
  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.
-
 -->
 <Project>
   <PropertyGroup Label=""Version Override Properties"">
@@ -626,10 +622,8 @@ GOTO endcommentblock
 :: -----------------------------------------------------------------------------------
 :endcommentblock
 setlocal enabledelayedexpansion enableextensions
-
 set runtests=false
 set maximumParallelJobs=8
-
 FOR %%a IN (%*) DO (
 	FOR /f ""useback tokens=*"" %%a in ('%%a') do (
 		set value=%%~a
@@ -638,31 +632,25 @@ FOR %%a IN (%*) DO (
 		IF /I !test!==-t (
 			set runtests=true
 		)
-
 		set test=!value:~0,6!
 		IF /I !test!==--test (
 			set runtests=true
 		)
-
 		set test=!value:~0,4!
 		IF /I !test!==-mp: (
 			set maximumParallelJobs=!value:~4!
 		)
-
 		set test=!value:~0,22!
 		IF /I !test!==--maximumparalleljobs: (
 			set maximumParallelJobs=!value:~22!
 		)
 	)
 )
-
 set tasks=""Default""
 if ""!runtests!""==""true"" (
 	set tasks=""Default,Test""
 )
-
 powershell -ExecutionPolicy Bypass -Command ""& { Import-Module .\build\psake.psm1; Invoke-Psake .\build\build.ps1 -Task %tasks% -properties @{prepareForBuild='false';backup_files='false';maximumParalellJobs=%maximumParallelJobs%} }""
-
 endlocal
 "
 	$dir = [System.IO.Path]::GetDirectoryName($file)


[lucenenet] 02/05: added missing publish

Posted by ni...@apache.org.
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 e55fe8de6740c6623618833dbcffc1f9b5c572cd
Author: Michael <mi...@hotmail.com>
AuthorDate: Wed Jul 1 11:49:59 2020 +0700

    added missing publish
---
 azure-pipelines.yml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 4fd83bb..b89b60f 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -170,8 +170,23 @@ stages:
         publishLocation: 'pipeline'
       condition: and(succeeded(), ne(variables['RunTests'], 'false'))
       
+    - task: PublishPipelineArtifact@1
+      displayName: 'Publish Artifact: $(BinaryArtifactName)_netcoreapp2.1'
+      inputs:
+        targetPath: '$(PublishTempDirectory)\netcoreapp2.1'
+        artifact: '$(BinaryArtifactName)_netcoreapp2.1'
+        publishLocation: 'pipeline'
+      condition: and(succeeded(), ne(variables['RunTests'], 'false'))
       
     - task: PublishPipelineArtifact@1
+      displayName: 'Publish Artifact: $(BinaryArtifactName)_net48'
+      inputs:
+        targetPath: '$(PublishTempDirectory)\net48'
+        artifact: '$(BinaryArtifactName)_net48'
+        publishLocation: 'pipeline'
+      condition: and(succeeded(), ne(variables['RunTests'], 'false'))
+
+    - task: PublishPipelineArtifact@1
       displayName: 'Publish Artifact: $(NuGetArtifactName)'
       inputs:
         targetPath: '$(Build.ArtifactStagingDirectory)/$(NuGetArtifactName)'


[lucenenet] 05/05: azure-pipelines.yml: Reduced maximum parallel jobs to 6 on macOS and Linux, 7 on Windows

Posted by ni...@apache.org.
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 a8d3771d0b0d7eae9f93dcf0f0aa308ed45e72ee
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Thu Jul 2 02:18:35 2020 +0700

    azure-pipelines.yml: Reduced maximum parallel jobs to 6 on macOS and Linux, 7 on Windows
---
 azure-pipelines.yml | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index b89b60f..1630f23 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -263,14 +263,17 @@ stages:
         Windows:
           osName: 'Windows'
           imageName: 'windows-2019'
+          maximumParallelJobs: 7
           maximumAllowedFailures: 4 # Maximum allowed failures for a successful build
         Linux:
           osName: 'Linux'
           imageName: 'ubuntu-16.04'
+          maximumParallelJobs: 6
           maximumAllowedFailures: 4 # Maximum allowed failures for a successful build
         macOS:
           osName: 'macOS'
           imageName: 'macOS-10.14'
+          maximumParallelJobs: 6
           maximumAllowedFailures: 4 # Maximum allowed failures for a successful build
     displayName: 'Test netcoreapp3.1 on'
     pool:
@@ -282,7 +285,7 @@ stages:
         framework: 'netcoreapp3.1'
         testResultsArtifactName: '$(TestResultsArtifactName)'
         publishedArtifactZipFileName: '$(PublishedArtifactZipFileName)'
-        maximumParallelJobs: 8
+        maximumParallelJobs: $(maximumParallelJobs)
         maximumAllowedFailures: $(maximumAllowedFailures)
 
   - job: Test_netcoreapp2_2
@@ -292,14 +295,17 @@ stages:
         Windows:
           osName: 'Windows'
           imageName: 'windows-2019'
+          maximumParallelJobs: 7
           maximumAllowedFailures: 4 # Maximum allowed failures for a successful build
         Linux:
           osName: 'Linux'
           imageName: 'ubuntu-16.04'
+          maximumParallelJobs: 6
           maximumAllowedFailures: 4 # Maximum allowed failures for a successful build
         macOS:
           osName: 'macOS'
           imageName: 'macOS-10.14'
+          maximumParallelJobs: 6
           maximumAllowedFailures: 4 # Maximum allowed failures for a successful build
     displayName: 'Test netcoreapp2.1 on'
     pool:
@@ -311,7 +317,7 @@ stages:
         framework: 'netcoreapp2.1'
         testResultsArtifactName: '$(TestResultsArtifactName)'
         publishedArtifactZipFileName: '$(PublishedArtifactZipFileName)'
-        maximumParallelJobs: 8
+        maximumParallelJobs: $(maximumParallelJobs)
         maximumAllowedFailures: $(maximumAllowedFailures)
 
   - job: Test_net48_Windows
@@ -326,7 +332,7 @@ stages:
         framework: 'net48'
         testResultsArtifactName: '$(TestResultsArtifactName)'
         publishedArtifactZipFileName: '$(PublishedArtifactZipFileName)'
-        maximumParallelJobs: 9
+        maximumParallelJobs: 7
         maximumAllowedFailures: 4 # Maximum allowed failures for a successful build
 
 - stage: Publish_Stage