Skip to content

Commit

Permalink
Update libs
Browse files Browse the repository at this point in the history
  • Loading branch information
kzrnm committed Dec 27, 2024
1 parent a50edce commit a651f0e
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
3.0.x
3.1.x
7.0.x
9.0.x
test:
uses: kzrnm/dotnet-actions/.github/workflows/unittest.yml@v2
with:
Expand All @@ -38,6 +39,7 @@ jobs:
3.0.x
3.1.x
7.0.x
9.0.x
build-verify:
needs: get-version
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reusable_verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
3.0.x
3.1.x
7.0.x
9.0.x
- uses: actions/cache@v4
with:
path: ~/.nuget/packages
Expand Down Expand Up @@ -109,6 +110,7 @@ jobs:
3.0.x
3.1.x
7.0.x
9.0.x
- name: Download binaries
uses: actions/download-artifact@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: kzrnm/dotnet-actions/.github/workflows/format.yml@v2
with:
target: ac-library-csharp.sln
dotnet-version: 7.0.x
dotnet-version: 9.0.x
test:
uses: kzrnm/dotnet-actions/.github/workflows/unittest.yml@v2
with:
Expand All @@ -27,5 +27,6 @@ jobs:
3.0.x
3.1.x
7.0.x
9.0.x
verify:
uses: ./.github/workflows/reusable_verify.yml
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<EmbeddingSource>true</EmbeddingSource>
<DefineConstants Condition="'$(EmbeddingSource)'=='true'">$(DefineConstants);EMBEDDING</DefineConstants>

<SourceExpanderVersion>5.5.1</SourceExpanderVersion>
<SourceExpanderVersion>7.0.0</SourceExpanderVersion>

<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
Expand Down
7 changes: 7 additions & 0 deletions Source/AtCoderAnalyzer/AtCoderAnalyzer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<Target Name="PackBuildOutputs" DependsOnTargets="SatelliteDllsProjectOutputGroup;DebugSymbolsProjectOutputGroup">
<ItemGroup>
<TfmSpecificPackageFile Include="$(TargetDir)\*.dll" PackagePath="analyzers\dotnet\cs" />
Expand Down
14 changes: 11 additions & 3 deletions Source/ac-library-csharp/ac-library-csharp.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;netcoreapp3.1;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net9.0;net7.0;netcoreapp3.1;netstandard2.1</TargetFrameworks>
<RootNamespace>AtCoder</RootNamespace>
<OutputType>Library</OutputType>

<LangVersion Condition="'$(TargetFramework)' == 'netstandard2.1'">7.3</LangVersion>
<LangVersion Condition="'$(TargetFramework)' == 'netcoreapp3.1'">8</LangVersion>
<LangVersion Condition="'$(TargetFramework)' == 'net7.0'">11</LangVersion>
<LangVersion Condition="'$(TargetFramework)' == 'net9.0'">13</LangVersion>

<AllowUnsafeBlocks>false</AllowUnsafeBlocks>

Expand All @@ -17,7 +18,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GeneratePackageOnBuild Condition="'$(Configuration)' == 'Release'">true</GeneratePackageOnBuild>

<NoWarn>$(NoWarn);CS1574;CA1034;CS1591;CS1734;IDE0039;IDE0057</NoWarn>
<NoWarn>$(NoWarn);CS1574;CA1034;CS1591;CS1734;IDE0039;IDE0057;IDE0130</NoWarn>

<PackageLicenseExpression></PackageLicenseExpression>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
Expand Down Expand Up @@ -66,4 +67,11 @@
</Compile>
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
21 changes: 14 additions & 7 deletions Test/AtCoderAnalyzer.Test/AtCoderAnalyzer.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3">
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime;build;native;contentfiles;analyzers;buildtransitive</IncludeAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime;build;native;contentfiles;analyzers;buildtransitive</IncludeAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.6.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.1" />
Expand All @@ -34,4 +34,11 @@
<ProjectReference Include="..\..\Source\AtCoderAnalyzer\AtCoderAnalyzer.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
7 changes: 7 additions & 0 deletions Test/Expand.Test/Expand.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,11 @@
<ItemGroup>
<ProjectReference Include="..\..\Source\ac-library-csharp\ac-library-csharp.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net7.0</TargetFrameworks>
<TargetFrameworks>net9.0;net7.0;netcoreapp3.1</TargetFrameworks>
<RootNamespace>AtCoder</RootNamespace>

