Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions .github/workflows/build-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,41 @@ jobs:
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-restore --no-build --configuration Release

native-aot:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [8, 10]
defaults:
run:
working-directory: ./src/FastIDs.TypeId
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
- name: Native AOT publish
env:
TARGET_FRAMEWORK: "net${{ matrix.dotnet-version }}.0"
run: |
set -euo pipefail
dotnet publish ./TypeId.Core/TypeId.Core.csproj -c Release -r linux-x64 -f $TARGET_FRAMEWORK /p:PublishAot=true -o ./native-artifacts
ls -la ./native-artifacts

pack-and-push:
runs-on: ubuntu-latest
needs: build
needs: [build, native-aot]
if: startsWith(github.ref, 'refs/tags/')
defaults:
run:
working-directory: ./src/FastIDs.TypeId
steps:
- uses: actions/checkout@v3
- name: Setup .NET 10 (for packing)
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![NuGet Version](https://img.shields.io/nuget/v/FastIDs.TypeId)](https://www.nuget.org/packages/FastIDs.TypeId)

High-performance C# implementation of [TypeId](https://github.com/jetpack-io/typeid/).
High-performance, Native AOT-compatible C# implementation of [TypeId](https://github.com/jetpack-io/typeid/).

Here's an example of a TypeID of type user:
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
<Copyright>Copyright (c) Mykhailo Matviiv 2023.</Copyright>
</PropertyGroup>

<PropertyGroup>
<IsTrimmable>true</IsTrimmable>
<IsAotCompatible>true</IsAotCompatible>
<VerifyReferenceTrimCompatibility>true</VerifyReferenceTrimCompatibility>
</PropertyGroup>

<ItemGroup>
<None Include="../../../README.md" Pack="true" PackagePath="\" />
</ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions src/FastIDs.TypeId/TypeId.Core/TypeId.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
<AnalysisModePerformance>All</AnalysisModePerformance>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup>
<IsTrimmable>true</IsTrimmable>
<IsAotCompatible>true</IsAotCompatible>
<VerifyReferenceTrimCompatibility>true</VerifyReferenceTrimCompatibility>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
Expand Down
Loading