Skip to content

Commit 001c654

Browse files
authored
Fix precompiled Windows binaries (#1689)
Previously, the precompiled Windows build artifacts lacked the dependency libraries. This has been fixed. Additionally, a regression test has been added to the CI build to automatically execute the `fluidsynth.exe` in every build artifact to ensure it runs successfully.
1 parent 599c8a6 commit 001c654

File tree

1 file changed

+49
-10
lines changed

1 file changed

+49
-10
lines changed

.github/workflows/windows.yml

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,24 @@ jobs:
153153
@ECHO ON
154154
cd build
155155
cmake --build . --config Release --target install || exit /b 1
156-
del "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\concrt*.dll" 2>nul || exit 0
157-
del "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\vcruntime*.dll" 2>nul || exit 0
158-
del "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\msvcp*.dll" 2>nul || exit 0
159-
rmdir "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\lib\x86" 2>nul || exit 0
160-
rmdir "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\lib\x64" 2>nul || exit 0
156+
del "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\concrt*.dll"
157+
del "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\vcruntime*.dll"
158+
del "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\msvcp*.dll"
159+
rmdir "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\lib\x86"
160+
rmdir "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\lib\x64"
161+
162+
cd d:\deps\bin\
163+
dir
164+
COPY SDL3.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
165+
COPY sndfile.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
166+
if "${{ matrix.osal }}"=="glib" (
167+
COPY libglib-2.0-0.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
168+
COPY libgobject-2.0-0.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
169+
COPY libgthread-2.0-0.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
170+
COPY intl.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
171+
COPY libintl-8.dll "${{ github.workspace }}\${{ env.INSTALL_LOCATION }}\bin\
172+
)
173+
exit 0
161174
162175
- name: Validate library
163176
shell: bash
@@ -176,7 +189,7 @@ jobs:
176189
if [[ "${{ github.event_name }}" == "release" ]]; then
177190
echo "name=fluidsynth-${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
178191
else
179-
echo "name=CI-${{ github.run_id }}" >> $GITHUB_OUTPUT
192+
echo "name=fluidsynth-${{ github.run_id }}" >> $GITHUB_OUTPUT
180193
fi
181194
182195
- name: Upload Artifacts
@@ -513,29 +526,54 @@ jobs:
513526
retention-days: 14
514527
overwrite: true
515528

529+
acceptance-test:
530+
needs:
531+
- msvc-build
532+
- msys2-build
533+
- mingw-build
534+
runs-on: windows-2022
535+
name: 🧪 Acceptance Test
536+
steps:
537+
- name: Download all artifacts
538+
uses: actions/download-artifact@v5
539+
with:
540+
path: artifacts
541+
pattern: fluidsynth-*
542+
merge-multiple: false
543+
544+
- name: Try to execute fluidsynth
545+
shell: bash
546+
run: |
547+
set -ex
548+
cd artifacts
549+
for dir in */; do
550+
echo "Testing artifact $dir"
551+
"$dir/bin/fluidsynth.exe" --version
552+
done
553+
516554
# Publish artifacts to GitHub releases (only on release events)
517555
publish-release:
518556
if: github.event_name == 'release' && github.event.action == 'published'
519-
needs: [msvc-build]
557+
needs:
558+
- acceptance-test
559+
- msvc-build
520560
runs-on: ubuntu-latest
561+
name: 🚀 Publish Release Artifacts
521562
steps:
522563
- name: Download all artifacts
523564
uses: actions/download-artifact@v5
524565
with:
525566
path: artifacts
526567
pattern: fluidsynth-*
527568
merge-multiple: false
528-
tag_name: ${{ github.event.release.tag_name }}
529569

530570
- name: Create release archives
531571
run: |
532572
cd artifacts
533573
ls -la
534574
for dir in */; do
535-
if [[ "$dir" == fluidsynth* ]]; then
536575
echo "Creating archive for $dir"
537576
zip -r "${dir%/}.zip" "$dir"
538-
fi
539577
done
540578
ls -la *.zip
541579
@@ -552,6 +590,7 @@ jobs:
552590
if: github.event_name == 'release' && github.event.action == 'published'
553591
needs: [publish-release]
554592
runs-on: ubuntu-22.04
593+
name: 📢 Announce Release
555594
steps:
556595
- uses: actions/checkout@v5
557596
with:

0 commit comments

Comments
 (0)