-
-
Notifications
You must be signed in to change notification settings - Fork 13
54 lines (46 loc) · 1.78 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
# 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.mode.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mode:
- {
name: Release,
symbol: PROTO_PROMISE_DEBUG_DISABLE
}
- {
name: Debug,
symbol: PROTO_PROMISE_DEBUG_ENABLE
}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rewrite ProjectSettings
run: |
DefineSymbols="${{ matrix.mode.symbol }}"
DefineOriginal=" scriptingDefineSymbols: {}"
DefineReplace=" scriptingDefineSymbols: \\n 13: $DefineSymbols"
sed -i "{s/$DefineOriginal/$DefineReplace/g}" ProtoPromise_Unity/ProjectSettings/ProjectSettings.asset
- name: Build Project
uses: game-ci/unity-builder@v4
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE_2018_4_36F1_UBUNTU }}
with:
projectPath: ProtoPromise_Unity
targetPlatform: WebGL
allowDirtyBuild: true
timeout-minutes: 90