Skip to content

Commit

Permalink
[pull] master from FluidSynth:master (#2)
Browse files Browse the repository at this point in the history
* Properly handle overlapping notes when using fluid_event_note() (FluidSynth#637)

* Fix regression introduced in a893994

Mentioned commit broke fluid_synth_start() when using a DLS soundfont.

* Fix an uninitialized memory access

that could possibly trigger an FPE trap for instruments that use the exclusive class generator

* Update API docs

* Bump to 2.1.4

* Update Doxyfile

* Turn incompatible-pointer-types warning into error

* Fix passing arguments from incompatible pointer type

* Fix a NULL deref in jack driver

* Fix a possible race condition during midi autoconnect

* Fix printf format warnings

* Update Android Asset loader to new callback API

* Update Travis CI (FluidSynth#658)

* update to Ubuntu Focal
* use clang10
* avoid unintentional fallbacks to  default `/usr/bin/c++` compiler
* fix related compiler warnings

* fix NULL permitted for out and fx pointer buffer

Closes FluidSynth#659

* CMakeLists.txt: fix build with gcc 4.8 (FluidSynth#661)

-Werror=incompatible-pointer-types is unconditionally used since version
2.1.4 and 137a14e. This will raise a
build failure when checking for threads on gcc 4.8:

/home/buildroot/autobuild/run/instance-3/output-1/host/bin/arm-none-linux-gnueabi-gcc --sysroot=/home/buildroot/autobuild/run/instance-3/output-1/host/arm-buildroot-linux-gnueabi/sysroot -DTESTKEYWORD=inline  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -Wall -W -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wno-unused-parameter -Wdeclaration-after-statement -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Wbad-function-cast -Wcast-align   -DNDEBUG -fPIE   -o CMakeFiles/cmTC_98946.dir/CheckIncludeFile.c.o   -c /home/buildroot/autobuild/run/instance-3/output-1/build/fluidsynth-2.1.4/CMakeFiles/CMakeTmp/CheckIncludeFile.c
cc1: error: -Werror=incompatible-pointer-types: no option -Wincompatible-pointer-types

Fixes:
 - http://autobuild.buildroot.org/results/13cbba871db56ef8657a3d13c6ac8e1b4da0d244

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

* TravisCI: add a build for GCC 4.8 (FluidSynth#662)

* Remove unused member variable

* Limiting audio-channels to audio-groups (FluidSynth#663)

* Use a runtime check to detect version of libinstpatch (FluidSynth#666)

It could be that during runtime an older version of libinstpatch is used than the one fluidsynth was compiled against. In this case, libinstpatch will fail to load DLS fonts, because libinstpatch's initialization semantics don't match those compiled into fluidsynth.

* Add a chart about voice mixing and rendering

* Mapping of fx unit output to dry buffers in mix mode. (FluidSynth#668)

Currently, all fx unit output (in mix mode) are mapped to the `first buffer`.
This is not appropriate for synth.audio-groups > 1

This PR allows the mapping of fx output based on `fx unit index` and `synth.audio-groups` value.
This allows us to get the `fx output `mixed to the respective  `buffer` on which a `MIDI channel` is mapped.
For example: with `synth.audio-groups = 3` and  `synth.effect-groups = 3`:
- MIDI chan 0 (dry + fx0) is mapped to buf 0
- MIDI chan 1 (dry + fx1) is mapped to buf 1
- MIDI chan 2 (dry + fx2) is mapped to buf 2

* Add multi channels support for audio driver. (FluidSynth#667)

This PR addresses FluidSynth#665.

1) Add new functions for multi channels support: `fluid_synth_write_float_channels()`, `fluid_synth_write_s16_channels()`
2) `dsound` and `waveout` driver make use of this support. tested on 2 audio devices: 
    - creative SB Live! (6 channels).
    - Realtek: ALC889A (8 channels).

* Bump to 2.1.5

* Add SonarQube static code analysis (FluidSynth#671)

* Add SonarQube and LGTM badges to README

* Remove fluid_event_any_control_change() from public API (FluidSynth#674)

Originally, I have only marked it deprecated. But since we have an SOVERSION bump next release and because this function was only meant for internal usage, I think it's safe to remove it right now.

* Remove dead code

* Fix an impossible NULL deref

* Fix a NULL dereference

Access to field 'zone' results in a dereference of a null pointer (loaded from variable 'prev_preset'), if `size` is negative. Problem is: Parameter `size` is `chunk.size` and should be unsigned.

* Fix another NULL dereference

Access to field 'zone' results in a dereference of a null pointer (loaded from variable 'pr'), if size is negative. However, size should be unsigned.

* Remove a FIXME

I don't see any problem calling fluid_channel_init() from within synth context

* Remove a FIXME

I don't see any 'allocation' of preset. And ALL public synth functions have a mutex lock which might potentially block when called from synth context, but only then if the client app pessimizes this situation by extensively calling the synth from outside the synth context.

* Remove a FIXME

I have no clue what it refers to or what it's meant by that.

* Add comment into empty block

* Remove a FIXME

Not aware of any problems caused by the old glib thread API. It will be removed sooner or later anyway.

* Remove a FIXME

* Set the systemd unit target to default.target

fluidsynth.service.in:
The [Install] section [1] in systemd unit declares in which target the
service will be started.
The `multi-user.target` [2] - managed by the systemd _system_ service
manager - is used in the `fluidsynth.service`.
However, as it is a _user_ unit it needs to be pulled in by the
`default.target` [3] instead, which is the main target for the user
session (as started by `user@.service` [4]).

[1] https://www.freedesktop.org/software/systemd/man/systemd.unit.html#%5BInstall%5D%20Section%20Options
[2] https://www.freedesktop.org/software/systemd/man/systemd.special.html#multi-user.target
[3] https://www.freedesktop.org/software/systemd/man/systemd.special.html#default.target1
[4] https://www.freedesktop.org/software/systemd/man/user@.service.html

* Define FLUIDSYNTH_API on OS/2

Previously, CMake on OS/2 exported all the symbols unconditionally. Now
it exports necessary symbols only. As a result, it's necessary to
define FLUIDSYNTH_API correctly.

Addresses FluidSynth#678

* Make winmidi driver multi devices capable. (FluidSynth#677)

* Fix minor bug in windows audio driver (FluidSynth#680)

* Improve error reporting in Waveout and DSound drivers

* Fix Windows build

* Add proper unicode support to Windows error reporting

* Fix build on Windows 9x/ME

Addresses FluidSynth#679

* Promote Controller/Pressure/Bend event functions to 32bits (FluidSynth#670)

* Elaborate on synth.cpu-cores

* Add FluidMixer chart to API docs

* Ensure WaveOut compatibility with Win9X/NT (FluidSynth#687)

* Update and rename README.Android.md to README.md

* Update Android CircleCI build to use latest orb, Android API, Oboe and Cerbero (FluidSynth#690)

This fixes the currently-broken CircleCI build for Android-useable .so files.

Currently the Cerbero build is based off https://github.com/falrm/cerbero until https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/641 is merged and deployed to the GitHub cerbero mirror.

Here is a successful build with the updated CircleCI workflow: https://app.circleci.com/pipelines/github/falrm/fluidsynth-android/31/workflows/0ad3186a-394c-4736-984b-96496b608053/jobs/32

Fixes FluidSynth#688

* Replace FreeBSD 13.0 with 11.4 (FluidSynth#692)

13.0 hasn't been released yet and the CI build keeps failing for long.

* Remove unused variable

* Fix possible uninitialized use of dry_idx variable

* avoid an unlikely race condition

* Add hint message when compiled without getopt support (FluidSynth#697)

* Add getopt support to CMake summary

* Add public API to pin and unpin presets to the sample cache (FluidSynth#698)

Following the discussion about an API to pin and unpin preset samples in the sample cache here:
https://lists.nongnu.org/archive/html/fluid-dev/2020-10/msg00016.html

Short explanation of the change:

Only the default loader currently supports dynamic sample loading, so I thought it might be a good idea to keep the changes for this feature mostly contained in the default loader as well. I've added two new preset notify flags (FLUID_PRESET_PIN and FLUID_PRESET_UNPIN) that are handled by the preset->notify callback and trigger the loading and possibly unloading of the samples.

* Revert "remove VintageDreamsWaves-v2.sf3"

This reverts commit a36c06c. We've got
explicit permission from Ian Wilson to convert it to SF3.

Addresses FluidSynth#701.

* Updated XSL / styling for fluidsettings.xml

* Cleanup section label markup and rendering

* Use (empty string) for empty default values of str settings

* shell.port is an int setting, not num

* Update periods and period-size with current values from source

* Consistently format all floats

* Better explain currently unused effects-channels

* Update effects-groups description to avoid the word "unit"

* Update ladspa.active description

Use 1 (TRUE) for consistency and mention LADSPA documentation

* As gs is default for midi-bank-select, list it as first option for clarity

* Options seems to be more widely used, so use that instead of Choices

* Remove FLUIDSYNTH_API and FLUID_DEPRECATED macros from documentation

* Remove "References" and "Referenced by" links from doc

They auto generated links are quite long on some functions, making
the documentation harder to read.

* Enable navigation sidebar

* Make larger enums easier to read

* Move doxygen customizations into separate directory

* Restructure devdocs into separate pages

* Change files into groups / modules

* Some additional subgrouping

* Use xsltproc to include settings in API documentation

* Replace all links to fluidsettings.xml with proper \ref's

* Command Shell group for all shell related commands

With subgroups for command handler, shell and server.

* Audio output group

With subgroups Audio Driver and File Renderer

* Logging interface

* MIDI input group

Contains MIDI Driver, MIDI Router, MIDI Player and MIDI Events

* MIDI Seqencer documentation

* Settings documentation

* Miscellaneous group

* SoundFont API

Includes Generators, Modulators, Loader etc

* Add version defines and functions to misc group

* Rename setting reference page name to lowercase, for consistency

* Structure the large synth header into subgroups

Also include version.h and ladspa.h in the Synthesizer group.

* Consistent capitalization of usage guide section names

* Some more brief message abbreviation hints

* Custom doxygen layout to rename modules to API Reference

* Sort groups/modules, briefs and members

* Updated documentation styling

* Remove footer, as it takes away valuable vertical space

* Make sure libxslt is only searched if doxygen is available as well

* Also update the styling of the deprecated list

* Mark settings with callbacks as realtime and output this in the generated docs

* Separate new_* and delete_* functions from the rest

* Sync the static Doxyfile with Doxyfile.cmake

Still missing is the integration of the generated fluidsettings.txt,
as that requires a build script currently not available on the
server generating the public API docs.

* Split doxygen INPUT into separate lines, for easier readability

* Move recent changes into separate file

* Move usage guide pages into separate files in doc/usage

* Move examples into doc/examples directory

* Split HTML_EXTRA_FILEs into separate lines

* Use \image for images and improve quality of FluidMixer image

* Use custom \setting{} alias to link to fluid settings

* Smaller cleanup and reformatting of long lines.

* Add generated fluidsettings.txt for fluidsynth.org API doc build

Probably not the final solution, but works for now.

* Hide nav sync toggle button

* Style improvements for small screens
- hide side nav
- hide search box
- make content full height

* Improve styling of field tables (enum values)

* Document how to revert the styling and layout changes

* Add documentation hints to style guide

* Make top links black on hover, not white

* Add missing group brief descriptions

* Remove debug leftover

* Remove obsolete doxygen config options

* Add intro text to deprecated list

* Use SVG for fluid mixer image

* Workaround for doxygen bug with linebreaks in ALIASES

Using \_linebr is not ideal, as it's an internal command. But that
seems to be the most compatible way to specify line breaks in ALIASES
accross different doxygen versions at the moment.

* GitHub Action to build the API docs from master branch (FluidSynth#704)

Uploads the complete HTML API docs as an artifact called api_docs.zip

* Remove unused command alias and sync Doxyfile.cmake and Doxyfile

* Settings reference style more consistent with rest of reference pages

* Update generated fluidsettings.txt for API doc build on fluidsynth.org

* Fx unit api (FluidSynth#673)

This PR addresses FluidSynth#669 point 2.1.
It proposes set/get API functions to change/read fx unit parameters.
The deprecated shell commands are updated. Now the commands line have 2 parameters:
- first parameter is the fx unit index.
- second parameter is the value to apply to the fx unit.

* Update owner of the SoundFont registered trademark. (FluidSynth#706)

As of the time of this PR, the SoundFont registered trademark is owned by Creative Technology Ltd.
http://tmsearch.uspto.gov/bin/showfield?f=doc&state=4803:rj74xq.2.1
http://assignments.uspto.gov/assignments/q?db=tm&qt=sno&reel=&frame=&sno=74325965

* Handle GS SysEx messages for setting whether a channel is used for rhythm part. (FluidSynth#708)

Some MIDI files that uses the GS standard uses channels other than channel 10 as percussion channel. Currently FluidSynth ignores the messages setting that up, causing notes meant to be played with a drum instrument played with a melodic instrument or vice versa. This patch will partially fix the issue.

Currently the implementation in this patch doesn't cover a specific "quirk" in Roland GS Modules: they seem to remember the last used instrument in the selected mode. This patch simply sets the instrument number to 0 instead.

A test file is attached. If played correctly (with `-o synth.device-id=16`) no out of place drum or piano sounds should be heard.

[wikipedia_MIDI_sample_gstest.mid.gz](https://github.com/FluidSynth/fluidsynth/files/5610727/wikipedia_MIDI_sample_gstest.mid.gz)

* Fix Windows CI

Remove fake pkg-config

* Re-enable unit tests with mingw

and allow them to fail to ensure build artifacts are being published

* Update API doc build to upload to GH pages

* Fix build path in API doc publish step

* Clean existing files in API doc on GH pages

* Fix commit message for deploying API doc

* Also set commit name and email for api doc build commits

* Commit to test API doc build

Will be removed with next commit again.

* Revert "Commit to test API doc build"

This reverts commit fd39f6e.

* Make some strings const (FluidSynth#716)

* Replace g_ascii_strtoll() with FLUID_STRTOL() (FluidSynth#717)

* Elaborate on synth.device-id

* Breaking unit tests for WindowsXP should be fatal

* Update Issue templates to point to GitHub discussion

Co-authored-by: Tom M <tom.mbrt@googlemail.com>
Co-authored-by: jjceresa <jjc_fluid@orange.fr>
Co-authored-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Co-authored-by: jjceresa <32781294+jjceresa@users.noreply.github.com>
Co-authored-by: David Runge <dave@sleepmap.de>
Co-authored-by: KO Myung-Hun <komh@chollian.net>
Co-authored-by: Jon Latané <jonlatane@gmail.com>
Co-authored-by: Marcus Weseloh <marcus@weseloh.cc>
Co-authored-by: Nathan Umali <some1namednate@gmail.com>
Co-authored-by: Chris Xiong <chirs241097@gmail.com>
Co-authored-by: Carlo Bramini <30959007+carlo-bramini@users.noreply.github.com>
  • Loading branch information
12 people authored Dec 20, 2020
1 parent e16ca05 commit 4fe2c70
Show file tree
Hide file tree
Showing 128 changed files with 11,206 additions and 2,382 deletions.
6 changes: 5 additions & 1 deletion .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
mv -f * ..
cd ..
rmdir $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform)\
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
displayName: 'Prerequisites'
- script: |
@ECHO ON
Expand Down Expand Up @@ -122,6 +123,7 @@ jobs:
REM need to fix the naming of libsndfile otherwise the linker won't find it
mv lib\libsndfile-1.lib lib\sndfile.lib || exit -1
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
displayName: 'Prerequisites'
- script: |
@ECHO ON
Expand Down Expand Up @@ -182,6 +184,7 @@ jobs:
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
cd mingw*\ && cp -rf * .. && cd .. && rm -rf mingw* || exit -1
cd $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform) && cp -rf * d:\deps\ && mv -f * .. && cd .. && rmdir $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform)\ || exit -1
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
displayName: 'Prerequisites'
- script: |
@ECHO ON
Expand All @@ -201,8 +204,9 @@ jobs:
set PATH=%PATH:C:\Program Files\Git\bin;=%
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
cd build || exit -1
mingw32-make.exe check || cd .
mingw32-make.exe check || exit -1
displayName: 'Execute Unittests'
continueOnError: 'true'
- script: |
@ECHO ON
cd build
Expand Down
30 changes: 18 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
version: 2.1
orbs:
android: circleci/android@0.2.0
android: circleci/android@0.2.1
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-29
- image: circleci/android:api-30
environment:
JVM_OPTS: -Xmx3200m
steps:
- run:
name: Setup Git email and user for Cerbero
command: git config --global user.email "ci@beatscratch.io" && git config --global user.name "CI testing"
- android/install-ndk:
ndk-version: android-ndk-r18b
ndk-sha: 500679655da3a86aecf67007e8ab230ea9b4dd7b
- run:
name: Link NDK for Cerbero
command: |
mkdir -p /home/circleci/android-sdk-linux
ln -s /opt/android/android-ndk-r18b /home/circleci/android-sdk-linux/ndk-bundle
# - android/install-ndk:
# ndk-version: android-ndk-r18b
# ndk-sha: 500679655da3a86aecf67007e8ab230ea9b4dd7b
- run:
name: Install FluidSynth build dependencies
command: sudo apt-get update && sudo apt-get install autotools-dev automake autoconf libtool g++ autopoint make cmake
Expand All @@ -32,22 +27,33 @@ jobs:
git subversion xutils-dev intltool ccache python3-setuptools autogen maven make
- checkout
- run:
name: Prepare FluidSynth Android
name: Build Cerbero and Oboe
working_directory: doc/android
command: |
export TERM=dumb
make -f Makefile.android prepare
- run:
name: Link Cerbero NDK for build
command: |
mkdir -p /home/circleci/android-sdk-linux
echo "android-ndk-21 content"
ls /home/circleci/code/doc/android/external/cerbero/build/android-ndk-21
ln -s /home/circleci/code/doc/android/external/cerbero/build/android-ndk-21 /home/circleci/android-sdk-linux/ndk-bundle
echo "/home/circleci/android-sdk-linux/ndk-bundle content"
ls /home/circleci/android-sdk-linux/ndk-bundle
- run:
name: Build FluidSynth Android
working_directory: doc/android
command: |
export TERM=dumb
make -f Makefile.android
- run:
name: Show directory contents
working_directory: doc/android
command: |
ls -R
- run:
name: Zip FluidSnyth Android Distribution
name: Zip FluidSynth Android Distribution
working_directory: doc/android
command: zip -r android-dist.zip dist
- store_artifacts:
Expand Down
3 changes: 1 addition & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ task:
name: FreeBSD
freebsd_instance:
matrix:
# There isn't a stable 13.0 image yet (2019-09)
image_family: freebsd-13-0-snap
image_family: freebsd-11-4
image_family: freebsd-12-1

install_script: pwd && ls -la && pkg update --force && pkg install -y cmake glib alsa-lib ladspa portaudio pulseaudio pkgconf sdl2
Expand Down
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ If you have a question look into our wiki
or the developer resources
( http://www.fluidsynth.org/api/ )
If you still have a question, need support or want to discuss ideas, contact our mailing list:
If you still have a question, need support or want to discuss ideas, contact our mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
or start a GitHub Discussion:
https://github.com/FluidSynth/fluidsynth/discussions
Below is a form that shall help getting relevant information for bugs together.
We strongly recommend to use it! Feel free to edit or remove inapplicable/unneeded parts.
-->
Expand Down
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ If you have a question look into our wiki
or the developer resources
( http://www.fluidsynth.org/api/ )
If you still have a question, need support or want to discuss ideas, contact our mailing list:
If you still have a question, need support or want to discuss ideas, contact our mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev
or start a GitHub Discussion:
https://github.com/FluidSynth/fluidsynth/discussions
Below is a form that shall help getting relevant information for features together.
Feel free to edit or remove inapplicable/unneeded parts.
-->
Expand Down
7 changes: 5 additions & 2 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ _If you have a question look into our wiki
or the developer resources
( http://www.fluidsynth.org/api/ )_

_If you still have a question, need support or want to discuss ideas, contact our mailing list:
https://lists.nongnu.org/mailman/listinfo/fluid-dev_
If you still have a question, need support or want to discuss ideas, contact our mailing list
https://lists.nongnu.org/mailman/listinfo/fluid-dev

or start a GitHub Discussion:
https://github.com/FluidSynth/fluidsynth/discussions

_Below is a form that shall help getting relevant information for bugs and feature requests together.
We strongly recommend to use it! Feel free to edit or remove inapplicable/unneeded parts._
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/api_doc_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: API Doc Build

on:
push:
branches:
- master

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
persist-credentials: false

- name: Install Dependencies
run: sudo apt-get install doxygen xsltproc

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Build
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config $BUILD_TYPE --target doxygen

- name: Install SSH Client 🔑
uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.DEPLOY_API_TOKEN }}

- name: Publish API Docs to GH Pages
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
FOLDER: ${{runner.workspace}}/build/doc/api/html/
REPOSITORY_NAME: FluidSynth/fluidsynth.github.io
BRANCH: main
TARGET_FOLDER: api/
SSH: true
CLEAN: true
COMMIT_MESSAGE: Updating API doc from fluidsynth master
GIT_CONFIG_NAME: API Doc Deploy
GIT_CONFIG_EMAIL: fluid-api-deploy@fluidsynth.github.io
60 changes: 47 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
language: c
sudo: false
os: linux
dist: bionic
dist: focal
git:
depth: false # disable shallow fetch, history is needed by SonarQube
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-bionic-7
- llvm-toolchain-bionic-8
- llvm-toolchain-bionic-9
- llvm-toolchain-focal-7
- llvm-toolchain-focal-8
- llvm-toolchain-focal-9
- llvm-toolchain-focal-10
packages:
- cmake-data
- cmake
Expand All @@ -25,7 +28,7 @@ addons:
env:
- CMAKE_FLAGS="-Denable-profiling=1"
- CMAKE_FLAGS="-Denable-floats=1 -Denable-profiling=1"
- CMAKE_FLAGS="-Denable-floats=0"
- CMAKE_FLAGS="-Denable-floats=1"
- CMAKE_FLAGS="-Denable-trap-on-fpe=1"
- CMAKE_FLAGS="-Denable-fpe-check=1"
- CMAKE_FLAGS="-Denable-ipv6=0"
Expand All @@ -36,40 +39,71 @@ env:

matrix:
include:
- addons:
sonarcloud:
organization: "fluidsynth"
env:
- BW="build-wrapper-linux-x86-64 --out-dir bw-output"
- SONARSC="sonar-scanner -Dsonar.cfamily.build-wrapper-output=build/bw-output"

- arch: arm64
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && sudo apt-get install gcc-7"
- CC="gcc-7"
- CXX="g++-7"
- MATRIX_EVAL="sudo apt-get install gcc-7 g++-7"

- dist: trusty
env:
- CMAKE_FLAGS=""

- env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8 && sudo apt-get install gcc-8"
- CC="gcc-8"
- CXX="g++-8"
- MATRIX_EVAL="sudo apt-get install gcc-8 g++-8"
- CMAKE_FLAGS="-Denable-debug=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"

- env:
- MATRIX_EVAL="CC=clang-7 && CXX=clang++-7 && sudo apt-get install clang-7"
- CC="clang-7"
- CXX="clang++-7"
- MATRIX_EVAL="sudo apt-get install clang-7"

- env:
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8 && sudo rm -f /usr/local/clang-7.0.0/bin/clang-tidy && sudo ln -s /usr/bin/clang-tidy-8 /usr/bin/clang-tidy && sudo apt-get install clang-8 clang-tidy-8"
- CC="clang-8"
- CXX="clang++-8"
- MATRIX_EVAL="sudo rm -f /usr/local/clang-7.0.0/bin/clang-tidy && sudo ln -s /usr/bin/clang-tidy-8 /usr/bin/clang-tidy && sudo apt-get install clang-8 clang-tidy-8"
- CMAKE_FLAGS="-Denable-profiling=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"

- env:
- MATRIX_EVAL="CC=clang-9 && CXX=clang++-9 && sudo apt-get install clang-9"
- CC="clang-9"
- CXX="clang++-9"
- MATRIX_EVAL="sudo apt-get install clang-9"

- env:
- CC="clang-10"
- CXX="clang++-10"
- MATRIX_EVAL="sudo apt-get install clang-10"

- os: linux-ppc64le
env:
- CMAKE_FLAGS=""

before_install:
- eval "${MATRIX_EVAL}"
- which clang-tidy || true
- ls -la `which clang-tidy` || true
- echo $PATH
- echo $MATRIX_EVAL
- eval "${MATRIX_EVAL}"
- echo $SONARSC

before_script:
- mkdir $HOME/fluidsynth_install/
- mkdir build && cd build

script:
- cmake -Werror=dev -DCMAKE_INSTALL_PREFIX=$HOME/fluidsynth_install ${CMAKE_FLAGS} -Denable-portaudio=1 -Denable-ladspa=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 ..
- make -j4
- ${BW} make -j4
- ls -la
- make check
- make install # install only on linux, as CMAKE_INSTALL_PREFIX is ignored for frameworks on macosx and I cant tell whether that's correct or a bug.
- make install
- cd ..
- ${SONARSC}
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set ( PACKAGE "fluidsynth" )
# FluidSynth package version
set ( FLUIDSYNTH_VERSION_MAJOR 2 )
set ( FLUIDSYNTH_VERSION_MINOR 1 )
set ( FLUIDSYNTH_VERSION_MICRO 3 )
set ( FLUIDSYNTH_VERSION_MICRO 5 )
set ( VERSION "${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}" )
set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )

Expand Down Expand Up @@ -146,6 +146,7 @@ endif ( POLICY CMP0063 )
include ( DefaultDirs )

# Basic C library checks
include ( CheckCCompilerFlag )
include ( CheckSTDC )
include ( CheckIncludeFile )
include ( CheckFunctionExists )
Expand Down Expand Up @@ -197,6 +198,11 @@ if ( CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_C

# define some warning flags
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wno-unused-parameter -Wdeclaration-after-statement -Werror=implicit-function-declaration" )
check_c_compiler_flag ( "-Werror=incompatible-pointer-types" HAVE_INCOMPATIBLE_POINTER_TYPES )
if ( HAVE_INCOMPATIBLE_POINTER_TYPES )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=incompatible-pointer-types" )
endif ( HAVE_INCOMPATIBLE_POINTER_TYPES )

set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -W -Wpointer-arith -Wcast-qual -Wno-unused-parameter" )

# prepend to build type specific flags, to allow users to override
Expand Down
Loading

0 comments on commit 4fe2c70

Please sign in to comment.