-
Notifications
You must be signed in to change notification settings - Fork 3
325 lines (316 loc) · 9.75 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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
---
on:
push:
branches: [main]
pull_request:
branches: [main]
name: Build
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-linux:
runs-on: ubuntu-22.04
env:
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
steps:
- name: Install native dependencies
run: |
sudo apt-get update
sudo apt-get install \
libasound2-dev \
libavahi-client-dev \
xorg-dev \
libgtk-3-dev \
libclang-dev \
libudev-dev \
curl \
lld \
ffmpeg \
libavcodec-dev \
libavdevice-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libpostproc-dev \
libswresample-dev \
libswscale-dev \
libass-dev \
libfreetype6-dev \
libgnutls28-dev \
libsdl2-dev \
libtool \
libva-dev \
libvdpau-dev \
libvorbis-dev \
libxcb1-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
zlib1g-dev \
libx264-dev \
libx265-dev \
libnuma-dev \
libvpx-dev \
libmp3lame-dev \
libopus-dev \
libraw1394-dev \
libdc1394-dev \
libavc1394-dev \
libiec61883-dev \
libjack-dev \
libfaad-dev \
libgsm1-dev \
libzmq3-dev \
libssh-dev \
libbluray-dev \
libopenmpt-dev \
ocl-icd-opencl-dev \
libogg-dev \
libspeex-dev \
libtheora-dev \
flite1-dev \
libchromaprint-dev \
libopenal-dev \
libcdio-dev \
libcaca-dev \
libpocketsphinx-dev \
libsphinxbase-dev \
libbs2b-dev \
liblilv-dev \
libsratom-dev \
libsord-dev \
libserd-dev \
librubberband-dev \
libsamplerate0-dev \
libmysofa-dev \
libvidstab-dev \
libgme-dev \
librabbitmq-dev \
libdav1d-dev \
libzvbi-dev \
libsnappy-dev \
libaom-dev \
libcodec2-dev \
libshine-dev \
libtwolame-dev \
libwebp-dev \
libxvidcore-dev \
libsoxr-dev \
libcdio-paranoia-dev \
libcdio-cdda-dev \
libsrt-gnutls-dev \
libmfx-dev \
libvorbis-dev \
libwavpack-dev \
libzimg-dev \
yasm
- uses: taiki-e/install-action@protoc
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: "crates/ui/pubspec.yaml"
- uses: Swatinem/rust-cache@v2
- name: Remove ndi libs from cache
run: rm -rf target/release/deps/libndi* target/release/build/ndi-*
- name: Remove linked flutter libs from cache
run: rm -rf target/release/lib target/release/deps/libflutter_linux_gtk.so
- name: Build Headless
run: make build-headless
- uses: actions/upload-artifact@v4
with:
name: linux-headless
path: target/release/mizer
if-no-files-found: error
- name: Build
run: make build-release
- name: Package
run: make mizer.zip
- uses: actions/upload-artifact@v4
with:
name: linux-full
path: mizer.zip
if-no-files-found: error
bundle-flatpak:
runs-on: ubuntu-latest
needs:
- build-linux
steps:
- name: Install flatpak
run: |
sudo apt-get update
sudo apt-get install -y flatpak flatpak-builder
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Fetch artifact
uses: actions/download-artifact@v4
with:
name: linux-full
- name: Bundle
run: make mizer.flatpak
- uses: actions/upload-artifact@v4
with:
name: Flatpak
path: mizer.flatpak
if-no-files-found: error
verify-linux:
runs-on: ubuntu-latest
needs:
- build-linux
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Fetch artifact
uses: actions/download-artifact@v4
with:
name: linux-full
- name: Unzip artifact
run: unzip mizer.zip -d artifact
- name: Verify ffmpeg is statically linked
working-directory: artifact
run: nm mizer | grep ff_mpeg
build-macos:
runs-on: macos-14
env:
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
steps:
- name: Install build dependencies
run: brew install protobuf ffmpeg pkg-config yasm cbindgen create-dmg
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: "crates/ui/pubspec.yaml"
- uses: Swatinem/rust-cache@v2
- name: Remove ndi libs from cache
run: rm -rf target/release/deps/libndi* target/release/build/ndi-*
- name: Remove linked flutter libs and frameworks from cache
run: rm -rf target/release/lib target/release/*.framework
- name: Build
run: make build-release
env:
LIBUSB_STATIC: "true"
- name: Package
run: make Mizer.dmg
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_NAME: ${{ secrets.MACOS_CERTIFICATE_NAME }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
MACOS_KEYCHAIN_PASSWORD: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.MACOS_NOTARIZATION_APPLE_ID }}
MACOS_NOTARIZATION_PASSWORD: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.MACOS_NOTARIZATION_TEAM_ID }}
LIBUSB_STATIC: "true"
- uses: actions/upload-artifact@v4
with:
name: macos-full
path: Mizer.dmg
if-no-files-found: error
build-windows:
runs-on: windows-latest
env:
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
VCPKG_DISABLE_METRICS: "true"
steps:
- name: Install build dependencies
run: choco install protoc make wget yasm ffmpeg yq imagemagick
shell: bash
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache vcpkg
id: vcpkg-cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/vcpkg
key: vcpkg-${{ runner.os }}-x64-windows-static-md
- name: Setup ffmpeg via vcpkg
if: steps.vcpkg-cache.outputs.cache-hit != 'true'
run: |
git clone https://github.com/microsoft/vcpkg --depth 1
./vcpkg/bootstrap-vcpkg.bat
./vcpkg/vcpkg install ffmpeg:x64-windows
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: "crates/ui/pubspec.yaml"
- uses: Swatinem/rust-cache@v2
- name: Remove ndi libs from cache
run: rm -rf target/release/deps/libndi* target/release/build/ndi-*
shell: bash
- name: Remove linked flutter libs from cache
run: rm -rf target/release/file_selector_windows_plugin.dll
shell: bash
- name: Build
env:
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
run: scripts/build_windows.ps1
- uses: actions/upload-artifact@v4
with:
name: windows-full
path: mizer.zip
build-docker:
runs-on: ubuntu-latest
env:
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
steps:
- uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/maxjoehnk/node-based-mizer
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-android-remote:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: "crates/ui/pubspec.yaml"
- name: Generate FFI bindings
run: make generate_bindings
working-directory: crates/ui
- name: Build
run: flutter build apk -t lib/mobile/main.dart
working-directory: crates/ui
- uses: actions/upload-artifact@v4
with:
name: android-remote
path: crates/ui/build/app/outputs/flutter-apk/app-release.apk
if-no-files-found: error