diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 7f91f87..2b4d353 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -37,6 +37,10 @@ jobs: with: dotnet-version: 8.0.100 + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: 9.0.200 + - name: Package Nightly Nuget 📦 run: | SUFFIX=`date "+%y%m%d%H%M%S"` diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 29c5c04..6a43487 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -29,6 +29,10 @@ jobs: with: dotnet-version: 8.0.100 + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: 9.0.200 + - name: Check Building ⚙ run: | dotnet build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 831ad1f..3ad7c5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,6 +37,10 @@ jobs: with: dotnet-version: 8.0.100 + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: 9.0.200 + - name: Package and publish to Nuget📦 run: | VERSION=`git describe --tags` diff --git a/README.md b/README.md index f7852b1..757ccc7 100644 --- a/README.md +++ b/README.md @@ -65,29 +65,36 @@ The CssInCSharp is similar to less or sass. You can simply convert you style fil ## Benchmark ``` -BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.3593/23H2/2023Update/SunValley3) +BenchmarkDotNet v0.13.12, Windows 11 (10.0.26100.3775) AMD Ryzen 7 5700G with Radeon Graphics, 1 CPU, 16 logical and 8 physical cores -.NET SDK 8.0.300 - [Host] : .NET 8.0.5 (8.0.524.21615), X64 RyuJIT AVX2 +.NET SDK 9.0.200 + [Host] : .NET 9.0.2 (9.0.225.6610), X64 RyuJIT AVX2 .NET 5.0 : .NET 5.0.17 (5.0.1722.21314), X64 RyuJIT AVX2 .NET 6.0 : .NET 6.0.28 (6.0.2824.12007), X64 RyuJIT AVX2 .NET 7.0 : .NET 7.0.17 (7.0.1724.11508), X64 RyuJIT AVX2 - .NET 8.0 : .NET 8.0.5 (8.0.524.21615), X64 RyuJIT AVX2 + .NET 8.0 : .NET 8.0.13 (8.0.1325.6609), X64 RyuJIT AVX2 + .NET 9.0 : .NET 9.0.2 (9.0.225.6610), X64 RyuJIT AVX2 ``` -| Method | Job | Runtime | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Gen1 | Allocated | Alloc Ratio | -|---------- |--------- |--------- |---------:|---------:|---------:|------:|--------:|--------:|-------:|----------:|------------:| -| 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 | -| 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 | -| 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 | -| 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 | +| Method | Job | Runtime | Mean | Error | StdDev | Median | Ratio | RatioSD | Gen0 | Gen1 | Allocated | Alloc Ratio | +|---------- |--------- |--------- |---------:|---------:|---------:|---------:|------:|--------:|--------:|-------:|----------:|------------:| +| 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 | +| 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 | +| 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 | +| 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 | +| 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 | + ## Special Thanks [cssinjs](https://github.com/ant-design/cssinjs): Component level cssinjs solution used in ant.design. + [stylis](https://github.com/thysultan/stylis): A Light–weight CSS Preprocessor. + [csstype](https://github.com/frenic/csstype): TypeScript and Flow definitions for CSS. + [tinycolor](https://github.com/scttcper/tinycolor): A small library for color manipulation and conversion. + [TypeScriptAST](https://github.com/ToCSharp/TypeScriptAST): .NET port of TypeScript parser. \ No newline at end of file diff --git a/benchmark/CssInCSharp.Benchmarks/Benchmark.cs b/benchmark/CssInCSharp.Benchmarks/Benchmark.cs index 9ac7fe8..8085f69 100644 --- a/benchmark/CssInCSharp.Benchmarks/Benchmark.cs +++ b/benchmark/CssInCSharp.Benchmarks/Benchmark.cs @@ -10,6 +10,7 @@ namespace CssInCSharp.Benchmarks [SimpleJob(RuntimeMoniker.Net60)] [SimpleJob(RuntimeMoniker.Net70)] [SimpleJob(RuntimeMoniker.Net80)] + [SimpleJob(RuntimeMoniker.Net90)] [Config(typeof(Config))] public class Benchmark { diff --git a/benchmark/CssInCSharp.Benchmarks/CssInCSharp.Benchmarks.csproj b/benchmark/CssInCSharp.Benchmarks/CssInCSharp.Benchmarks.csproj index 2961270..49169b0 100644 --- a/benchmark/CssInCSharp.Benchmarks/CssInCSharp.Benchmarks.csproj +++ b/benchmark/CssInCSharp.Benchmarks/CssInCSharp.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net5;net6;net7;net8 + net5;net6;net7;net8;net9.0 enable enable latest diff --git a/src/CssInCSharp.csproj b/src/CssInCSharp.csproj index 72cfa36..5467348 100644 --- a/src/CssInCSharp.csproj +++ b/src/CssInCSharp.csproj @@ -1,7 +1,7 @@  - netstandard2.1;net5;net6;net7;net8 + netstandard2.1;net5;net6;net7;net8;net9.0 latest Library true @@ -56,6 +56,10 @@ + + + +