forked from FluidSynth/fluidsynth
-
Notifications
You must be signed in to change notification settings - Fork 0
664 lines (608 loc) · 23.5 KB
/
windows.yml
File metadata and controls
664 lines (608 loc) · 23.5 KB
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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
name: Fluidsynth Windows
on:
workflow_dispatch:
pull_request:
push:
paths-ignore:
- '.azure/**'
- '.circleci/**'
- '.github/workflows/sonarcloud.yml'
- '.github/workflows/solaris.yml'
- '.github/workflows/linux.yml'
- '.github/workflows/ios.yml'
- '.cirrus.yml'
- 'README.md'
tags:
- 'v*'
env:
BUILD_TYPE: RelWithDebInfo
INSTALL_LOCATION: fluidsynth_install
GTK_BUNDLE_X86: 'http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip'
GTK_BUNDLE_X64: 'http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip'
LIBSNDFILE_URL_X86: 'https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2-win32.zip'
LIBSNDFILE_URL_X64: 'https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2-win64.zip'
MINGW_URL_X64: 'https://sourceforge.net/projects/mingw-w64/files/Toolchains%%20targetting%%20Win64/Personal%%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z'
MINGW_URL_X86: 'https://sourceforge.net/projects/mingw-w64/files/Toolchains%%20targetting%%20Win32/Personal%%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/i686-8.1.0-release-win32-sjlj-rt_v6-rev0.7z'
SDL3_URL: 'https://github.com/libsdl-org/SDL/releases/download/release-3.2.10/SDL3-devel-3.2.10-VC.zip'
jobs:
# MSVC builds migrated from Azure Pipeline Windows10 job
msvc-build:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
include:
- platform: Win32
platformAlt: x86
osal: "glib"
CFLAGS: ""
CXXFLAGS: ""
CMAKEFLAGS: ""
dep_arch: "x86"
- platform: Win32
platformAlt: x86
osal: "cpp11"
CFLAGS: "/arch:IA32"
CXXFLAGS: "/arch:IA32"
CMAKEFLAGS: ""
dep_arch: "x86"
- platform: x64
platformAlt: x64
osal: "glib"
CFLAGS: ""
CXXFLAGS: ""
CMAKEFLAGS: ""
dep_arch: "x64"
- platform: x64
platformAlt: x64
osal: "cpp11"
CFLAGS: ""
CXXFLAGS: ""
CMAKEFLAGS: ""
dep_arch: "x64"
name: 🔨 MSVC ${{ matrix.platformAlt }} ${{ matrix.osal }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: true
- name: Setup dependencies
shell: cmd
run: |
@ECHO ON
mkdir d:\deps || exit /b 1
cd d:\deps || exit /b 1
if "${{ matrix.dep_arch }}"=="x86" (
set GTK_URL=${{ env.GTK_BUNDLE_X86 }}
set LIBSNDFILE_URL=${{ env.LIBSNDFILE_URL_X86 }}
) else (
set GTK_URL=${{ env.GTK_BUNDLE_X64 }}
set LIBSNDFILE_URL=${{ env.LIBSNDFILE_URL_X64 }}
)
if not "%GTK_URL%"=="" (
curl -LfsS -o gtk-bundle-dev.zip "%GTK_URL%" || exit /b 1
7z x -aos -- gtk-bundle-dev.zip > NUL || exit /b 1
)
if not "%LIBSNDFILE_URL%"=="" (
curl -LfsS -o libsndfile-dev.zip "%LIBSNDFILE_URL%" || exit /b 1
7z x -aos -- libsndfile-dev.zip > NUL || exit /b 1
)
curl -LfsS -o sdl3-dev.zip "%SDL3_URL%" || exit /b 1
7z x -aos -- sdl3-dev.zip > NUL || exit /b 1
del *.zip
if exist libsndfile-* (
cd libsndfile-*
xcopy /E /I /Y * ..
cd ..
rmdir /S /Q libsndfile-*
)
cd SDL3-*
COPY lib\${{ matrix.platformAlt }}\SDL3.dll d:\deps\bin\ || echo SDL3.dll copy failed
COPY lib\${{ matrix.platformAlt }}\SDL3* d:\deps\bin || echo SDL3 lib copy failed
xcopy /E /I /Y * ..
cd ..
rmdir /S /Q SDL3-*
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
- name: Configure CMake
shell: cmd
run: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
pkg-config --list-all || echo pkg-config failed
mkdir build && cd build || exit /b 1
cmake -Werror=dev -A ${{ matrix.platform }} -T v143 ^
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\${{ env.INSTALL_LOCATION }} ^
-Denable-readline=0 -Denable-floats=1 -Denable-jack=0 -Denable-sdl3=0 ^
-Dosal=${{ matrix.osal }} -Denable-libinstpatch=0 -Denable-dls=1 ^
${{ matrix.CMAKEFLAGS }} -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
-DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 .. || exit /b 1
- name: Build
shell: cmd
run: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
cd build || exit /b 1
cmake --build . --config Release --parallel 3 || exit /b 1
- name: Test
shell: cmd
run: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
cd build || exit /b 1
cmake --build . --config Release --target check || exit /b 1
- name: Demo
shell: cmd
run: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
cd build || exit /b 1
cmake --build . --config Release --target demo || exit /b 1
- name: Install
shell: cmd
run: |
@ECHO ON
cd build
cmake --build . --config Release --target install || exit /b 1
del "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\concrt*.dll"
del "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\vcruntime*.dll"
del "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\msvcp*.dll"
rmdir "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\lib\x86"
rmdir "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\lib\x64"
cd d:\deps\bin\
dir
COPY SDL3.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
COPY sndfile.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
if "${{ matrix.osal }}"=="glib" (
COPY libglib-2.0-0.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
COPY libgobject-2.0-0.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
COPY libgthread-2.0-0.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
COPY intl.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
COPY libintl-8.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
)
exit 0
- name: Validate library
shell: bash
working-directory: ${{ env.INSTALL_LOCATION }}
run: |
if [ ! -f "bin/libfluidsynth-3.dll" ] || [ ! -f "lib/libfluidsynth-3.lib" ]; then
echo "Fluidsynth library has unexpected filename!"
ls -la . bin lib
exit 1
fi
- name: Set artifact name
shell: bash
id: artifact_name
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
echo "name=fluidsynth-${{ github.ref_name }}" >> $GITHUB_OUTPUT
else
echo "name=fluidsynth-${{ github.run_id }}" >> $GITHUB_OUTPUT
fi
- name: Upload Artifacts
uses: actions/upload-artifact@v7
with:
name: ${{ steps.artifact_name.outputs.name }}-win10-${{ matrix.platformAlt }}-${{ matrix.osal }}
path: ${{ env.INSTALL_LOCATION }}
retention-days: 14
overwrite: true
# Additional MSVC builds migrated from Azure Pipeline Windows10Additional job
msvc-additional:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
include:
- CMAKE_FLAGS: ""
CMAKE_CONFIG: Release
name: "default"
- CMAKE_FLAGS: "-Denable-profiling=1 -Denable-trap-on-fpe=1 -Denable-fpe-check=1"
CMAKE_CONFIG: Debug
name: "debug_prof"
- CMAKE_FLAGS: "-Denable-network=0"
CMAKE_CONFIG: Release
name: "no_network"
- CMAKE_FLAGS: "-DBUILD_SHARED_LIBS=0"
CMAKE_CONFIG: Release
name: "static_lib"
- CMAKE_FLAGS: "-Dosal=cpp11"
CMAKE_CONFIG: Release
name: "osal_cpp11"
- CMAKE_FLAGS: "-Denable-ipv6=0 -Denable-network=0 -Denable-aufile=0 -Denable-threads=0 -Denable-winmidi=0 -Denable-waveout=0 -Denable-dsound=0 -Denable-libsndfile=0 -Denable-floats=1"
CMAKE_CONFIG: Release
name: "minimal"
name: 🔧 MSVC Additional (${{ matrix.name }})
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: true
- name: Setup dependencies
shell: cmd
run: |
@ECHO ON
mkdir d:\deps || exit /b 1
cd d:\deps || exit /b 1
if not "${{ env.GTK_BUNDLE_X64 }}"=="" (
curl -LfsS -o gtk-bundle-dev.zip "${{ env.GTK_BUNDLE_X64 }}" || exit /b 1
7z x -aos -- gtk-bundle-dev.zip > NUL || exit /b 1
)
if not "${{ env.LIBSNDFILE_URL_X64 }}"=="" (
curl -LfsS -o libsndfile-dev.zip "${{ env.LIBSNDFILE_URL_X64 }}" || exit /b 1
7z x -aos -- libsndfile-dev.zip > NUL || exit /b 1
)
del *.zip 2>nul
if exist libsndfile-* (
cd libsndfile-*
xcopy /E /I /Y * ..
cd ..
rmdir /S /Q libsndfile-*
)
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
- name: Configure CMake
shell: cmd
run: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
mkdir build && cd build || exit /b 1
cmake -Werror=dev -A x64 -T v142 ^
-DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_CONFIG }} ^
-DCMAKE_VERBOSE_MAKEFILE=1 ${{ matrix.CMAKE_FLAGS }} ^
-DNO_GUI=1 -Dwindows-version=0x0A00 -Denable-jack=0 ^
-Denable-pulseaudio=0 -Denable-ladspa=0 -Denable-dbus=0 ^
-Denable-readline=0 -Denable-sdl3=0 -Denable-libinstpatch=0 .. || exit /b 1
- name: Build
shell: cmd
run: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
cd build || exit /b 1
cmake --build . --config ${{ matrix.CMAKE_CONFIG }} --parallel 3 || exit /b 1
- name: Test
shell: cmd
run: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
cd build || exit /b 1
cmake --build . --config ${{ matrix.CMAKE_CONFIG }} --target check || exit /b 1
- name: Demo
shell: cmd
run: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
cd build || exit /b 1
cmake --build . --config ${{ matrix.CMAKE_CONFIG }} --target demo || exit /b 1
# MinGW builds migrated from Azure Pipeline WindowsMinGW job
mingw-build:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
include:
- CMAKE_FLAGS: '-Denable-sdl3=0 -Denable-openmp=0 -Denable-libsndfile=0'
artifactPrefix: "fluidsynth-mingw1"
platform: x86
sdl3-url: 'https://github.com/libsdl-org/SDL/releases/download/release-3.2.10/SDL3-devel-3.2.10-mingw.tar.gz'
sdl3-subdir: 'i686-w64-mingw32'
- CMAKE_FLAGS: '-Denable-sdl3=0 -Denable-openmp=0 -Denable-libsndfile=0 -DCMAKE_C_FLAGS="-mfpmath=387" -DCMAKE_CXX_FLAGS="-mfpmath=387"'
artifactPrefix: "fluidsynth-mingw2"
platform: x86
sdl3-url: 'https://github.com/libsdl-org/SDL/releases/download/release-3.2.10/SDL3-devel-3.2.10-mingw.tar.gz'
sdl3-subdir: 'i686-w64-mingw32'
- CMAKE_FLAGS: '-Denable-sdl3=0 -Denable-openmp=0 -Denable-libsndfile=0 -DCMAKE_RC_FLAGS="-F pe-i386" -DCMAKE_C_FLAGS="-m32 -mfpmath=387" -DCMAKE_CXX_FLAGS="-m32 -mfpmath=387"'
artifactPrefix: "fluidsynth-mingw"
platform: x86
sdl3-url: 'https://github.com/libsdl-org/SDL/releases/download/release-3.2.10/SDL3-devel-3.2.10-mingw.tar.gz'
sdl3-subdir: 'i686-w64-mingw32'
- CMAKE_FLAGS: '-Denable-sdl3=0 -Denable-openmp=0 -Denable-libsndfile=0 -DCMAKE_RC_FLAGS="-F pe-i386" -DCMAKE_C_FLAGS="-m32 -mfpmath=387 -ffloat-store" -DCMAKE_CXX_FLAGS="-m32 -mfpmath=387 -ffloat-store"'
artifactPrefix: "fluidsynth-mingw-ffloat-store"
platform: x86
sdl3-url: 'https://github.com/libsdl-org/SDL/releases/download/release-3.2.10/SDL3-devel-3.2.10-mingw.tar.gz'
sdl3-subdir: 'i686-w64-mingw32'
- CMAKE_FLAGS: "-Denable-openmp=0"
artifactPrefix: "fluidsynth-mingw"
platform: x64
sdl3-url: 'https://github.com/libsdl-org/SDL/releases/download/release-3.2.10/SDL3-devel-3.2.10-mingw.tar.gz'
sdl3-subdir: 'x86_64-w64-mingw32'
- CMAKE_FLAGS: '-DBUILD_SHARED_LIBS=0 -Denable-openmp=0'
artifactPrefix: "fluidsynth-mingw-static"
platform: x64
sdl3-url: 'https://github.com/libsdl-org/SDL/releases/download/release-3.2.10/SDL3-devel-3.2.10-mingw.tar.gz'
sdl3-subdir: 'x86_64-w64-mingw32'
name: 🔧 MinGW ${{ matrix.artifactPrefix }} ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: true
- name: Setup dependencies
shell: cmd
run: |
@ECHO ON
mkdir d:\deps || exit /b 1
cd d:\deps || exit /b 1
if "${{ matrix.platform }}"=="x86" (
set GTK_URL=${{ env.GTK_BUNDLE_X86 }}
set LIBSNDFILE_URL=${{ env.LIBSNDFILE_URL_X86 }}
set MINGW_URL=${{ env.MINGW_URL_X86 }}
) else (
set GTK_URL=${{ env.GTK_BUNDLE_X64 }}
set LIBSNDFILE_URL=${{ env.LIBSNDFILE_URL_X64 }}
set MINGW_URL=${{ env.MINGW_URL_X64 }}
)
if not "%GTK_URL%"=="" (
curl -LfsS -o gtk-bundle-dev.zip "%GTK_URL%" || exit /b 1
7z x -aos -- gtk-bundle-dev.zip > NUL || exit /b 1
)
if not "%LIBSNDFILE_URL%"=="" (
curl -LfsS -o libsndfile-dev.zip "%LIBSNDFILE_URL%" || exit /b 1
7z x -aos -- libsndfile-dev.zip > NUL || exit /b 1
)
if not "%MINGW_URL%"=="" (
curl -LfsS -o mingw.zip "%MINGW_URL%" || exit /b 1
7z x -aos -- mingw.zip > NUL || exit /b 1
)
curl -LfsS -o sdl3.tar.gz "${{ matrix.sdl3-url }}" || exit /b 1
tar xzf sdl3.tar.gz > NUL || exit /b 1
del *.zip *.tar.gz 2>nul
if exist SDL3-* (
cd SDL3-*
xcopy /E /I /Y * ..
cd ..
rmdir /S /Q SDL3-*
)
if exist libsndfile-* (
cd libsndfile-*
xcopy /E /I /Y * ..
cd ..
rmdir /S /Q libsndfile-*
)
if exist mingw* (
cd mingw*
xcopy /E /I /Y * ..
cd ..
rmdir /S /Q mingw*
)
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
- name: Configure CMake
shell: cmd
run: |
@ECHO ON
SET "PATH=d:\deps\bin;d:\deps\${{ matrix.sdl3-subdir }}\bin;%PATH%"
REM remove Git paths to avoid sh.exe conflicts
set PATH=%PATH:C:\Program Files\Git\bin;=%
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
pkg-config --list-all || echo pkg-config failed
mkdir build && cd build || exit /b 1
cmake -Werror=dev -G "MinGW Makefiles" ^
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\${{ env.INSTALL_LOCATION }} ^
${{ matrix.CMAKE_FLAGS }} -Denable-readline=0 -Denable-floats=1 ^
-Denable-jack=0 -Denable-pulseaudio=0 -Denable-ladspa=0 ^
-Denable-dbus=0 -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 .. || exit /b 1
- name: Build
shell: cmd
run: |
@ECHO ON
SET "PATH=d:\deps\bin;d:\deps\${{ matrix.sdl3-subdir }}\bin;%PATH%"
set PATH=%PATH:C:\Program Files\Git\bin;=%
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
cd build || exit /b 1
mingw32-make.exe -j3 all || exit /b 1
- name: Test
shell: cmd
run: |
@ECHO ON
SET "PATH=d:\deps\bin;d:\deps\${{ matrix.sdl3-subdir }}\bin;%PATH%"
set PATH=%PATH:C:\Program Files\Git\bin;=%
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
cd build || exit /b 1
mingw32-make.exe -j4 check || exit /b 1
- name: Demo
shell: cmd
run: |
@ECHO ON
SET "PATH=d:\deps\bin;d:\deps\${{ matrix.sdl3-subdir }}\bin;%PATH%"
set PATH=%PATH:C:\Program Files\Git\bin;=%
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
cd build || exit /b 1
mingw32-make.exe -j4 demo || exit /b 1
- name: Install
shell: cmd
run: |
@ECHO ON
cd build
mingw32-make.exe install || exit /b 1
xcopy d:\deps\bin\libgcc_s_sjlj-1.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\" /Y 2>nul
xcopy d:\deps\bin\libgcc_s_seh-1.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\" /Y 2>nul
xcopy d:\deps\bin\libgomp-1.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\" /Y 2>nul
xcopy d:\deps\bin\libstdc++-6.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\" /Y 2>nul
xcopy d:\deps\bin\libwinpthread-1.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\" /Y 2>nul
xcopy d:\deps\${{ matrix.sdl3-subdir }}\bin\SDL3.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\" /Y 2>nul
del "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\concrt*.dll" 2>nul
del "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\vcruntime*.dll" 2>nul
del "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\msvcp*.dll" 2>nul
- name: Validate library (shared)
if: ${{ !contains(matrix.artifactPrefix, 'static') }}
shell: bash
working-directory: ${{ env.INSTALL_LOCATION }}
run: |
if [ ! -f "bin/libfluidsynth-3.dll" ] || [ ! -f "lib/libfluidsynth-3.dll.a" ]; then
echo "Fluidsynth library has unexpected filename!"
ls -la . bin lib
exit 1
fi
- name: Validate library (static)
if: ${{ contains(matrix.artifactPrefix, 'static') }}
shell: bash
working-directory: ${{ env.INSTALL_LOCATION }}
run: |
if [ ! -f "lib/libfluidsynth-3.a" ]; then
echo "Fluidsynth static library has unexpected filename!"
ls -la . bin lib
exit 1
fi
- name: Upload Artifacts
uses: actions/upload-artifact@v7
with:
name: CI-${{ github.run_id }}-mingw-${{ matrix.artifactPrefix }}-${{ matrix.platform }}
path: ${{ env.INSTALL_LOCATION }}
retention-days: 14
overwrite: true
msys2-build:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
include:
- { icon: '⬛', sys: mingw32, osal: glib }
- { icon: '🟦', sys: mingw64, osal: glib }
- { icon: '🟨', sys: ucrt64, osal: glib }
- { icon: '🟧', sys: clang64, osal: glib }
- { icon: '⬛', sys: mingw32, osal: cpp11 }
- { icon: '🟦', sys: mingw64, osal: cpp11 }
- { icon: '🟨', sys: ucrt64, osal: cpp11 }
- { icon: '🟧', sys: clang64, osal: cpp11 }
name: 🚧${{ matrix.icon }} ${{ matrix.sys }} ${{ matrix.osal }}
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: '${{ matrix.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
release: false
msystem: ${{matrix.sys}}
install: >-
make
libreadline
pacboy: >-
toolchain:p
cmake:p
ninja:p
glib2:p
libsndfile:p
- name: '${{ matrix.icon }} Configure CMake'
run: cmake -B build -Dosal=${{matrix.osal}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_LOCATION}}
- name: '${{ matrix.icon }} Build'
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: '${{ matrix.icon }} Test'
run: cmake --build build --target check
- name: '${{ matrix.icon }} Demo'
run: cmake --build build --target demo
- name: '${{ matrix.icon }} Install'
run: cmake --install build && ls -la $INSTALL_LOCATION
- name: ''
shell: bash
working-directory: ${{env.INSTALL_LOCATION}}
run: |
if [ ! -f "bin/libfluidsynth-3.dll" ] || [ ! -f "lib/libfluidsynth-3.dll.a" ]; then
echo "Fluidsynth library has unexpected filename!"
ls -la . bin lib
exit -1
fi
- name: '${{ matrix.icon }} Upload Artifacts'
uses: actions/upload-artifact@v7
with:
name: CI-${{ github.run_id }}-msys2-${{matrix.sys}}-${{matrix.osal}}
path: ${{env.INSTALL_LOCATION}}
retention-days: 14
overwrite: true
acceptance-test:
needs:
- msvc-build
- msys2-build
- mingw-build
runs-on: windows-2022
name: 🧪 Acceptance Test
steps:
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
pattern: fluidsynth-*
merge-multiple: false
- name: Try to execute fluidsynth
shell: bash
run: |
set -ex
cd artifacts
for dir in */; do
echo "Testing artifact $dir"
"$dir/bin/fluidsynth.exe" --version
done
# Publish artifacts to GitHub releases (only on release events)
publish-release:
if: github.ref_type == 'tag'
needs:
- acceptance-test
- msvc-build
runs-on: ubuntu-latest
name: 🚀 Publish Release Artifacts
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
pattern: fluidsynth-*
merge-multiple: false
- name: Create release archives
run: |
cd artifacts
ls -la
for dir in */; do
echo "Creating archive for $dir"
zip -r "${dir%/}.zip" "$dir"
done
ls -la *.zip
- name: Upload assets to matching Release (draft or published)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
tag="${GITHUB_REF_NAME}"
gh release upload "$tag" artifacts/*.zip --clobber
# Create announcement PR in website repository
announce-release:
if: github.ref_type == 'tag'
needs: [publish-release]
runs-on: ubuntu-22.04
name: 📢 Announce Release
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Generate HTML Release Announcement
run: |
set -e
TAG_NAME="${{ github.ref_name }}"
VERSION="${TAG_NAME#v}"
DATE="$(date +%Y-%m-%d)"
FILENAME="${DATE}-released-fluidsynth-${VERSION//./-}.md"
mkdir -p release_announcement
cat > release_announcement/$FILENAME <<EOF
---
title: Released FluidSynth ${VERSION}
author: Tom Moebert
layout: post
---
A maintenance release for fluidsynth has been released. Details can be found in the release notes:
<https://github.com/FluidSynth/fluidsynth/releases/tag/${TAG_NAME}>
- name: Publish Announcement to GH Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: release_announcement
repository-name: FluidSynth/fluidsynth.github.io
branch: main
target-folder: _posts/
token: ${{ secrets.DEPLOY_API_TOKEN_NEW }}
clean: false
commit-message: Announce FluidSynth ${{ github.ref_name }}
git-config-name: Fluid Release Announcer
git-config-email: fluid-release-bot@fluidsynth.github.io