-
-
Notifications
You must be signed in to change notification settings - Fork 12
81 lines (71 loc) · 2.85 KB
/
unity-builds.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
# This workflow is to make sure builds work properly in all runtimes and with all configurations.
# This is done because WebGL is currently not possible to run platform tests in cloud CI.
# Only building for WebGL because it does the full IL2CPP process plus an extra emscripten process.
# Standalone is built in IL2CPP tests, and other platforms do the same IL2CPP process.
# We do not need to test Mono builds here because that is already done with the Editor tests.
name: Unity WebGL Builds
on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: Build (${{ matrix.scriptingRuntime.name }}, ${{ matrix.mode.name }}, ${{ matrix.progress.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
scriptingRuntime:
- {
name: Net3.5,
version: 0,
apiCompatibilityLevel: 2
}
- {
name: Net4.x,
version: 1,
apiCompatibilityLevel: 6
}
mode:
- {
name: Release,
symbol: PROTO_PROMISE_DEBUG_DISABLE
}
- {
name: Debug,
symbol: PROTO_PROMISE_DEBUG_ENABLE
}
progress:
- {
name: Progress_Enabled,
symbol: PROTO_PROMISE_PROGRESS_ENABLE
}
- {
name: Progress_Disabled,
symbol: PROTO_PROMISE_PROGRESS_DISABLE
}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Rewrite ProjectSettings
run: |
DefineSymbols="${{ matrix.mode.symbol }};${{ matrix.progress.symbol }}"
DefineOriginal=" scriptingDefineSymbols: {}"
DefineReplace=" scriptingDefineSymbols: \\n 13: $DefineSymbols"
sed -i "{s/$DefineOriginal/$DefineReplace/g}" ProtoPromise_Unity/ProjectSettings/ProjectSettings.asset
RuntimeOriginal=" scriptingRuntimeVersion: 0"
RuntimeReplace=" scriptingRuntimeVersion: ${{ matrix.scriptingRuntime.version }}"
sed -i "{s/$RuntimeOriginal/$RuntimeReplace/g}" ProtoPromise_Unity/ProjectSettings/ProjectSettings.asset
ApiOriginal=" apiCompatibilityLevel: 2"
ApiReplace=" apiCompatibilityLevel: ${{ matrix.scriptingRuntime.apiCompatibilityLevel }}"
sed -i "{s/$ApiOriginal/$ApiReplace/g}" ProtoPromise_Unity/ProjectSettings/ProjectSettings.asset
- name: Build Project
uses: game-ci/unity-builder@v3
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE_2018_4_36F1_UBUNTU }}
with:
projectPath: ProtoPromise_Unity
targetPlatform: WebGL
buildMethod: UnityBuilderAction.BuildScript.Build
allowDirtyBuild: true
timeout-minutes: 90