-
-
Notifications
You must be signed in to change notification settings - Fork 433
86 lines (76 loc) · 2.81 KB
/
build-debug.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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