Skip to content

Commit b0fa199

Browse files
chore: add dotnet 9
1 parent 8c88d9c commit b0fa199

File tree

7 files changed

+36
-12
lines changed

7 files changed

+36
-12
lines changed

.github/workflows/package.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ jobs:
3737
with:
3838
dotnet-version: 8.0.100
3939

40+
- uses: actions/setup-dotnet@v1
41+
with:
42+
dotnet-version: 9.0.200
43+
4044
- name: Package Nightly Nuget 📦
4145
run: |
4246
SUFFIX=`date "+%y%m%d%H%M%S"`

.github/workflows/pr-checks.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ jobs:
2929
with:
3030
dotnet-version: 8.0.100
3131

32+
- uses: actions/setup-dotnet@v1
33+
with:
34+
dotnet-version: 9.0.200
35+
3236
- name: Check Building ⚙
3337
run: |
3438
dotnet build

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ jobs:
3737
with:
3838
dotnet-version: 8.0.100
3939

40+
- uses: actions/setup-dotnet@v1
41+
with:
42+
dotnet-version: 9.0.200
43+
4044
- name: Package and publish to Nuget📦
4145
run: |
4246
VERSION=`git describe --tags`

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,29 +65,36 @@ The CssInCSharp is similar to less or sass. You can simply convert you style fil
6565
## Benchmark
6666
```
6767
68-
BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.3593/23H2/2023Update/SunValley3)
68+
BenchmarkDotNet v0.13.12, Windows 11 (10.0.26100.3775)
6969
AMD Ryzen 7 5700G with Radeon Graphics, 1 CPU, 16 logical and 8 physical cores
70-
.NET SDK 8.0.300
71-
[Host] : .NET 8.0.5 (8.0.524.21615), X64 RyuJIT AVX2
70+
.NET SDK 9.0.200
71+
[Host] : .NET 9.0.2 (9.0.225.6610), X64 RyuJIT AVX2
7272
.NET 5.0 : .NET 5.0.17 (5.0.1722.21314), X64 RyuJIT AVX2
7373
.NET 6.0 : .NET 6.0.28 (6.0.2824.12007), X64 RyuJIT AVX2
7474
.NET 7.0 : .NET 7.0.17 (7.0.1724.11508), X64 RyuJIT AVX2
75-
.NET 8.0 : .NET 8.0.5 (8.0.524.21615), X64 RyuJIT AVX2
75+
.NET 8.0 : .NET 8.0.13 (8.0.1325.6609), X64 RyuJIT AVX2
76+
.NET 9.0 : .NET 9.0.2 (9.0.225.6610), X64 RyuJIT AVX2
7677
7778
7879
```
79-
| Method | Job | Runtime | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Gen1 | Allocated | Alloc Ratio |
80-
|---------- |--------- |--------- |---------:|---------:|---------:|------:|--------:|--------:|-------:|----------:|------------:|
81-
| CreateCss | .NET 5.0 | .NET 5.0 | 58.99 μs | 1.179 μs | 2.001 μs | 1.00 | 0.00 | 18.4326 | 0.9766 | 150.64 KB | 1.00 |
82-
| CreateCss | .NET 6.0 | .NET 6.0 | 55.16 μs | 1.076 μs | 1.797 μs | 0.94 | 0.04 | 17.6392 | 1.0376 | 144.36 KB | 0.96 |
83-
| CreateCss | .NET 7.0 | .NET 7.0 | 50.61 μs | 0.999 μs | 2.062 μs | 0.87 | 0.05 | 17.6392 | 1.0376 | 144.42 KB | 0.96 |
84-
| CreateCss | .NET 8.0 | .NET 8.0 | 37.73 μs | 0.748 μs | 1.642 μs | 0.65 | 0.03 | 17.6392 | 0.9155 | 144.3 KB | 0.96 |
80+
| Method | Job | Runtime | Mean | Error | StdDev | Median | Ratio | RatioSD | Gen0 | Gen1 | Allocated | Alloc Ratio |
81+
|---------- |--------- |--------- |---------:|---------:|---------:|---------:|------:|--------:|--------:|-------:|----------:|------------:|
82+
| CreateCss | .NET 5.0 | .NET 5.0 | 55.68 μs | 1.112 μs | 1.795 μs | 55.56 μs | 1.00 | 0.00 | 20.0806 | 1.0986 | 164.32 KB | 1.00 |
83+
| CreateCss | .NET 6.0 | .NET 6.0 | 51.66 μs | 1.024 μs | 2.374 μs | 52.28 μs | 0.91 | 0.05 | 19.3481 | 1.0986 | 158.04 KB | 0.96 |
84+
| CreateCss | .NET 7.0 | .NET 7.0 | 48.51 μs | 0.969 μs | 1.450 μs | 48.49 μs | 0.87 | 0.03 | 19.3481 | 1.0376 | 158.11 KB | 0.96 |
85+
| CreateCss | .NET 8.0 | .NET 8.0 | 41.71 μs | 1.585 μs | 4.391 μs | 40.90 μs | 0.81 | 0.08 | 19.2871 | 1.0986 | 157.98 KB | 0.96 |
86+
| CreateCss | .NET 9.0 | .NET 9.0 | 33.33 μs | 0.660 μs | 1.840 μs | 32.80 μs | 0.62 | 0.03 | 19.2871 | 1.0986 | 157.98 KB | 0.96 |
87+
8588

8689

8790
## Special Thanks
8891

8992
[cssinjs](https://github.com/ant-design/cssinjs): Component level cssinjs solution used in ant.design.
93+
9094
[stylis](https://github.com/thysultan/stylis): A Light–weight CSS Preprocessor.
95+
9196
[csstype](https://github.com/frenic/csstype): TypeScript and Flow definitions for CSS.
97+
9298
[tinycolor](https://github.com/scttcper/tinycolor): A small library for color manipulation and conversion.
99+
93100
[TypeScriptAST](https://github.com/ToCSharp/TypeScriptAST): .NET port of TypeScript parser.

benchmark/CssInCSharp.Benchmarks/Benchmark.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace CssInCSharp.Benchmarks
1010
[SimpleJob(RuntimeMoniker.Net60)]
1111
[SimpleJob(RuntimeMoniker.Net70)]
1212
[SimpleJob(RuntimeMoniker.Net80)]
13+
[SimpleJob(RuntimeMoniker.Net90)]
1314
[Config(typeof(Config))]
1415
public class Benchmark
1516
{

benchmark/CssInCSharp.Benchmarks/CssInCSharp.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net5;net6;net7;net8</TargetFrameworks>
5+
<TargetFrameworks>net5;net6;net7;net8;net9.0</TargetFrameworks>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<LangVersion>latest</LangVersion>

src/CssInCSharp.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.1;net5;net6;net7;net8</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.1;net5;net6;net7;net8;net9.0</TargetFrameworks>
55
<LangVersion>latest</LangVersion>
66
<OutputType>Library</OutputType>
77
<IsPackable>true</IsPackable>
@@ -56,6 +56,10 @@
5656
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
5757
</ItemGroup>
5858

59+
<ItemGroup Condition="$(TargetFramework) == 'net9.0'">
60+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.0" />
61+
</ItemGroup>
62+
5963
<ItemGroup>
6064
<None Remove="CssInCSharp.csproj.DotSettings" />
6165
</ItemGroup>

0 commit comments

Comments
 (0)