Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refurbish CI #1267

Merged
merged 14 commits into from
Aug 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .azure/azure-pipelines-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,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
Expand Down
2 changes: 1 addition & 1 deletion .azure/azure-pipelines-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ variables:
toolset: 'v142'
generator: 'Visual Studio 16 2019'
configuration: 'RelWithDebInfo'
VCPKG_REVISION: 'acc3bcf76b84ae5041c86ab55fe138ae7b8255c7'
VCPKG_REVISION: 'fc59c2a30a99536e8fb6e085c228e9f724dd87d0'

jobs:
- job: vcpkg
Expand Down
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
28 changes: 12 additions & 16 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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@v2

- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
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
Expand All @@ -85,19 +89,11 @@ jobs:
ls -la ${{ github.workspace }}/build
ls -la ${{ github.workspace }}/build/coverage

# 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

- name: Run sonarqube
- name: Run sonar-scanner
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
-Dsonar.coverageReportPaths=build/coverage/sonarqube.report
-Dsonar.verbose=false
-Dsonar.host.url=https://sonarcloud.io/
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner \
-Dsonar.cfamily.build-wrapper-output="${{github.workspace}}/build/${{ env.BUILD_WRAPPER_OUT_DIR }}" \
-Dsonar.coverageReportPaths=${{github.workspace}}/build/coverage/sonarqube.report
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ 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 )
Expand Down
3 changes: 1 addition & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
sonar.projectKey=FluidSynth_fluidsynth
sonar.organization=fluidsynth

sonar.cfamily.threads=4
sonar.cfamily.cache.enabled=false
sonar.cfamily.threads=2


# This is the name and version displayed in the SonarCloud UI.
Expand Down
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
Loading