<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Competitive.IO" Version="1.0.1" />
<PackageReference Include="CompetitiveVerifierProblem" Version="1.5.0" />
<PackageReference Include="Competitive.IO" Version="2.1.0" />
<PackageReference Include="CompetitiveVerifierProblem" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Source\ac-library-csharp\ac-library-csharp.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public WrapperView(FenwickTree<T, TOp> fw)
{
var type = typeof(FenwickTree<T, TOp>).GetNestedType("DebugView", BindingFlags.NonPublic)
.MakeGenericType(typeof(T), typeof(TOp));
debugView = type.GetConstructor(new[] { fw.GetType() }).Invoke(new object[] { fw });
debugView = type.GetConstructor([fw.GetType()]).Invoke([fw]);
itemsProperty = debugView.GetType().GetProperty("Items");
}
public FenwickTree<T, TOp>.DebugItem[] GetItems()
Expand All @@ -36,7 +36,7 @@ public void Empty()
view.GetItems().Should().BeEmpty();
}

public static TheoryData Simple_Data = new TheoryData<int, LongFenwickTree.DebugItem[]>
public static TheoryData Simple_Data => new TheoryData<int, LongFenwickTree.DebugItem[]>
{
{
1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void Empty()
view.GetItems().Should().BeEmpty();
}

public static TheoryData Simple_Data = new TheoryData<int, LazySegtree<int, int, MaxOp>.DebugItem[]>
public static TheoryData Simple_Data() => new TheoryData<int, LazySegtree<int, int, MaxOp>.DebugItem[]>
{
{
1,
Expand Down
6 changes: 5 additions & 1 deletion Test/ac-library-csharp.Test/SourceExpanderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ class EmbeddingGenericMathFact : EmbeddingFact
const bool useIntrinsics = true;
const bool genericMath = false;
const string languageVersion = "8.0";
#else
#elif NET7_0
const bool useIntrinsics = true;
const bool genericMath = true;
const string languageVersion = "11.0";
#else
const bool useIntrinsics = true;
const bool genericMath = true;
const string languageVersion = "13.0";
#endif

[Fact]
Expand Down
33 changes: 20 additions & 13 deletions Test/ac-library-csharp.Test/ac-library-csharp.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net9.0;net7.0;netcoreapp3.1</TargetFrameworks>
<IsPackable>false</IsPackable>
<RootNamespace>AtCoder</RootNamespace>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<NoWarn>$(NoWarn);IDE0044;NETSDK1138</NoWarn>
<NoWarn>$(NoWarn);IDE0044;IDE0130;NETSDK1138;xUnit1037</NoWarn>

<LangVersion>latest</LangVersion>

<GenericMath Condition="'$(TargetFramework)'!='netcoreapp3.0' And '$(TargetFramework)'!='netcoreapp3.1'">true</GenericMath>
<DefineConstants Condition="'$(GenericMath)'=='true'">$(DefineConstants);GENERIC_MATH</DefineConstants>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<PropertyGroup Condition="'$(CI)' == 'true'">
Expand All @@ -36,28 +37,27 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3">
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="CompetitiveVerifierResolverTestLogger" Version="1.5.0">
<PackageReference Include="CompetitiveVerifierResolverTestLogger" Version="2.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="SourceExpander.Core" Version="$(SourceExpanderVersion)" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="MersenneTwister" Version="1.0.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="SourceExpander.Embedder.Testing" Version="$(SourceExpanderVersion)" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime;build;native;contentfiles;analyzers;buildtransitive</IncludeAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime;build;native;contentfiles;analyzers;buildtransitive</IncludeAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

Expand All @@ -73,4 +73,11 @@
</Compile>
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>

0 comments on commit a651f0e

Please sign in to comment.