Skip to content

Commit

Permalink
Merge pull request #126 from Cysharp/v2.0
Browse files Browse the repository at this point in the history
V2.0
  • Loading branch information
neuecc authored Dec 4, 2023
2 parents fba2f1a + 4d26cf1 commit 10d91c4
Show file tree
Hide file tree
Showing 383 changed files with 14,465 additions and 56,192 deletions.
56 changes: 2 additions & 54 deletions .github/workflows/build-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- "master"
- "v2.0"
pull_request:
branches:
- "master"
- "v2.0"

jobs:
build-dotnet:
Expand All @@ -15,59 +17,5 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main
# build CommandTools first (using dotnet run command in ZLogger.csproj)
- run: dotnet build -c Debug ./tools/CommandTools/CommandTools.csproj
- run: dotnet build -c Debug
- run: dotnet test -c Debug --no-build

build-unity:
if: "((github.event_name == 'push' && github.repository_owner == 'Cysharp') || startsWith(github.event.pull_request.head.label, 'Cysharp:'))"
strategy:
matrix:
unity: ["2021.3.11f1"]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
# Execute scripts: RuntimeUnitTestToolkit
# /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod UnitTestBuilder.BuildUnitTest /headless /ScriptBackend mono /BuildTarget StandaloneLinux64
- name: Build UnitTest(Linux64, mono)
uses: Cysharp/Actions/.github/actions/unity-builder@main
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
projectPath: src/ZLogger.Unity
unityVersion: ${{ matrix.unity }}
targetPlatform: StandaloneLinux64
buildMethod: UnitTestBuilder.BuildUnitTest
customParameters: /headless /ScriptBackend mono

# Unity 2021.2 and above changed Headless mode. It seems require Dedicated Server currently and investigating alternative api to enable batch mode.
# - name: Execute UnitTest
# run: ./src/ZLogger.Unity/bin/UnitTest/StandaloneLinux64_Mono2x/test

# Execute scripts: Export Package
# /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
- name: Build Unity (.unitypacakge)
uses: Cysharp/Actions/.github/actions/unity-builder@main
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
projectPath: src/ZLogger.Unity
unityVersion: ${{ matrix.unity }}
targetPlatform: StandaloneLinux64
buildMethod: PackageExporter.Export

- uses: Cysharp/Actions/.github/actions/check-metas@main # check meta files
with:
directory: src/ZLogger.Unity

# Store artifacts.
- uses: actions/upload-artifact@v2
with:
name: ZLogger.Unity.${{ matrix.unity }}.unitypackage.zip
path: ./src/ZLogger.Unity/*.unitypackage
43 changes: 0 additions & 43 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ env:
DRY_RUN: ${{ github.event.inputs.dry-run }}

jobs:
update-packagejson:
uses: Cysharp/Actions/.github/workflows/update-packagejson.yaml@main
with:
file-path: ./src/ZLogger.Unity/Assets/Scripts/ZLogger/package.json
tag: ${{ github.event.inputs.tag }}
dry-run: ${{ fromJson(github.event.inputs.dry-run) }}

build-dotnet:
needs: [update-packagejson]
runs-on: ubuntu-latest
Expand All @@ -45,42 +38,6 @@ jobs:
name: nuget
path: ./publish/

build-unity:
needs: [update-packagejson]
strategy:
matrix:
unity: ["2021.3.11f1"]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.update-packagejson.outputs.sha }}
# Execute scripts: Export Package
# /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
- name: Build Unity (.unitypacakge)
uses: Cysharp/Actions/.github/actions/unity-builder@main
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
UNITY_PACKAGE_VERSION: ${{ env.GIT_TAG }}
with:
projectPath: src/ZLogger.Unity
unityVersion: ${{ matrix.unity }}
targetPlatform: StandaloneLinux64
buildMethod: PackageExporter.Export

- uses: Cysharp/Actions/.github/actions/check-metas@main # check meta files
with:
directory: src/ZLogger.Unity

# Store artifacts.
- uses: actions/upload-artifact@v2
with:
name: ZLogger.Unity.${{ env.GIT_TAG }}.unitypackage
path: ./src/ZLogger.Unity/ZLogger.Unity.${{ env.GIT_TAG }}.unitypackage

create-release:
if: github.event.inputs.dry-run == 'false'
needs: [update-packagejson, build-dotnet, build-unity]
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ src/MasterMemory.UnityClient/Temp/*
# OTHER
nuget/tools/*
*.nupkg

.vs
.idea

# Unity
Library/
Expand Down
20 changes: 20 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project>

<PropertyGroup>
<!-- NuGet Packaging -->
<PackageVersion>$(Version)</PackageVersion>
<Company>Cysharp</Company>
<Authors>Cysharp</Authors>
<Copyright>© Cysharp, Inc.</Copyright>
<PackageProjectUrl>https://github.com/Cysharp/ZLogger</PackageProjectUrl>
<RepositoryUrl>$(PackageProjectUrl)</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>Icon.png</PackageIcon>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../../opensource.snk</AssemblyOriginatorKeyFile>
<!-- For BenchmarkDotNet generated project-->
<AssemblyOriginatorKeyFile Condition="EXISTS('./../../../../../../opensource.snk')">../../../../../../opensource.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

</Project>
File renamed without changes
Loading

0 comments on commit 10d91c4

Please sign in to comment.