-
Notifications
You must be signed in to change notification settings - Fork 49
134 lines (116 loc) · 4.49 KB
/
main.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Build
on:
push:
branches:
- master
- release
jobs:
#This job builds the main non-platform depent packages
build-core:
name: "Build-UWB-Main"
runs-on: ubuntu-22.04
steps:
# Checkout Repo
- uses: actions/checkout@v4
with:
fetch-depth: 0
#Setup the Environment
- uses: actions/setup-dotnet@v4
name: Setup .NET
with:
dotnet-version: "8.0.x"
# Build shared
- name: Build Shared
run: python build_shared.py
working-directory: src/DevScripts/
# Restore Unity's cache
- name: Unity Cache
uses: actions/cache@v4
with:
path: src/UnityWebBrowser.UnityProject/Library
key: Cache-Unity
# Build the Unity project
- name: Build Unity Project
uses: game-ci/unity-builder@v4
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
projectPath: src/UnityWebBrowser.UnityProject/
targetPlatform: StandaloneLinux64
buildsPath: src/UnityWebBrowser.UnityProject/Builds
versioning: Tag
# Create an output directory for artifacts
- name: Create Artifacts Staging Directory
shell: pwsh
run: mkdir ${{ github.workspace }}/UWBStaging/
# Pack UWB Core
- name: Pack Core Package
shell: pwsh
run: npm pack --pack-destination ${{ github.workspace }}/UWBStaging/
working-directory: src/Packages/UnityWebBrowser
# Pack UWB Pipes Communication
- name: Pack Pipes Communication Package
shell: pwsh
run: npm pack --pack-destination ${{ github.workspace }}/UWBStaging/
working-directory: src/Packages/UnityWebBrowser.Communication.Pipes
# Upload Packed Packages
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: UWB-Core
path: ${{ github.workspace }}/UWBStaging/*.tgz
build-engine-cef:
strategy:
matrix:
os: [windows-2022, ubuntu-22.04]
include:
- os: windows-2022
build: windows64
package: Win-x64
- os: ubuntu-22.04
build: linux64
package: Linux-x64
- os: macos-14
build: macosx64
package: MacOS-x64
- os: macos-14
build: macosarm64
package: MacOS-arm64
runs-on: ${{ matrix.os }}
name: Build-UWB-Engine-CEF-${{ matrix.package }}
steps:
# Checkout Repo
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
# Setup the Environment
- uses: actions/setup-dotnet@v4
name: Setup .NET
with:
dotnet-version: "8.0.x"
# Download CEF
- name: Download CEF ${{ matrix.build }}
run: python download_cef_${{ matrix.build }}.py
working-directory: src/DevScripts/
# Build CEF Engine
- name: Build CEF Engine ${{ matrix.build }}
run: python build_cef_${{ matrix.build }}.py
working-directory: src/DevScripts/
# Create an output directory for artifacts
- name: Create Artifacts Staging Directory
shell: pwsh
run: mkdir ${{ github.workspace }}/UWBStaging/
# Pack UWB Core
- name: Pack CEF Engine ${{ matrix.package }} Package
shell: pwsh
run: npm pack --pack-destination ${{ github.workspace }}/UWBStaging/
working-directory: src/Packages/UnityWebBrowser.Engine.Cef.${{ matrix.package }}
# Upload Packed Packages
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: UWB-Engine-CEF-${{ matrix.package }}
path: ${{ github.workspace }}/UWBStaging/*.tgz