Skip to content

Commit

Permalink
Merge pull request #688 from Cysharp/feature/SourceGenerator
Browse files Browse the repository at this point in the history
MagicOnion.Client.SourceGenerator
  • Loading branch information
mayuki authored Oct 25, 2023
2 parents 4324ee6 + b3e8925 commit 3084f8a
Show file tree
Hide file tree
Showing 485 changed files with 31,673 additions and 10,710 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
if: "((github.event_name == 'push' && github.repository_owner == 'Cysharp') || startsWith(github.event.pull_request.head.label, 'Cysharp:'))"
strategy:
matrix:
unity: ["2020.3.33f1"]
unity: ["2021.3.0f1"]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
Expand Down
57 changes: 56 additions & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,61 @@ jobs:
branch: ${{ env.DRY_RUN_BRANCH_PREFIX }}-${{ env.GIT_TAG }}
tags: false

update-sourcegenerator-unity:
name: Update MagicOnion.Client.SourceGenerator.Unity
needs: [update-packagejson]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- run: echo ${{ needs.update-packagejson.outputs.sha }}
- uses: actions/checkout@v3
with:
ref: ${{ needs.update-packagejson.outputs.sha }}
- uses: ./.github/actions/setup-dotnet
- name: Publish MagicOnion.Client.SourceGenerator.Unity
run: dotnet publish -c ${{ env.BUILD_CONFIG }} -c Release ./src/MagicOnion.Client.SourceGenerator.Unity -o ./src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Client/MagicOnion.Client.SourceGenerator.Unity
- name: Remove .deps.json and .pdbs
run: |
rm -f ./src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Client/MagicOnion.Client.SourceGenerator.Unity/*.deps.json
rm -f ./src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Client/MagicOnion.Client.SourceGenerator.Unity/*.pdb
- name: Check update
id: check_update
run: |
git diff --exit-code || echo "::set-output name=changed::1"
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "feat: Update MagicOnion.Client.SourceGenerator.Unity" -a
echo "::set-output name=sha::$(git rev-parse HEAD)"
- name: Check sha
run: echo "SHA ${SHA}"
env:
SHA: ${{ steps.commit.outputs.sha }}

- name: Create Tag
if: steps.check_update.outputs.changed == '1'
run: git tag ${{ env.GIT_TAG }}

- name: Push changes
if: env.DRY_RUN == 'false' && steps.check_update.outputs.changed == '1'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true

- name: Push changes (dry_run)
if: env.DRY_RUN == 'true' && steps.check_update.outputs.changed == '1'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ env.DRY_RUN_BRANCH_PREFIX }}-${{ env.GIT_TAG }}
tags: false

build-dotnet:
needs: [update-packagejson]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -146,7 +201,7 @@ jobs:
create-release:
if: github.event.inputs.dry_run == 'false'
needs:
[update-packagejson, build-dotnet, build-dotnet-experimental, build-unity]
[update-packagejson, update-sourcegenerator-unity, build-dotnet, build-dotnet-experimental, build-unity]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 6 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<!-- Expose package path to the solution (e.g. $(PkgSystem_Text_Json))-->
<!-- https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#generatepathproperty -->
<ItemDefinitionGroup>
<PackageReference GeneratePathProperty="true" />
</ItemDefinitionGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all"/>
</ItemGroup>
Expand Down
69 changes: 47 additions & 22 deletions MagicOnion.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{15598FE3-2
.gitignore = .gitignore
Directory.Build.props = Directory.Build.props
LICENSE = LICENSE
NuGet.Config = NuGet.Config
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicOnion.Abstractions", "src\MagicOnion.Abstractions\MagicOnion.Abstractions.csproj", "{2AD48C05-ED44-4E4F-B86B-A746E7F968A9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicOnion.Generator", "src\MagicOnion.Generator\MagicOnion.Generator.csproj", "{963FD601-3CE6-42DE-9FAC-C70D5494FA9B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicOnion.GeneratorCore", "src\MagicOnion.GeneratorCore\MagicOnion.GeneratorCore.csproj", "{EE768243-100A-4075-8823-C49EA086680A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{42EBB7E4-52D7-4E57-80AD-79FDD4900E13}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
Expand All @@ -47,8 +44,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JwtAuthApp.Server", "sample
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JwtAuthApp.Client", "samples\JwtAuthentication\JwtAuthApp.Client\JwtAuthApp.Client.csproj", "{5948D82F-EA56-4266-8718-7508C26BFFD4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicOnion.Generator.Tests", "tests\MagicOnion.Generator.Tests\MagicOnion.Generator.Tests.csproj", "{E5415D78-63D2-4573-BA53-E923506A9C30}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicOnion.Server", "src\MagicOnion.Server\MagicOnion.Server.csproj", "{72D2C01C-765C-4FE1-89CA-28244DEC7C37}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sandbox.AspNetCore", "sandbox\Sandbox.AspNetCore\Sandbox.AspNetCore.csproj", "{E70D0B00-0524-4EBE-B290-64DDB6B323F9}"
Expand Down Expand Up @@ -101,7 +96,21 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicOnion.Serialization.Me
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicOnion.Serialization.MemoryPack.Tests", "tests\MagicOnion.Serialization.MemoryPack.Tests\MagicOnion.Serialization.MemoryPack.Tests.csproj", "{A5A4ED92-71AD-410E-9310-A8BF48D32126}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagicOnion.Server.Redis.Tests", "tests\MagicOnion.Server.Redis.Tests\MagicOnion.Server.Redis.Tests.csproj", "{95C3B040-BD5A-4A80-B5D4-26CAA21B4829}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicOnion.Server.Redis.Tests", "tests\MagicOnion.Server.Redis.Tests\MagicOnion.Server.Redis.Tests.csproj", "{95C3B040-BD5A-4A80-B5D4-26CAA21B4829}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicOnion.Client.SourceGenerator", "src\MagicOnion.Client.SourceGenerator\MagicOnion.Client.SourceGenerator.csproj", "{7130EC5B-C987-487A-B319-E91B6D03F5BF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicOnion.Client.SourceGenerator.Tests", "tests\MagicOnion.Client.SourceGenerator.Tests\MagicOnion.Client.SourceGenerator.Tests.csproj", "{632C8D1B-3293-4D02-9ED1-0CB191619334}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicOnion.Client.SourceGenerator.Unity", "src\MagicOnion.Client.SourceGenerator.Unity\MagicOnion.Client.SourceGenerator.Unity.csproj", "{A817FC3D-5C8D-4F47-B082-DB6A8EE227FD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleServiceDefinitions", "tests\samples\SampleServiceDefinitions\SampleServiceDefinitions.csproj", "{45EA8028-41C1-4DF6-9E0F-EEE8967799DA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicOnion.Client.SourceGenerator.Unity.Tests", "tests\MagicOnion.Client.SourceGenerator.Unity.Tests\MagicOnion.Client.SourceGenerator.Unity.Tests.csproj", "{AFB26C11-0833-459D-B071-7CA001BD7F01}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SourceGeneratorPerf", "SourceGeneratorPerf", "{E9E11DFE-29C4-4933-A21B-2222646D946E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceGeneratorPerf", "perf\SourceGeneratorPerf\SourceGeneratorPerf\SourceGeneratorPerf.csproj", "{7F132098-0C1D-4F3A-B049-ACABF5E35973}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -121,14 +130,6 @@ Global
{2AD48C05-ED44-4E4F-B86B-A746E7F968A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AD48C05-ED44-4E4F-B86B-A746E7F968A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AD48C05-ED44-4E4F-B86B-A746E7F968A9}.Release|Any CPU.Build.0 = Release|Any CPU
{963FD601-3CE6-42DE-9FAC-C70D5494FA9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{963FD601-3CE6-42DE-9FAC-C70D5494FA9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{963FD601-3CE6-42DE-9FAC-C70D5494FA9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{963FD601-3CE6-42DE-9FAC-C70D5494FA9B}.Release|Any CPU.Build.0 = Release|Any CPU
{EE768243-100A-4075-8823-C49EA086680A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE768243-100A-4075-8823-C49EA086680A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE768243-100A-4075-8823-C49EA086680A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE768243-100A-4075-8823-C49EA086680A}.Release|Any CPU.Build.0 = Release|Any CPU
{5CDEE44D-8AC2-4E7C-90CC-669E336F2D15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CDEE44D-8AC2-4E7C-90CC-669E336F2D15}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CDEE44D-8AC2-4E7C-90CC-669E336F2D15}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -145,10 +146,6 @@ Global
{5948D82F-EA56-4266-8718-7508C26BFFD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5948D82F-EA56-4266-8718-7508C26BFFD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5948D82F-EA56-4266-8718-7508C26BFFD4}.Release|Any CPU.Build.0 = Release|Any CPU
{E5415D78-63D2-4573-BA53-E923506A9C30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5415D78-63D2-4573-BA53-E923506A9C30}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5415D78-63D2-4573-BA53-E923506A9C30}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5415D78-63D2-4573-BA53-E923506A9C30}.Release|Any CPU.Build.0 = Release|Any CPU
{72D2C01C-765C-4FE1-89CA-28244DEC7C37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72D2C01C-765C-4FE1-89CA-28244DEC7C37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72D2C01C-765C-4FE1-89CA-28244DEC7C37}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -229,6 +226,30 @@ Global
{95C3B040-BD5A-4A80-B5D4-26CAA21B4829}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95C3B040-BD5A-4A80-B5D4-26CAA21B4829}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95C3B040-BD5A-4A80-B5D4-26CAA21B4829}.Release|Any CPU.Build.0 = Release|Any CPU
{7130EC5B-C987-487A-B319-E91B6D03F5BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7130EC5B-C987-487A-B319-E91B6D03F5BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7130EC5B-C987-487A-B319-E91B6D03F5BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7130EC5B-C987-487A-B319-E91B6D03F5BF}.Release|Any CPU.Build.0 = Release|Any CPU
{632C8D1B-3293-4D02-9ED1-0CB191619334}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{632C8D1B-3293-4D02-9ED1-0CB191619334}.Debug|Any CPU.Build.0 = Debug|Any CPU
{632C8D1B-3293-4D02-9ED1-0CB191619334}.Release|Any CPU.ActiveCfg = Release|Any CPU
{632C8D1B-3293-4D02-9ED1-0CB191619334}.Release|Any CPU.Build.0 = Release|Any CPU
{A817FC3D-5C8D-4F47-B082-DB6A8EE227FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A817FC3D-5C8D-4F47-B082-DB6A8EE227FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A817FC3D-5C8D-4F47-B082-DB6A8EE227FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A817FC3D-5C8D-4F47-B082-DB6A8EE227FD}.Release|Any CPU.Build.0 = Release|Any CPU
{45EA8028-41C1-4DF6-9E0F-EEE8967799DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{45EA8028-41C1-4DF6-9E0F-EEE8967799DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{45EA8028-41C1-4DF6-9E0F-EEE8967799DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{45EA8028-41C1-4DF6-9E0F-EEE8967799DA}.Release|Any CPU.Build.0 = Release|Any CPU
{AFB26C11-0833-459D-B071-7CA001BD7F01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AFB26C11-0833-459D-B071-7CA001BD7F01}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AFB26C11-0833-459D-B071-7CA001BD7F01}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AFB26C11-0833-459D-B071-7CA001BD7F01}.Release|Any CPU.Build.0 = Release|Any CPU
{7F132098-0C1D-4F3A-B049-ACABF5E35973}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F132098-0C1D-4F3A-B049-ACABF5E35973}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F132098-0C1D-4F3A-B049-ACABF5E35973}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F132098-0C1D-4F3A-B049-ACABF5E35973}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -237,15 +258,12 @@ Global
{C79CE0BF-ED4C-47BE-822E-E82CF83FC68A} = {1987061F-8970-4018-8D58-6932961C9EB4}
{7B7CFF27-CB38-4661-9CFC-473B4E38F0DE} = {FEE2B9AB-A1D0-41BA-A172-FC95935542DF}
{2AD48C05-ED44-4E4F-B86B-A746E7F968A9} = {1987061F-8970-4018-8D58-6932961C9EB4}
{963FD601-3CE6-42DE-9FAC-C70D5494FA9B} = {1987061F-8970-4018-8D58-6932961C9EB4}
{EE768243-100A-4075-8823-C49EA086680A} = {1987061F-8970-4018-8D58-6932961C9EB4}
{5CDEE44D-8AC2-4E7C-90CC-669E336F2D15} = {FEE2B9AB-A1D0-41BA-A172-FC95935542DF}
{FEE2B9AB-A1D0-41BA-A172-FC95935542DF} = {5A3F5158-7B17-4586-9885-9E60C1393185}
{EBF51D3A-A093-4177-865A-D17F816EDEF5} = {5A3F5158-7B17-4586-9885-9E60C1393185}
{93BC9FC7-D157-4541-A05E-C56D31B2F2BC} = {EBF51D3A-A093-4177-865A-D17F816EDEF5}
{38B41013-6FD3-4E99-A7A9-0DBAC0CAF6F5} = {EBF51D3A-A093-4177-865A-D17F816EDEF5}
{5948D82F-EA56-4266-8718-7508C26BFFD4} = {EBF51D3A-A093-4177-865A-D17F816EDEF5}
{E5415D78-63D2-4573-BA53-E923506A9C30} = {7ACC27E8-8FBE-4807-B91F-B89AF3CFF7E0}
{72D2C01C-765C-4FE1-89CA-28244DEC7C37} = {1987061F-8970-4018-8D58-6932961C9EB4}
{E70D0B00-0524-4EBE-B290-64DDB6B323F9} = {7682EFFC-681C-4DCC-B5E7-D8449E42DAC9}
{4DE802A2-426D-4074-B9F3-710980B3EDA8} = {1987061F-8970-4018-8D58-6932961C9EB4}
Expand All @@ -269,6 +287,13 @@ Global
{56C784C7-3F18-4443-B7B0-03607ED14308} = {1987061F-8970-4018-8D58-6932961C9EB4}
{A5A4ED92-71AD-410E-9310-A8BF48D32126} = {7ACC27E8-8FBE-4807-B91F-B89AF3CFF7E0}
{95C3B040-BD5A-4A80-B5D4-26CAA21B4829} = {7ACC27E8-8FBE-4807-B91F-B89AF3CFF7E0}
{7130EC5B-C987-487A-B319-E91B6D03F5BF} = {1987061F-8970-4018-8D58-6932961C9EB4}
{632C8D1B-3293-4D02-9ED1-0CB191619334} = {7ACC27E8-8FBE-4807-B91F-B89AF3CFF7E0}
{A817FC3D-5C8D-4F47-B082-DB6A8EE227FD} = {1987061F-8970-4018-8D58-6932961C9EB4}
{45EA8028-41C1-4DF6-9E0F-EEE8967799DA} = {B5617CC1-55FD-4F77-BA75-9450474C6527}
{AFB26C11-0833-459D-B071-7CA001BD7F01} = {7ACC27E8-8FBE-4807-B91F-B89AF3CFF7E0}
{E9E11DFE-29C4-4933-A21B-2222646D946E} = {A0CED9FB-5B18-4EE3-859F-CE3A6F90A82A}
{7F132098-0C1D-4F3A-B049-ACABF5E35973} = {E9E11DFE-29C4-4933-A21B-2222646D946E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D5B2E7E3-B727-40A1-BE68-7BAC9B9DE2FE}
Expand Down
15 changes: 13 additions & 2 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
</packageSources>
</configuration>
<packageSourceMapping>
<clear />
<packageSource key="nuget">
<package pattern="*" />
<package pattern="Microsoft.CodeAnalysis.*" />
</packageSource>
<packageSource key="dotnet-tools">
<package pattern="Microsoft.CodeAnalysis.*" />
</packageSource>
</packageSourceMapping>
</configuration>
Loading

0 comments on commit 3084f8a

Please sign in to comment.