Skip to content

Commit

Permalink
Merge pull request #365 from christofmuc/ubuntu24
Browse files Browse the repository at this point in the history
Ubuntu24
  • Loading branch information
christofmuc authored Nov 10, 2024
2 parents 22a815e + edaa961 commit 1bcc8c4
Show file tree
Hide file tree
Showing 19 changed files with 114 additions and 30 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/builds-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Ubuntu KnobKraft Orm
name: Ubuntu 22 KnobKraft Orm

on: [push]

jobs:
build-linux:
build-ubuntu-22:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository with tags
Expand Down Expand Up @@ -36,6 +36,13 @@ jobs:
- name: CMake build
run: cmake --build builds --target package -- -j4

- name: Upload artifact for testing outside of a release
uses: actions/upload-artifact@v4
with:
name: ubuntu22-release
path: |
builds/KnobKraft_Orm-${{env.ORM_VERSION}}-Linux.tar.gz
- name: Publish release
uses: xresloader/upload-to-github-release@v1
env:
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/builds-ubuntu24.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Ubuntu 24 KnobKraft Orm

on: [push]

jobs:
build-ubuntu-24:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository with tags
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Additionally checkout submodules - don't use checkout action as it will overwrite refs
run: |
git submodule update --recursive --init --depth 1
- name: Install dependencies from apt-get
run: sudo apt-get -y update && sudo apt-get install -y libcurl4-openssl-dev pkg-config libtbb-dev libasound2-dev libboost-dev libgtk-3-dev libwebkit2gtk-4.1-dev libglew-dev libjack-dev libicu-dev

- name: Select proper Python version
uses: actions/setup-python@v2
with:
python-version: '3.12'
architecture: 'x64'

- name: CMake configure
env: # We get the SENTRY DSN from the repository's secret store
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
shell: bash
run: |
cmake -S . -B builds -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=off -DPYTHON_VERSION_TO_EMBED=3.12 -DSENTRY_CRASH_REPORTING=ON -DSENTRY_DSN=$SENTRY_DSN
- name: CMake build
run: |
cmake --build builds --target package -- -j4
mv builds/KnobKraft_Orm-${{env.ORM_VERSION}}-Linux.tar.gz builds/KnobKraft_Orm-${{env.ORM_VERSION}}-Ubuntu24.tar.gz
- name: Upload artifact for testing outside of a release
uses: actions/upload-artifact@v4
with:
name: ubuntu24-release
path: |
builds/KnobKraft_Orm-${{env.ORM_VERSION}}-Ubuntu24.tar.gz
- name: Publish release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: builds/KnobKraft_Orm-${{env.ORM_VERSION}}-Ubuntu24.tar.gz
tags: true
draft: false

- name: Setup Sentry CLI
uses: mathieu-bour/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
organization: knobkraft
project: knobkraft

- name: Upload PDB files to Sentry for stack unwinding when this is a tagged build
if: startsWith(github.ref, 'refs/tags/')
working-directory: builds
run: |
sentry-cli upload-dif . --log-level=debug
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
builds/
*__pycache__*
.idea/
.vscode/
adaptations/CompiledAdaptions.h
third_party/Tools.InnoSetup.6.0.5/
builds6/
Expand Down
30 changes: 18 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

cmake_minimum_required(VERSION 3.14)

# Target a specific MacOS version (I have no idea which version I need, so let's try with Mavericks)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X version to target for deployment")
# Target a specific MacOS version.
# JUCE 8 refuses to build for anything older than 10.11, so let's try that.
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Minimum OS X version to target for deployment")

# For old Apple < macOS 10.15 and Linux, do not allow C++ 17 because it won't work. With the newer nlohmann::json, we can specify the C++ version to use
add_compile_definitions(JSON_HAS_CPP_14)
Expand All @@ -18,7 +19,8 @@ project(KnobKraft_Orm)
option(ASAN "Use Address Sanitization for Debug version (Windows only for now)" OFF)

# Since we also build MacOS, we need C++ 17. Which is not a bad thing.
set(CMAKE_CXX_STANDARD 17)
# Gin requests C++ 20.
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(-D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING)

Expand Down Expand Up @@ -116,15 +118,19 @@ ELSEIF(APPLE)
# The JUCE font rendering is really fat on macOS, let us try to disable this flag
add_definitions(-DJUCE_DISABLE_COREGRAPHICS_FONT_SMOOTHING)
ELSEIF(UNIX)
# Include useful scripts for CMake
find_package(PkgConfig REQUIRED)
find_package(OpenGL)

# These calls create special `PkgConfig::<MODULE>` variables
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
pkg_check_modules(GLEW REQUIRED IMPORTED_TARGET glew)
pkg_check_modules(WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.0)
find_package(ICU REQUIRED data uc)
# Include useful scripts for CMake
find_package(PkgConfig REQUIRED)
find_package(OpenGL)

