Skip to content

Commit

Permalink
feat: Update to net9.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Nov 22, 2024
1 parent 137d356 commit 9c7a468
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
jobs:
auto-merge:
runs-on: ubuntu-latest
if: ${{ (github.actor == 'dependabot[bot]' || github.actor == 'HavenDV') && github.repository_owner == 'tryAGI' }}
if: ${{ github.event.pull_request.draft == false && (github.actor == 'dependabot[bot]' || github.actor == 'HavenDV') && github.repository_owner == 'tryAGI' }}
steps:
- name: Dependabot metadata
if: ${{ github.actor == 'dependabot[bot]' }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
git checkout -b ${{ steps.branch.outputs.branch_name }} origin/main
git rebase main
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Generate code
run: |
cd src/libs/HuggingFace
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Install dependencies
run: pip install mkdocs-material
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Generate docs
run: dotnet run --project src/helpers/GenerateDocs/GenerateDocs.csproj .

- name: Build with MkDocs
run: mkdocs build -d ./_site
run: |
python -m venv myenv
source myenv/bin/activate
pip install mkdocs-material
mkdocs build -d ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
test:
name: Test
if: github.event.pull_request.draft == false
uses: HavenDV/workflows/.github/workflows/dotnet_build-test-publish.yml@main
with:
generate-build-number: false
Expand Down
13 changes: 9 additions & 4 deletions HuggingFace.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
LICENSE = LICENSE
docs\openapi.yaml = docs\openapi.yaml
README.md = README.md
.github\workflows\pull-request.yml = .github\workflows\pull-request.yml
.github\workflows\auto-merge.yml = .github\workflows\auto-merge.yml
.github\workflows\auto-update.yml = .github\workflows\auto-update.yml
.github\workflows\mkdocs.yml = .github\workflows\mkdocs.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libs", "libs", "{61E7E11E-4558-434C-ACE8-06316A3097B3}"
Expand All @@ -36,6 +32,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GenerateDocs", "src\helpers
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrimmingHelper", "src\helpers\TrimmingHelper\TrimmingHelper.csproj", "{09123BEF-FA17-43F9-9079-668A0AFE345D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{BE082135-26FA-4463-9010-3FA0F02E5247}"
ProjectSection(SolutionItems) = preProject
.github\workflows\auto-merge.yml = .github\workflows\auto-merge.yml
.github\workflows\auto-update.yml = .github\workflows\auto-update.yml
.github\workflows\mkdocs.yml = .github\workflows\mkdocs.yml
.github\workflows\pull-request.yml = .github\workflows\pull-request.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -72,6 +76,7 @@ Global
{ADEF41C1-879B-4FA3-907B-5445F625690C} = {A5A32AAF-6934-4380-9E7D-2DD73EC6E362}
{F04DA4A2-E231-4355-BB82-B55AE6DC5424} = {A5A32AAF-6934-4380-9E7D-2DD73EC6E362}
{09123BEF-FA17-43F9-9079-668A0AFE345D} = {A5A32AAF-6934-4380-9E7D-2DD73EC6E362}
{BE082135-26FA-4463-9010-3FA0F02E5247} = {E793AF18-4371-4EBD-96FC-195EB1798855}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CED9A020-DBA5-4BE6-8096-75E528648EC1}
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/FixOpenApiSpec/FixOpenApiSpec.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Exe</OutputType>
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/GenerateDocs/GenerateDocs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/TrimmingHelper/TrimmingHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>

<PublishTrimmed>true</PublishTrimmed>
Expand Down
6 changes: 3 additions & 3 deletions src/libs/HuggingFace/HuggingFace.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net4.6.2;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net4.6.2;net8.0;net9.0</TargetFrameworks>
<NoWarn>$(NoWarn);CA1034</NoWarn>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>
Expand All @@ -18,11 +18,11 @@
<ItemGroup>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.0.1-preview.1.24570.5" />
<PackageReference Include="PolySharp" Version="1.14.1">
<PackageReference Include="PolySharp" Version="1.15.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net4.6.2'">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<ItemGroup Label="Base packages">
<ItemGroup>
<PackageReference Include="MSTest" Version="3.6.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.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Include="FluentAssertions" Version="6.12.2" />
</ItemGroup>

Expand Down

0 comments on commit 9c7a468

Please sign in to comment.