From 642fbd9c627bd7b5a1092bcf17be75d5c9fc854e Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 13:54:45 +0200 Subject: [PATCH 01/14] Update vcpkg ref --- .azure/azure-pipelines-vcpkg.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/azure-pipelines-vcpkg.yml b/.azure/azure-pipelines-vcpkg.yml index 3918115b5..9fb62691d 100644 --- a/.azure/azure-pipelines-vcpkg.yml +++ b/.azure/azure-pipelines-vcpkg.yml @@ -34,7 +34,7 @@ variables: toolset: 'v142' generator: 'Visual Studio 16 2019' configuration: 'RelWithDebInfo' - VCPKG_REVISION: 'acc3bcf76b84ae5041c86ab55fe138ae7b8255c7' + VCPKG_REVISION: '9d47b24eacbd1cd94f139457ef6cd35e5d92cc84' jobs: - job: vcpkg From 348c90306505640033ac8c703cc83a25544217eb Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 14:00:09 +0200 Subject: [PATCH 02/14] debug pulse mac --- .azure/azure-pipelines-mac.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure/azure-pipelines-mac.yml b/.azure/azure-pipelines-mac.yml index 90be1439c..1d8b9361a 100644 --- a/.azure/azure-pipelines-mac.yml +++ b/.azure/azure-pipelines-mac.yml @@ -69,6 +69,7 @@ jobs: set -ex PACKAGES="glib gobject-introspection libsndfile pkg-config jack dbus-glib pulseaudio portaudio sdl2 libomp readline" brew install $PACKAGES + find / -name "simple.h" displayName: 'Prerequisites' - script: | set -ex From f3538b788bce90d13c3cd6ee997dc9296b865519 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 14:24:29 +0200 Subject: [PATCH 03/14] debug mac --- .azure/azure-pipelines-mac.yml | 11 ++++++++++- CMakeLists.txt | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.azure/azure-pipelines-mac.yml b/.azure/azure-pipelines-mac.yml index 1d8b9361a..9fa1596f1 100644 --- a/.azure/azure-pipelines-mac.yml +++ b/.azure/azure-pipelines-mac.yml @@ -69,7 +69,6 @@ jobs: set -ex PACKAGES="glib gobject-introspection libsndfile pkg-config jack dbus-glib pulseaudio portaudio sdl2 libomp readline" brew install $PACKAGES - find / -name "simple.h" displayName: 'Prerequisites' - script: | set -ex @@ -114,6 +113,16 @@ jobs: echo $? displayName: 'Consume from pkg-config' condition: and(succeeded(), contains(variables.CMakeFlags, 'Denable-framework=0')) + # regression test for #1266 + - script: | + set -e + rm -rf build + mkdir build && cd build + export PKG_CONFIG_PATH="$(brew --prefix libffi)/lib/pkgconfig" + cmake -G Xcode -Denable-sdl2=0 -Denable-readline=0 -Denable-dbus=0 .. + xcodebuild + displayName: 'Test CMake XCode Generator' + condition: and(succeeded(), not(contains(variables.CMakeFlags, 'Denable-framework=0'))) - job: macOS_ports diff --git a/CMakeLists.txt b/CMakeLists.txt index 704d18fe9..6f404dd9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -547,13 +547,15 @@ endif ( enable-libsndfile ) unset ( PULSE_SUPPORT CACHE ) if ( enable-pulseaudio ) - find_package ( PulseAudio ${PULSEAUDIO_MINIMUM_VERSION} QUIET ) + find_package ( PulseAudio ${PULSEAUDIO_MINIMUM_VERSION} ) # Upstream config does not search for pulse-simple find_library ( PULSEAUDIO_SIMPLE_LIBRARY NAMES "pulse-simple" ) if ( PULSEAUDIO_FOUND AND PULSEAUDIO_SIMPLE_LIBRARY ) set ( PULSE_SUPPORT TRUE ) set ( PULSEAUDIO_LIBRARIES ${PULSEAUDIO_SIMPLE_LIBRARY} ${PULSEAUDIO_LIBRARY} ) message ( STATUS "Found PulseAudio: ${PULSEAUDIO_LIBRARIES}" ) + message ( STATUS "PULSEAUDIO_INCLUDE_DIRS: ${PULSEAUDIO_INCLUDE_DIRS}" ) + message ( STATUS "PULSEAUDIO_INCLUDE_DIR: ${PULSEAUDIO_INCLUDE_DIR}" ) list( APPEND PC_REQUIRES_PRIV "libpulse-simple") else ( PULSEAUDIO_FOUND AND PULSEAUDIO_SIMPLE_LIBRARY ) message( STATUS "Could NOT find PulseAudio (Set PulseAudio_DIR to the directory containing its CMake config)" ) From 5935acab18cbabc9c1b613be01f7eb9c3949a841 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 14:27:41 +0200 Subject: [PATCH 04/14] bump vcpkg --- .azure/azure-pipelines-vcpkg.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/azure-pipelines-vcpkg.yml b/.azure/azure-pipelines-vcpkg.yml index 9fb62691d..52e3cafb8 100644 --- a/.azure/azure-pipelines-vcpkg.yml +++ b/.azure/azure-pipelines-vcpkg.yml @@ -34,7 +34,7 @@ variables: toolset: 'v142' generator: 'Visual Studio 16 2019' configuration: 'RelWithDebInfo' - VCPKG_REVISION: '9d47b24eacbd1cd94f139457ef6cd35e5d92cc84' + VCPKG_REVISION: 'fc59c2a30a99536e8fb6e085c228e9f724dd87d0' jobs: - job: vcpkg From 9ebb54edbfb0cd02e1a1b6cf4a076f7dfc573120 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 14:33:30 +0200 Subject: [PATCH 05/14] fix mac --- CMakeLists.txt | 2 -- src/CMakeLists.txt | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f404dd9f..986b59419 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -554,8 +554,6 @@ if ( enable-pulseaudio ) set ( PULSE_SUPPORT TRUE ) set ( PULSEAUDIO_LIBRARIES ${PULSEAUDIO_SIMPLE_LIBRARY} ${PULSEAUDIO_LIBRARY} ) message ( STATUS "Found PulseAudio: ${PULSEAUDIO_LIBRARIES}" ) - message ( STATUS "PULSEAUDIO_INCLUDE_DIRS: ${PULSEAUDIO_INCLUDE_DIRS}" ) - message ( STATUS "PULSEAUDIO_INCLUDE_DIR: ${PULSEAUDIO_INCLUDE_DIR}" ) list( APPEND PC_REQUIRES_PRIV "libpulse-simple") else ( PULSEAUDIO_FOUND AND PULSEAUDIO_SIMPLE_LIBRARY ) message( STATUS "Could NOT find PulseAudio (Set PulseAudio_DIR to the directory containing its CMake config)" ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 114fa1632..0b1566c21 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -360,7 +360,8 @@ if ( TARGET SndFile::sndfile AND LIBSNDFILE_SUPPORT ) endif() if ( PULSE_SUPPORT ) - target_include_directories( libfluidsynth-OBJ PRIVATE ${PULSEAUDIO_INCLUDE_DIRS} ) + # need to include PULSEAUDIO_INCLUDE_DIR to make it compile with homebrew on Mac + target_include_directories( libfluidsynth-OBJ PRIVATE ${PULSEAUDIO_INCLUDE_DIRS} ${PULSEAUDIO_INCLUDE_DIR} ) target_link_libraries ( libfluidsynth-OBJ PUBLIC ${PULSEAUDIO_LIBRARIES} ) endif() From 99c344dc5c4b85723235f9dfbbd0c9f95d6dd69f Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 14:51:32 +0200 Subject: [PATCH 06/14] Update sonarscanner --- .github/workflows/sonarcloud.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 2b95d072d..db5696aed 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -85,11 +85,16 @@ jobs: ls -la ${{ github.workspace }}/build ls -la ${{ github.workspace }}/build/coverage + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' # See 'Supported distributions' for available options + java-version: '17' + # The official sonarsource/sonarcloud-github-action@v1.5 action does not work properly. # It keeps complaining that the build-wrapper.json cannot be found. # Hence, use a third party action to download and add sonar-scanner to PATH and then run it manually. - name: Setup sonarqube - uses: warchant/setup-sonar-scanner@v3 + uses: warchant/setup-sonar-scanner@v6 - name: Run sonarqube env: @@ -101,3 +106,5 @@ jobs: -Dsonar.coverageReportPaths=build/coverage/sonarqube.report -Dsonar.verbose=false -Dsonar.host.url=https://sonarcloud.io/ + -Dsonar.organization=fluidsynth + -Dsonar.projectKey=fluidsynth From 362a325195f08bffb395d134ecfaa498d97bd1ba Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 14:57:14 +0200 Subject: [PATCH 07/14] Fix FreeBSD CI? --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 183282b9e..99bbd6c44 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -4,7 +4,7 @@ task: freebsd_instance: matrix: image_family: freebsd-13-2 - image_family: freebsd-13-1 + image_family: freebsd-12-4 install_script: pwd && ls -la && pkg update --force && pkg install -y cmake glib alsa-lib ladspa portaudio pulseaudio pkgconf sdl2 From 782c3ac084eb61395f19436b6709b3454c0df275 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 15:05:37 +0200 Subject: [PATCH 08/14] fix sq? --- .github/workflows/sonarcloud.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index db5696aed..d45fb8d28 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -104,7 +104,7 @@ jobs: -Dsonar.login=${{ secrets.SONAR_TOKEN }} -Dsonar.cfamily.build-wrapper-output=${{ github.workspace }}/build/bw-output -Dsonar.coverageReportPaths=build/coverage/sonarqube.report - -Dsonar.verbose=false + -Dsonar.verbose=true -Dsonar.host.url=https://sonarcloud.io/ -Dsonar.organization=fluidsynth - -Dsonar.projectKey=fluidsynth + -Dsonar.projectKey=FluidSynth_fluidsynth From e9593156fec783c415db6a04e09529106416c5d9 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 15:40:52 +0200 Subject: [PATCH 09/14] fix sq? --- .github/workflows/sonarcloud.yml | 28 +++++++++++----------------- sonar-project.properties | 2 +- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index d45fb8d28..1754d0f2c 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -17,6 +17,7 @@ env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) # Use Debug build for better code coverage results BUILD_TYPE: Debug + BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed name: SonarCloud Workflow jobs: @@ -60,20 +61,23 @@ jobs: shell: bash working-directory: ${{github.workspace}}/build run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Werror=dev -Denable-portaudio=1 -Denable-ladspa=1 -Denable-coverage=1 -DNO_GUI=1 $GITHUB_WORKSPACE + + - name: Install sonar-scanner and build-wrapper + uses: SonarSource/sonarcloud-github-c-cpp@v1 - name: Build working-directory: ${{github.workspace}}/build shell: bash # Execute the build. You can specify a specific target with "--target " run: | - ./build-wrapper-linux-x86-64 --out-dir bw-output make + build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make - name: Test working-directory: ${{github.workspace}}/build shell: bash # Execute tests defined by the CMake configuration. run: | - ./build-wrapper-linux-x86-64 --out-dir bw-output make coverage + build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make coverage # sonar-scanner does not like utf8 filenames - name: Prepare for Sonar @@ -90,21 +94,11 @@ jobs: distribution: 'temurin' # See 'Supported distributions' for available options java-version: '17' -# The official sonarsource/sonarcloud-github-action@v1.5 action does not work properly. -# It keeps complaining that the build-wrapper.json cannot be found. -# Hence, use a third party action to download and add sonar-scanner to PATH and then run it manually. - - name: Setup sonarqube - uses: warchant/setup-sonar-scanner@v6 - - - name: Run sonarqube + - name: Run sonar-scanner + working-directory: ${{github.workspace}}/build env: - # to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: sonar-scanner - -Dsonar.login=${{ secrets.SONAR_TOKEN }} - -Dsonar.cfamily.build-wrapper-output=${{ github.workspace }}/build/bw-output + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" -Dsonar.coverageReportPaths=build/coverage/sonarqube.report - -Dsonar.verbose=true - -Dsonar.host.url=https://sonarcloud.io/ - -Dsonar.organization=fluidsynth - -Dsonar.projectKey=FluidSynth_fluidsynth diff --git a/sonar-project.properties b/sonar-project.properties index c1d7eb142..6fe015e69 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,7 +1,7 @@ sonar.projectKey=FluidSynth_fluidsynth sonar.organization=fluidsynth -sonar.cfamily.threads=4 +sonar.cfamily.threads=2 sonar.cfamily.cache.enabled=false From d457fa4342d596423e6c5628cfc402cc8bd98d90 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 15:46:11 +0200 Subject: [PATCH 10/14] fix sq? --- .github/workflows/sonarcloud.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 1754d0f2c..889757879 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -95,10 +95,9 @@ jobs: java-version: '17' - name: Run sonar-scanner - working-directory: ${{github.workspace}}/build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | - sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" - -Dsonar.coverageReportPaths=build/coverage/sonarqube.report + sonar-scanner --define sonar.cfamily.build-wrapper-output="${{github.workspace}}/build/${{ env.BUILD_WRAPPER_OUT_DIR }}" + -Dsonar.coverageReportPaths=${{github.workspace}}/build/coverage/sonarqube.report From ee57c1c15c490e7c2729ee3c54f2a8f5732a9704 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 15:56:41 +0200 Subject: [PATCH 11/14] java?? --- .github/workflows/sonarcloud.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 889757879..237fbf90a 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -63,7 +63,7 @@ jobs: run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Werror=dev -Denable-portaudio=1 -Denable-ladspa=1 -Denable-coverage=1 -DNO_GUI=1 $GITHUB_WORKSPACE - name: Install sonar-scanner and build-wrapper - uses: SonarSource/sonarcloud-github-c-cpp@v1 + uses: SonarSource/sonarcloud-github-c-cpp@v2 - name: Build working-directory: ${{github.workspace}}/build @@ -89,11 +89,6 @@ jobs: ls -la ${{ github.workspace }}/build ls -la ${{ github.workspace }}/build/coverage - - uses: actions/setup-java@v3 - with: - distribution: 'temurin' # See 'Supported distributions' for available options - java-version: '17' - - name: Run sonar-scanner env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 6d312a5ee734f1761ec9074d2308fecff296113b Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 16:08:24 +0200 Subject: [PATCH 12/14] fix sq? --- .github/workflows/sonarcloud.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 237fbf90a..dbeba3dad 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -93,6 +93,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - sonar-scanner --define sonar.cfamily.build-wrapper-output="${{github.workspace}}/build/${{ env.BUILD_WRAPPER_OUT_DIR }}" - -Dsonar.coverageReportPaths=${{github.workspace}}/build/coverage/sonarqube.report + run: > + sonar-scanner + --define sonar.cfamily.build-wrapper-output="${{github.workspace}}/build/${{ env.BUILD_WRAPPER_OUT_DIR }}" + -Dsonar.coverageReportPaths=${{github.workspace}}/build/coverage/sonarqube.report From cd4fc90b8206f22cc78e05d5dd00ad9928470e01 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 16:14:00 +0200 Subject: [PATCH 13/14] fix sq? --- .github/workflows/sonarcloud.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index dbeba3dad..b2ae8868d 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -93,7 +93,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: > - sonar-scanner - --define sonar.cfamily.build-wrapper-output="${{github.workspace}}/build/${{ env.BUILD_WRAPPER_OUT_DIR }}" + run: | + sonar-scanner \ + -Dsonar.cfamily.build-wrapper-output="${{github.workspace}}/build/${{ env.BUILD_WRAPPER_OUT_DIR }}" \ -Dsonar.coverageReportPaths=${{github.workspace}}/build/coverage/sonarqube.report From a3ccf8c1bd206b63696ead25d65968daf39e4731 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sat, 12 Aug 2023 16:20:20 +0200 Subject: [PATCH 14/14] remove deprecated property --- sonar-project.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 6fe015e69..603bc9bad 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,6 @@ sonar.projectKey=FluidSynth_fluidsynth sonar.organization=fluidsynth sonar.cfamily.threads=2 -sonar.cfamily.cache.enabled=false # This is the name and version displayed in the SonarCloud UI.