forked from MessagePack-CSharp/MessagePack-CSharp
-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (58 loc) · 1.97 KB
/
unity.yml
File metadata and controls
64 lines (58 loc) · 1.97 KB
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
name: Run Unity IL2CPP UnitTest
on:
workflow_dispatch:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
env:
BUILD_CONFIG: Debug
jobs:
unity:
if: ${{ ((github.event_name == 'push' && github.repository_owner == 'MessagePack-CSharp') || startsWith(github.event.pull_request.head.label, 'MessagePack-CSharp:')) && github.triggering_actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- uses: ./.github/actions/setup-dotnet
- run: dotnet build -c ${{ env.BUILD_CONFIG }} # require dotnet build (Debug) before Unity build.
- name: restore and run local tool for NuGetForUnity
working-directory: ./src/MessagePack.UnityClient
run: |
dotnet tool restore
dotnet nugetforunity restore
# Run UnitTest
- uses: actions/cache@v4
with:
path: src/MessagePack.UnityClient/Library
key: Library-MessagePack-StandaloneLinux64
restore-keys: |
Library-MessagePack-
Library-
- name: Build project
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: src/MessagePack.UnityClient
unityVersion: 2022.3.12f1
targetPlatform: StandaloneLinux64
buildMethod: UnitTestBuilder.BuildUnitTest
versioning: None
customParameters: "/headless /ScriptBackend IL2CPP"
- name: Check UnitTest file is generated
run: ls -lR ./src/MessagePack.UnityClient/bin/UnitTest
- name: Execute UnitTest
run: ./src/MessagePack.UnityClient/bin/UnitTest/StandaloneLinux64_IL2CPP/test
# check meta files
- uses: ./.github/actions/check-metas
with:
directory: src/MessagePack.UnityClient