Merge pull request #681 from Cysharp/feature/UseConstantMarkerBytes #755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-debug | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "!*" # not a tag push | |
pull_request: | |
branches: | |
- main | |
env: | |
BUILD_CONFIG: Debug | |
jobs: | |
build-dotnet: | |
name: "Build .NET projects" | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-dotnet | |
- run: dotnet build -c ${{ env.BUILD_CONFIG }} ./MagicOnion.sln | |
run-tests: | |
name: "Run tests" | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-dotnet | |
- run: dotnet test -c Debug MagicOnion.sln | |
- run: dotnet test -c Release MagicOnion.sln | |
build-dotnet-experimental: | |
name: "Build .NET Experimental libraries" | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup-dotnet | |
- run: dotnet build ./src/MagicOnion.Server.OpenTelemetry/ -c ${{ env.BUILD_CONFIG }} | |
build-unity: | |
name: "Build Unity package" | |
if: "((github.event_name == 'push' && github.repository_owner == 'Cysharp') || startsWith(github.event.pull_request.head.label, 'Cysharp:'))" | |
strategy: | |
matrix: | |
unity: ["2020.3.33f1"] | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
# todo: prepare runtime unit test | |
# Execute scripts: RuntimeUnitTestToolkit | |
# - name: Build UnitTest(Linux64, mono) | |
# run: /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod UnitTestBuilder.BuildUnitTest /headless /ScriptBackend mono /BuildTarget StandaloneLinux64 | |
# working-directory: src/ZLogger.Unity | |
# - 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/MagicOnion.Client.Unity | |
unityVersion: ${{ matrix.unity }} | |
targetPlatform: StandaloneLinux64 | |
buildMethod: PackageExporter.Export | |
- uses: ./.github/actions/check-metas | |
with: | |
directory: src/MagicOnion.Client.Unity | |
# Store artifacts. | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: MagicOnion.Client.Unity.${{ matrix.unity }}.unitypackage | |
path: ./src/MagicOnion.Client.Unity/MagicOnion.Client.Unity.unitypackage |