Skip to content

Commit

Permalink
Merge branch 'main' into update-replaygain
Browse files Browse the repository at this point in the history
  • Loading branch information
ywwg committed Jul 19, 2021
2 parents 087e667 + eb76915 commit c84a068
Show file tree
Hide file tree
Showing 250 changed files with 8,773 additions and 6,874 deletions.
96 changes: 58 additions & 38 deletions .github/workflows/build-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,14 @@ jobs:
include:
- name: clazy
- name: clang-tidy
- name: coverage
runs-on: ubuntu-20.04
name: ${{ matrix.name }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Install build dependencies
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
libavformat-dev \
libchromaprint-dev \
libebur128-dev \
libfftw3-dev \
libflac-dev \
libid3tag0-dev \
liblilv-dev \
libmad0-dev \
libmodplug-dev \
libmp3lame-dev \
libopus-dev \
libopusfile-dev \
libportmidi-dev \
libprotobuf-dev \
libqt5opengl5-dev \
libqt5sql5-sqlite \
libqt5svg5-dev \
libqt5x11extras5-dev \
librubberband-dev \
libshout-idjc-dev \
libsndfile1-dev \
libsoundtouch-dev \
libsqlite3-dev \
libtag1-dev \
libupower-glib-dev \
libusb-1.0-0-dev \
libwavpack-dev \
portaudio19-dev \
protobuf-compiler \
qt5-default \
qtdeclarative5-dev \
qtscript5-dev \
qt5keychain-dev \
clazy \
clang-tidy \
cmake
run: tools/debian_buildenv.sh setup
- name: Create build directory
run: mkdir build
- name: Configure (clazy)
Expand Down Expand Up @@ -108,6 +72,31 @@ jobs:
-DWAVPACK=ON \
..
working-directory: build
- name: Configure (coverage)
if: matrix.name == 'coverage'
run: |
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DOPTIMIZE=off \
-DCOVERAGE=ON \
-DWARNINGS_FATAL=OFF \
-DDEBUG_ASSERTIONS_FATAL=OFF \
-DBATTERY=ON \
-DBROADCAST=ON \
-DBULK=ON \
-DHID=ON \
-DLILV=ON \
-DOPUS=ON \
-DQTKEYCHAIN=ON \
-DVINYLCONTROL=ON \
-DFFMPEG=ON \
-DKEYFINDER=ON \
-DLOCALECOMPARE=ON \
-DMAD=ON \
-DMODPLUG=ON \
-DWAVPACK=ON \
..
working-directory: build
- name: Set up problem matcher
uses: ammaraskar/gcc-problem-matcher@master
- name: Build
Expand All @@ -117,3 +106,34 @@ jobs:
env:
CLAZY_CHECKS: level2,no-rule-of-two-soft,no-non-pod-global-static,no-qproperty-without-notify,no-wrong-qevent-cast,no-qstring-allocations,no-function-args-by-value,no-copyable-polymorphic,no-ctor-missing-parent-argument,no-missing-qobject-macro,no-rule-of-three,no-returning-void-expression,no-missing-typeinfo,no-base-class-event
CLAZY_IGNORE_DIRS: lib/.*
- name: "Test"
if: matrix.name == 'coverage'
run: ctest --timeout 45
working-directory: build
env:
# Render analyzer waveform tests to an offscreen buffer
QT_QPA_PLATFORM: ${{ matrix.qt_qpa_platform }}
GTEST_COLOR: 1
# Only use single thread to prevent *.gcna files from overwriting each other
CTEST_PARALLEL_LEVEL: 1
CTEST_OUTPUT_ON_FAILURE: 1
- name: "Generate Coverage Report"
if: matrix.name == 'coverage'
run: >-
lcov
--capture
--directory .
--base-directory ..
--include "${PWD%/*}/src/*"
--exclude "${PWD%/*}/src/test/*"
--exclude "${PWD%/*}/build/*"
--exclude "${PWD%/*}/lib/*"
--output-file lcov.info
working-directory: build
- name: "Upload Coverage Report to coveralls.io"
if: matrix.name == 'coverage'
uses: coverallsapp/github-action@master
with:
flag-name: ubuntu-20.04
path-to-lcov: build/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
# Studio on Windows comes with its own CMake version anyway.
if: runner.os == 'macOS'
with:
# This should always match the mininum required version in
# This should always match the minimum required version in
# our CMakeLists.txt
cmake-version: '3.16.x'

Expand Down Expand Up @@ -351,7 +351,7 @@ jobs:
run: >
if [[ "${GITHUB_REF}" =~ ^refs/tags/.* ]];
then
export DEPLOY_PATH='releases/mixxx-{git_describe}/mixxx-{git_describe}-{package_slug}{ext}';
export DEPLOY_PATH='releases/{git_describe}/mixxx-{git_describe}-{package_slug}{ext}';
else
export DEPLOY_PATH='snapshots/{git_branch}/mixxx-{git_describe}-{package_slug}{ext}';
fi;
Expand Down Expand Up @@ -422,7 +422,7 @@ jobs:
run: >
if [[ "${GITHUB_REF}" =~ ^refs/tags/.* ]];
then
export DEPLOY_PATH='releases/mixxx-{git_describe}/manifest.json';
export DEPLOY_PATH='releases/{git_describe}/manifest.json';
else
export DEPLOY_PATH='snapshots/{git_branch}/manifest.json';
fi;
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Add Random Track Control to AutoDJ [#3076](https://github.com/mixxxdj/mixxx/pull/3076)
* Add support for saving loops as hotcues [#2194](https://github.com/mixxxdj/mixxx/pull/2194) [lp:1367159](https://bugs.launchpad.net/mixxx/+bug/1367159)

## [2.3.0](https://launchpad.net/mixxx/+milestone/2.3.0) (Unreleased)
## [2.3.0](https://launchpad.net/mixxx/+milestone/2.3.0)
### Hotcues ###
* Add hotcue colors and custom labels by right clicking hotcue buttons or right clicking hotcues on overview waveforms [#2016](https://github.com/mixxxdj/mixxx/pull/2016) [#2520](https://github.com/mixxxdj/mixxx/pull/2520) [#2238](https://github.com/mixxxdj/mixxx/pull/2238) [#2560](https://github.com/mixxxdj/mixxx/pull/2560) [#2557](https://github.com/mixxxdj/mixxx/pull/2557) [#2362](https://github.com/mixxxdj/mixxx/pull/2362)
* Mouse hover cues on overview waveform to show time remaining until the cue [#2238](https://github.com/mixxxdj/mixxx/pull/2238)
Expand Down Expand Up @@ -123,10 +123,10 @@
* Add macOS codesigning and notarization to fix startup warnings [#3281](https://github.com/mixxxdj/mixxx/pull/3281)
* Don't trash user configuration if an error occurs when writing [#3192](https://github.com/mixxxdj/mixxx/pull/3192)
* Enable CUE sheet recording by default [#3374](https://github.com/mixxxdj/mixxx/pull/3374)
* And countless other small fixes and improvements (too many to list them all!)
* Fix crash when double clicking GLSL waveforms with right mouse button [#3904](https://github.com/mixxxdj/mixxx/pull/3904)
* Derive Mixxx version from `git describe` [#3824](https://github.com/mixxxdj/mixxx/pull/3824) [#3841](https://github.com/mixxxdj/mixxx/pull/3841) [#3848](https://github.com/mixxxdj/mixxx/pull/3848)
* Improve tapping the bpm of a deck [#3790](https://github.com/mixxxdj/mixxx/pull/3790) [lp:1882776](https://bugs.launchpad.net/mixxx/+bug/1882776)
* And countless other small fixes and improvements (too many to list them all!)

## [2.2.4](https://launchpad.net/mixxx/+milestone/2.2.4) (2020-06-27)

Expand Down
67 changes: 43 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@ if(NOT BUILD_LOW_MEMORY)
add_compile_options(-pipe)
endif()

# Coverage
#
# This is only available with GCC, therefore this option is forcibly set to OFF
# for all other compilers.
cmake_dependent_option(COVERAGE "Coverage (i.e. gcov) support" OFF "GNU_GCC" OFF)
if(COVERAGE)
add_compile_options(--coverage -fprofile-arcs -ftest-coverage)
add_link_options(--coverage -fprofile-arcs -ftest-coverage)
endif()

# Profiling
#
# This is only available on Linux, therefore this option is forcibly set to OFF
Expand Down Expand Up @@ -369,7 +379,8 @@ if(MSVC)
default_option(SCCACHE_SUPPORT "Enable sccache support" "SCCACHE_EXECUTABLE")
message(STATUS "Support for sccache: ${SCCACHE_SUPPORT}")
if(SCCACHE_SUPPORT)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "sccache")
set( CMAKE_C_COMPILER_LAUNCHER "${SCCACHE_EXECUTABLE}" )
set( CMAKE_CXX_COMPILER_LAUNCHER "${SCCACHE_EXECUTABLE}" )
endif()
else()
# ccache support
Expand All @@ -385,8 +396,8 @@ else()
# without this compiler messages in `make` backend would be uncolored
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=${BUILD_COLORS}")
endif()
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "ccache")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "ccache")
set( CMAKE_C_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}" )
set( CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}" )
endif()
message(STATUS "Support for ccache: ${CCACHE_SUPPORT}")
endif()
Expand Down Expand Up @@ -703,8 +714,8 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/mixer/sampler.cpp
src/mixer/samplerbank.cpp
src/coreservices.cpp
src/mixxx.cpp
src/mixxxapplication.cpp
src/mixxxmainwindow.cpp
src/musicbrainz/chromaprinter.cpp
src/musicbrainz/crc.cpp
src/musicbrainz/gzip.cpp
Expand Down Expand Up @@ -774,6 +785,8 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/skin/qml/qmleffectmanifestparametersmodel.cpp
src/skin/qml/qmleffectsmanagerproxy.cpp
src/skin/qml/qmleffectslotproxy.cpp
src/skin/qml/qmllibraryproxy.cpp
src/skin/qml/qmllibrarytracklistmodel.cpp
src/skin/qml/qmlplayermanagerproxy.cpp
src/skin/qml/qmlplayerproxy.cpp
src/skin/qml/qmlskin.cpp
Expand Down Expand Up @@ -1475,6 +1488,7 @@ add_executable(mixxx-test
src/test/beatgridtest.cpp
src/test/beatmaptest.cpp
src/test/beatstranslatetest.cpp
src/test/bpmtest.cpp
src/test/bpmcontrol_test.cpp
src/test/broadcastprofile_test.cpp
src/test/broadcastsettings_test.cpp
Expand Down Expand Up @@ -1508,6 +1522,7 @@ add_executable(mixxx-test
src/test/enginemicrophonetest.cpp
src/test/enginesynctest.cpp
src/test/fileinfo_test.cpp
src/test/frametest.cpp
src/test/globaltrackcache_test.cpp
src/test/hotcuecontrol_test.cpp
src/test/imageutils_test.cpp
Expand Down Expand Up @@ -1726,11 +1741,6 @@ if(WIN32)
"${CMAKE_CURRENT_BINARY_DIR}/src/mixxx.rc.include"
"${CMAKE_CURRENT_BINARY_DIR}/src/gitinfo.h"
)
# sccache fails with RC files
# https://github.com/mozilla/sccache/issues/947
if(SCCACHE_SUPPORT)
set_target_properties(mixxx PROPERTIES RULE_LAUNCH_COMPILE "")
endif()
target_include_directories(mixxx PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
endif()

Expand Down Expand Up @@ -1906,6 +1916,7 @@ if(KEYFINDER)
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DCMAKE_PREFIX_PATH:PATH="${CMAKE_PREFIX_PATH}"
-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
-DBUILD_TESTING=OFF
BUILD_COMMAND ${CMAKE_COMMAND} --build .
BUILD_BYPRODUCTS <INSTALL_DIR>/${KeyFinder_LIBRARY}
Expand Down Expand Up @@ -2281,15 +2292,6 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(mixxx-lib PRIVATE Threads::Threads)

# Upower
if(UNIX AND NOT APPLE)
find_package(GLIB COMPONENTS gobject REQUIRED)
find_package(Upower REQUIRED)
target_include_directories(mixxx-lib SYSTEM PUBLIC ${GLIB_INCLUDE_DIRS})
target_link_libraries(mixxx-lib PRIVATE ${GLIB_LIBRARIES} ${GLIB_GOBJECT_LIBRARIES})
target_link_libraries(mixxx-lib PRIVATE Upower::Upower)
endif()

# iOS/OS X Frameworks
if(APPLE)
find_library(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED)
Expand Down Expand Up @@ -2325,6 +2327,10 @@ if(BATTERY)
elseif(APPLE)
target_sources(mixxx-lib PRIVATE src/util/battery/batterymac.cpp)
elseif(UNIX)
find_package(Upower REQUIRED)
find_package(GLIB COMPONENTS gobject REQUIRED)
target_include_directories(mixxx-lib SYSTEM PUBLIC ${GLIB_INCLUDE_DIRS})
target_link_libraries(mixxx-lib PRIVATE Upower::Upower ${GLIB_LIBRARIES} ${GLIB_GOBJECT_LIBRARIES})
target_sources(mixxx-lib PRIVATE src/util/battery/batterylinux.cpp)
else()
message(FATAL_ERROR "Battery support is not implemented for the target platform.")
Expand Down Expand Up @@ -2691,21 +2697,34 @@ if(HID)
find_library(AppKit_LIBRARY AppKit REQUIRED)
target_link_libraries(mixxx-hidapi PUBLIC ${AppKit_LIBRARY})
elseif(UNIX)
if(NOT LibUSB_FOUND)
message(FATAL_ERROR "USB HID controller support on Unix with statically linked libhidapi-libusb requires libusb 1.0 and its development headers.")
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
find_library(libudev_LIBRARY udev REQUIRED)
target_sources(mixxx-hidapi PRIVATE lib/hidapi/linux/hid.c)
target_link_libraries(mixxx-hidapi PRIVATE ${libudev_LIBRARY})
else()
if(NOT LibUSB_FOUND)
message(FATAL_ERROR "USB HID controller support on Unix with statically linked libhidapi-libusb requires libusb 1.0 and its development headers.")
endif()
target_sources(mixxx-hidapi PRIVATE lib/hidapi/libusb/hid.c)
target_link_libraries(mixxx-hidapi PRIVATE LibUSB::LibUSB)
endif()
target_sources(mixxx-hidapi PRIVATE lib/hidapi/libusb/hid.c)
target_link_libraries(mixxx-hidapi PRIVATE LibUSB::LibUSB)
else()
message(FATAL_ERROR "USB HID controller support only possible on Windows/Mac OS/Linux/BSD.")
endif()
target_link_libraries(mixxx-lib PRIVATE mixxx-hidapi)
else()
message(STATUS "Linking libhidapi dynamically")
if(NOT HIDAPI_FOUND)
message(FATAL_ERROR "USB HID controller support requires libhidapi-libusb and its development headers.")
message(FATAL_ERROR "USB HID controller support requires hidapi and its development headers.")
endif()
# hidapi has two backends on Linux, one using the kernel's hidraw API and one using libusb.
# libusb obviously does not support Bluetooth HID devices, so use the hidraw backend. The
# libusb backend is the default, so hidraw needs to be selected explicitly at link time.
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
target_link_libraries(mixxx-lib PRIVATE hidapi::hidraw)
else()
target_link_libraries(mixxx-lib PRIVATE hidapi::hidapi)
endif()
target_link_libraries(mixxx-lib PRIVATE hidapi::hidapi)
endif()
target_sources(mixxx-lib PRIVATE
src/controllers/hid/hidcontroller.cpp
Expand Down
Loading

0 comments on commit c84a068

Please sign in to comment.