# These calls create special `PkgConfig::<MODULE>` variables
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
pkg_check_modules(GLEW REQUIRED IMPORTED_TARGET glew)
pkg_check_modules(WEBKIT IMPORTED_TARGET webkit2gtk-4.1)
if (NOT WEBKIT_FOUND EQUAL 1)
# If 4.1 is not available, we need 4.0
pkg_check_modules(WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.0)
endif()
find_package(ICU REQUIRED data uc)
ENDIF()

# We need to put our own CMake helpers on the module path
Expand Down
4 changes: 2 additions & 2 deletions The-Orm/PatchButtonPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ void PatchButtonPanel::resized()
}
}
pageNumberBox.performLayout(pageNumberStrip);
auto width_label = buttonSendModeLabel_.getFont().getStringWidth(buttonSendModeLabel_.getText());
buttonSendModeLabel_.setBounds(pageNumberStrip.removeFromLeft(width_label));
float width_label = TextLayout::getStringWidth(buttonSendModeLabel_.getFont(), buttonSendModeLabel_.getText());
buttonSendModeLabel_.setBounds(pageNumberStrip.removeFromLeft((int) width_label));
buttonSendMode_.setBounds(pageNumberStrip.removeFromLeft(LAYOUT_BUTTON_WIDTH + LAYOUT_INSET_NORMAL).withTrimmedLeft(LAYOUT_INSET_NORMAL));
gridSizeSliderY_.setBounds(pageNumberStrip.removeFromRight(LAYOUT_BUTTON_WIDTH + LAYOUT_SMALL_ICON_WIDTH));
gridSizeSliderX_.setBounds(pageNumberStrip.withTrimmedRight(LAYOUT_SMALL_ICON_WIDTH).removeFromRight(LAYOUT_BUTTON_WIDTH + LAYOUT_SMALL_ICON_WIDTH));
Expand Down
2 changes: 1 addition & 1 deletion The-Orm/PatchListTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ TreeViewNode* PatchListTree::newTreeViewItemForPatchList(midikraft::ListInfo lis
// Add all patches of the dragged list to the target ist
auto loaded_list = db_.getPatchList({ infos["list_id"], infos["list_name"] }, synths_);
if (AlertWindow::showOkCancelBox(AlertWindow::AlertIconType::QuestionIcon, "Add list to list?"
, fmt::format("This will add all {} patches of the list '{}' to the list '{}' at the given position. Continue?", loaded_list->patches().size(), infos["list_name"], list.name
, fmt::format("This will add all {} patches of the list '{}' to the list '{}' at the given position. Continue?", loaded_list->patches().size(), (std::string) infos["list_name"], list.name
))) {
for (auto& patch : loaded_list->patches()) {
db_.addPatchToList(list, patch, insertIndex++);
Expand Down
2 changes: 1 addition & 1 deletion The-Orm/PatchTextBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ String PatchTextBox::makeHexDocument(std::shared_ptr<midikraft::PatchHolder> pat
do {
testLine += " 00";
testLineLength += 1;
} while (fontUsed.getStringWidth(testLine) < width - 22);
} while (TextLayout::getStringWidth(fontUsed, testLine) < width - 22);
testLineLength = std::max(testLineLength-1, 1);
lastLayoutedWidth_ = width;

Expand Down
2 changes: 1 addition & 1 deletion juce-utils
2 changes: 1 addition & 1 deletion juce-widgets
3 changes: 2 additions & 1 deletion synths/kawai-k3/KawaiK3_BCR2000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "KawaiK3WaveParameter.h"

#include <fmt/format.h>
#include "SpdLogJuce.h"

namespace midikraft {

Expand Down Expand Up @@ -140,7 +141,7 @@ namespace midikraft {
" .showvalue on\n"
" .resolution {} {} {} {}\n"
, number_ , paramDef->name()
, (knobkraftChannel + 1) , paramDef->paramNo() , 0 , paramDef->maxValue()
, (knobkraftChannel + 1) , (int)paramDef->paramNo() , 0 , paramDef->maxValue()
//% (channel & 0x0f) % param_
//% paramDef->maxValue()
, 0 , BCRdefinition::ledMode(ledMode_)
Expand Down
2 changes: 1 addition & 1 deletion third_party/Gin
Submodule Gin updated 446 files
2 changes: 1 addition & 1 deletion third_party/JUCE
Submodule JUCE updated from ae5144 to 5179f4
2 changes: 1 addition & 1 deletion third_party/SQLiteCpp
Submodule SQLiteCpp updated 58 files
+0 −54 .github/workflows/build.yml
+62 −0 .github/workflows/cmake.yml
+2 −2 .github/workflows/cmake_subdir_example.yml
+80 −0 .github/workflows/meson.yml
+2 −1 .gitignore
+174 −136 .travis.yml
+276 −230 CHANGELOG.md
+58 −15 CMakeLists.txt
+1 −1 Doxyfile
+1 −1 LICENSE.txt
+93 −1 README.md
+46 −46 appveyor.yml
+26 −26 build.bat
+3 −3 build.sh
+359 −359 docs/README.md
+1 −1 examples/example1/main.cpp
+18 −0 examples/example1/meson.build
+1 −1 examples/example2/CMakeLists.txt
+21 −21 examples/example2/build.bat
+1 −1 examples/example2/build.sh
+13 −0 examples/example2/meson.build
+1 −1 examples/example2/src/main.cpp
+2 −0 examples/meson.build
+1 −1 googletest
+6 −5 include/SQLiteCpp/Assertion.h
+4 −3 include/SQLiteCpp/Backup.h
+11 −10 include/SQLiteCpp/Column.h
+23 −23 include/SQLiteCpp/Database.h
+3 −4 include/SQLiteCpp/Exception.h
+2 −1 include/SQLiteCpp/ExecuteMany.h
+5 −3 include/SQLiteCpp/SQLiteCpp.h
+38 −0 include/SQLiteCpp/SQLiteCppExport.h
+32 −29 include/SQLiteCpp/Savepoint.h
+19 −8 include/SQLiteCpp/Statement.h
+9 −6 include/SQLiteCpp/Transaction.h
+1 −1 include/SQLiteCpp/Utils.h
+1 −1 include/SQLiteCpp/VariadicBind.h
+320 −279 meson.build
+4 −2 meson_options.txt
+1 −1 package.xml
+16 −8 sqlite3/CMakeLists.txt
+15 −16 sqlite3/README.md
+23,572 −9,413 sqlite3/sqlite3.c
+754 −216 sqlite3/sqlite3.h
+1 −2 src/Backup.cpp
+1 −3 src/Column.cpp
+4 −4 src/Database.cpp
+1 −3 src/Exception.cpp
+34 −19 src/Savepoint.cpp
+18 −1 src/Statement.cpp
+16 −5 src/Transaction.cpp
+9 −8 subprojects/gtest.wrap
+9 −8 subprojects/sqlite3.wrap
+4 −4 tests/Column_test.cpp
+3 −1 tests/Database_test.cpp
+17 −19 tests/Savepoint_test.cpp
+12 −12 tests/Statement_test.cpp
+118 −118 tests/Transaction_test.cpp
2 changes: 1 addition & 1 deletion third_party/fmt
Submodule fmt updated 197 files
2 changes: 1 addition & 1 deletion third_party/json
Submodule json updated 286 files
2 changes: 1 addition & 1 deletion third_party/json-schema-validator
Submodule json-schema-validator updated 43 files
+5 −8 .clang-format
+0 −83 .github/workflows/github-actions.yml
+31 −0 .github/workflows/release.yaml
+94 −0 .github/workflows/test.yaml
+5 −1 .gitignore
+32 −0 .pre-commit-config.yaml
+0 −78 .travis.yml
+208 −148 CMakeLists.txt
+7 −0 CMakePresets.json
+14 −10 README.md
+281 −0 cmake/CMakePresets-CI.json
+50 −0 cmake/CMakePresets-defaults.json
+0 −539 cmake/HunterGate.cmake
+0 −0 cmake/nlohmann_json_schema_validatorConfig.cmake.in
+14 −0 example/CMakeLists.txt
+0 −0 example/format.cpp
+0 −0 example/json-schema-validate.cpp
+0 −0 example/readme.cpp
+74 −0 src/CMakeLists.txt
+4 −1 src/json-patch.hpp
+19 −1 src/json-validator.cpp
+694 −732 src/smtp-address-validator.cpp
+1 −1 src/smtp-address-validator.hpp
+32 −22 src/string-format-check.cpp
+12 −0 test/CMakeLists.txt
+1 −1 test/JSON-Schema-Test-Suite/tests/draft7/not.json
+1 −1 test/JSON-Schema-Test-Suite/tests/draft7/optional/format/uuid.json
+2 −2 test/JSON-Schema-Test-Suite/tests/draft7/ref.json
+1 −1 test/binary-validation.cpp
+0 −15 test/cmake-install/CMakeLists.txt
+0 −34 test/cmake-install/project/CMakeLists.txt
+0 −55 test/cmake-install/test.sh.in
+1 −1 test/errors.cpp
+1 −1 test/id-ref.cpp
+69 −0 test/issue-229-oneof-default-values.cpp
+48 −0 test/issue-243-root-default-values.cpp
+3 −3 test/issue-25-default-values.cpp
+0 −2 test/issue-27/CMakeLists.txt
+32 −0 test/issue-293.cpp
+1 −1 test/issue-70-root-schema-constructor.cpp
+1 −1 test/issue-9/bar.json
+1 −1 test/issue-9/foo/baz/qux/qux.json
+9 −9 test/json-patch.cpp
2 changes: 1 addition & 1 deletion third_party/pybind11
Submodule pybind11 updated 140 files
2 changes: 1 addition & 1 deletion third_party/sentry-native
Submodule sentry-native updated 107 files
2 changes: 1 addition & 1 deletion third_party/spdlog
Submodule spdlog updated 164 files

0 comments on commit 1bcc8c4

Please sign in to comment.