This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
212 lines (178 loc) · 7.8 KB
/
build.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
name: Build plugin
on:
push:
workflow_dispatch:
permissions:
contents: write
packages: write
env:
PLUGIN_VERSION: "1.2.0-beta.11"
CPP_SDK_VERSION: "2.6.1"
CPP_SDK_URL: "https://github.com/DolbyIO/comms-sdk-cpp/releases/download"
PLUGIN_SOURCE_DIR: "DolbyIO"
PLUGIN_BUILD_DIR: "Build/DolbyIO"
BUILD_ARGS_COMMON: "BuildPlugin -Rocket -StrictIncludes -Plugin=\"$(pwd)/DolbyIO/DolbyIO.uplugin\" -Package=\"$(pwd)/Build/DolbyIO\""
GH_TOKEN: ${{ github.token }}
RETENTION: 7
jobs:
build-windows:
strategy:
fail-fast: false
matrix:
version: ["4.27", "5.2"]
runs-on: ["self-hosted", "X64", "Windows"]
env:
BUILD_PLATFORM: 'windows'
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Download C++ SDK
uses: ./.github/actions/download_cppsdk/powershell
with:
url: ${{ env.CPP_SDK_URL }}
tag: ${{ env.CPP_SDK_VERSION }}
asset_suffix: "${{ env.BUILD_PLATFORM }}64.zip"
- name: Build plugin
env:
BUILD_COMMAND: "C:/Program` Files/Epic` Games/UE${{ matrix.version }}/Engine/Build/BatchFiles/RunUAT.bat"
BUILD_ARGS_PLATFORM: "-TargetPlatforms=Win64"
run: |
if (${{ matrix.version }} -eq "4.27")
{
${{ env.BUILD_COMMAND }} ${{ env.BUILD_ARGS_COMMON }} ${{ env.BUILD_ARGS_PLATFORM }} -VS2019
}
else
{
${{ env.BUILD_COMMAND }} ${{ env.BUILD_ARGS_COMMON }} ${{ env.BUILD_ARGS_PLATFORM }}
}
- name: Sign plugin
env:
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
uses: ./.github/actions/sign/win
with:
path: ${{ env.PLUGIN_BUILD_DIR }}
platform: ${{ env.BUILD_PLATFORM }}
- name: Zip plugin
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
Compress-Archive -Path . -DestinationPath DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}
path: "${{ env.PLUGIN_BUILD_DIR }}\\DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip"
retention-days: ${{ env.RETENTION }}
- name: Release plugin 🎉
if: startsWith(github.ref, 'refs/tags/')
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
${{ github.workspace }}\\.github\\actions\\upload_assets\\upload_release_asset.ps1 -File DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
build-macos:
if: false
strategy:
fail-fast: false
matrix:
version: ["4.27", "5.2"]
runs-on: ["self-hosted", "X64", "macOS"]
env:
BUILD_PLATFORM: 'macos'
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Download C++ SDK
uses: ./.github/actions/download_cppsdk/bash
with:
url: ${{ env.CPP_SDK_URL }}
tag: ${{ env.CPP_SDK_VERSION }}
asset_suffix: "${{ env.BUILD_PLATFORM }}64-universal.zip"
- name: Remove symlinks from C++ SDK libs
run: |
find "${{ github.workspace }}/${{ env.PLUGIN_SOURCE_DIR }}/sdk-release/lib" -type l -delete
- name: Build plugin
env:
BUILD_ARGS: "BuildPlugin -Rocket -StrictIncludes -Plugin=\"$(pwd)/DolbyIO/DolbyIO.uplugin\" -Package=$(pwd)/Build/DolbyIO -TargetPlatforms=Mac -Architecture_Mac=x64+arm64"
run: |
/Users/Shared/Epic\ Games/UE_${{ matrix.version }}/Engine/Build/BatchFiles/RunUAT.sh ${{ env.BUILD_ARGS }}
- name: Sign plugin
env:
DOLBYIO_KEYCHAIN_PASSWORD: ${{ secrets.VOXEET_KEYCHAIN_PASSWORD }}
uses: ./.github/actions/sign/mac
with:
path: ${{ env.PLUGIN_BUILD_DIR }}
platform: ${{ env.BUILD_PLATFORM }}
- name: Zip plugin
working-directory: Build
run: |
zip -rq DolbyIO/DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip DolbyIO/
- name: Notarize plugin
env:
DOLBYIO_KEYCHAIN_PASSWORD: ${{ secrets.VOXEET_KEYCHAIN_PASSWORD }}
uses: ./.github/actions/notarise/mac
with:
catalog_path: ${{ env.PLUGIN_BUILD_DIR }}
file: DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}
path: "${{ env.PLUGIN_BUILD_DIR }}/DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip"
retention-days: ${{ env.RETENTION }}
- name: Release plugin 🎉
if: startsWith(github.ref, 'refs/tags/')
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
${GITHUB_WORKSPACE}/.github/actions/upload_assets/upload_release_asset.sh DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
build-linux:
if: false
strategy:
fail-fast: false
matrix:
version: ["4.27", "5.2"]
runs-on: ["self-hosted", "X64", "Windows"]
env:
BUILD_PLATFORM: 'linux'
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Download C++ SDK
uses: ./.github/actions/download_cppsdk/powershell
with:
url: ${{ env.CPP_SDK_URL }}
tag: ${{ env.CPP_SDK_VERSION }}
asset_suffix: "ubuntu-20.04-clang10-libc++10.zip"
- name: Resolve C++ SDK lib symlinks
env:
LIB_PATH: "${{ github.workspace }}\\${{ env.PLUGIN_SOURCE_DIR }}\\sdk-release-ubuntu-20.04-clang10-libc++10\\lib"
run: |
Move-Item -Force "${{ env.LIB_PATH }}\\libavcodec.so.59.33.100" "${{ env.LIB_PATH }}\\libavcodec.so.59"
Move-Item -Force "${{ env.LIB_PATH }}\\libavformat.so.59.25.100" "${{ env.LIB_PATH }}\\libavformat.so.59"
Move-Item -Force "${{ env.LIB_PATH }}\\libavutil.so.57.27.100" "${{ env.LIB_PATH }}\\libavutil.so.57"
- name: Build plugin
env:
BUILD_ARGS: "BuildPlugin -Rocket -StrictIncludes -Plugin=\"$(pwd)\\DolbyIO\\DolbyIO.uplugin\" -Package=\"$(pwd)\\Build\\DolbyIO\" -TargetPlatforms=Linux -NoHostPlatform"
run: |
if (${{ matrix.version }} -eq "4.27")
{
$env:LINUX_MULTIARCH_ROOT="C:\\UnrealToolchains\\v19_clang-11.0.1-centos7"
}
else
{
$env:LINUX_MULTIARCH_ROOT="C:\\UnrealToolchains\\v21_clang-15.0.1-centos7"
}
$UAT = "C:\\Program Files\\Epic Games\\UE_${{ matrix.version }}\\Engine\\Build\\BatchFiles\\RunUAT.bat"
& $UAT ${{ env.BUILD_ARGS }}
- name: Zip plugin
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
Compress-Archive -Path . -DestinationPath DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}
path: "${{ env.PLUGIN_BUILD_DIR }}\\DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip"
retention-days: ${{ env.RETENTION }}
- name: Release plugin 🎉
if: startsWith(github.ref, 'refs/tags/')
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
${{ github.workspace }}\\.github\\actions\\upload_assets\\upload_release_asset.ps1 -File DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip