-
-
Notifications
You must be signed in to change notification settings - Fork 67
379 lines (317 loc) · 12.4 KB
/
cmake.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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
name: CMake
on: [push, workflow_dispatch]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 4
jobs:
macos-universal-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: macos
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Check for Code-Signing secrets
id: secret-check
shell: bash
run: |
if [ "${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}" != '' ]; then
echo "available=true" >> $GITHUB_OUTPUT;
else
echo "available=false" >> $GITHUB_OUTPUT;
fi
- name: Import Code-Signing Certificates
uses: figleafteam/import-codesign-certs@v2
if: ${{ steps.secret-check.outputs.available == 'true' }}
with:
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Creating Installer
working-directory: ${{github.workspace}}
env:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
run: ./.github/scripts/package-macOS.sh plugdata-macOS-Universal.pkg
- name: Authorise Google Cloud
if: github.ref == 'refs/heads/develop'
uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Upload to Google Cloud
if: github.ref == 'refs/heads/develop'
uses: "google-github-actions/upload-cloud-storage@v2"
with:
path: ./
glob: ./plugdata-macOS-Universal.*
destination: "plugdata-nightly"
- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: plugdata-macOS-Universal
path: plugdata-macOS-Universal.pkg
- name: Release Artifacts
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: true
draft: true
files: plugdata-macOS-Universal
macos-legacy-build:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: macos-legacy
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DNANOVG_METAL_IMPLEMENTATION=0 -DMACOS_LEGACY=1
- name: Check for Code-Signing secrets
id: secret-check
shell: bash
run: |
if [ "${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}" != '' ]; then
echo "available=true" >> $GITHUB_OUTPUT;
else
echo "available=false" >> $GITHUB_OUTPUT;
fi
- name: Import Code-Signing Certificates
uses: figleafteam/import-codesign-certs@v2
if: ${{ steps.secret-check.outputs.available == 'true' }}
with:
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Creating Installer
working-directory: ${{github.workspace}}
env:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
run: ./.github/scripts/package-macOS.sh plugdata-macOS-Legacy.pkg
- name: Authorise Google Cloud
if: github.ref == 'refs/heads/develop'
uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Upload to Google Cloud
if: github.ref == 'refs/heads/develop'
uses: "google-github-actions/upload-cloud-storage@v2"
with:
path: ./
glob: ./plugdata-macOS-Legacy.*
destination: "plugdata-nightly"
- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: plugdata-macOS-Legacy
path: plugdata-macOS-Legacy.pkg
- name: Release Artifacts
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: true
draft: true
files: plugdata-macOS-Legacy
windows-64-build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -G "Visual Studio 17 2022" -A x64
- name: Build
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Creating Installer
working-directory: ${{github.workspace}}
shell: bash
run: |
./.github/scripts/package-Windows.sh plugdata-Win64.msi
- name: Authorise Google Cloud
if: github.ref == 'refs/heads/develop'
uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Upload to Google Cloud
if: github.ref == 'refs/heads/develop'
uses: "google-github-actions/upload-cloud-storage@v2"
with:
path: ./
glob: ./plugdata-Win64.*
destination: "plugdata-nightly"
- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: plugdata-Win64
path: plugdata-Win64.msi
- name: Release Artifacts
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: true
draft: true
files: plugdata-Win64
windows-32-build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -G "Visual Studio 17 2022" -A Win32
- name: Build
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Creating Installer
working-directory: ${{github.workspace}}
shell: bash
run: |
./.github/scripts/package-Windows.sh plugdata-Win32.msi
- name: Authorise Google Cloud
if: github.ref == 'refs/heads/develop'
uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Upload to Google Cloud
if: github.ref == 'refs/heads/develop'
uses: "google-github-actions/upload-cloud-storage@v2"
with:
path: ./
glob: ./plugdata-Win32.*
destination: "plugdata-nightly"
- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: plugdata-Win32
path: plugdata-Win32.msi
- name: Release Artifacts
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: true
draft: true
files: plugdata-Win32
linux-build:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
container:
image: ${{ matrix.os }}
options: --privileged
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu-22.04-x64
os: ubuntu:22.04
pacman: apt
- name: Ubuntu-24.04-x64
os: ubuntu:24.04
pacman: apt
- name: Debian-x64
os: debian
pacman: apt
- name: Fedora-39-x64
os: fedora:39
pacman: dnf
- name: Fedora-40-x64
os: fedora:40
pacman: dnf
- name: OpenSUSE-Tumbleweed-x64
os: opensuse/tumbleweed
pacman: zypper
- name: Arch-x64
os: archlinux
pacman: pacman
steps:
- name: Install Dependencies (dnf)
if: ${{ matrix.pacman == 'dnf' }}
run: dnf install -y git cmake alsa-lib-devel libXinerama-devel freetype-devel curl libcurl-devel wget bzip2 gcc-c++ libXi-devel libXcomposite-devel freeglut-devel libXrandr-devel libXcursor-devel xz ccache python python3-pip jack-audio-connection-kit-devel libatomic
- name: Install Dependencies (apt)
if: ${{ matrix.pacman == 'apt' }}
run: apt update && DEBIAN_FRONTEND=noninteractive TZ="Europe/Amsterdam" apt install -y cmake git wget bzip2 build-essential libasound2-dev libjack-jackd2-dev curl libcurl4-openssl-dev libfreetype6-dev libx11-dev libxi-dev libxcomposite-dev libxcursor-dev libxcursor-dev libxext-dev libxrandr-dev libxinerama-dev ccache python3 python3-pip freeglut3-dev
- name: Install Dependencies (zypper)
if: ${{ matrix.pacman == 'zypper' }}
run: zypper refresh && zypper install -y git rsync wget bzip2 xz tar gzip cmake alsa-lib-devel libXinerama-devel libXi-devel freetype-devel libcurl-devel libXcomposite-devel freeglut-devel libXrandr-devel libXcursor-devel freetype2-devel gcc gcc-c++ curl ccache python python3-pip libjack-devel gawk
- name: Install Dependencies (pacman)
if: ${{ matrix.pacman == 'pacman' }}
run: pacman -Sy && pacman -S --noconfirm cmake wget bzip2 git alsa-lib freetype2 libx11 libxcursor libxi libxext libxinerama libxrandr libxrender webkit2gtk cmake make gcc pkgconf python python-pip curl ccache freeglut mesa glfw-x11 glew jack2 openssl && pacman --noconfirm -Syu
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Update cmake
working-directory: ${{github.workspace}}
run: ./.github/scripts/install-cmake.sh
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.name }}
- name: Configure
working-directory: ${{github.workspace}}
run: mkdir build && cd build && CXX=g++ cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .. -G "Unix Makefiles"
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Prepare Artefacts
working-directory: ${{github.workspace}}
run: ./.github/scripts/package-Linux.sh plugdata-${{ matrix.name }}.tar.gz
- name: Authorise Google Cloud
if: github.ref == 'refs/heads/develop'
uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Upload to Google Cloud
if: github.ref == 'refs/heads/develop'
uses: "google-github-actions/upload-cloud-storage@v2"
with:
path: ./
glob: plugdata-${{ matrix.name }}.tar.*
destination: "plugdata-nightly"
- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: plugdata-${{ matrix.name }}
path: plugdata-${{ matrix.name }}.tar.gz
- name: Release Artifacts
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: true
draft: true
files: plugdata-${{ matrix.name }}