Skip to content

Commit

Permalink
Merge pull request #37 from TheSlowGrowth/feat/replace-sprout-and-fix…
Browse files Browse the repository at this point in the history
…-tests

Replace `sprout` library, fix tests, modernize CI setup
  • Loading branch information
TheSlowGrowth authored Sep 4, 2024
2 parents 69b71d2 + 1997b44 commit e1c4066
Show file tree
Hide file tree
Showing 2,975 changed files with 404 additions and 207,008 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/firmware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ jobs:
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.20.x'
cmake-version: '3.30.x'

- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Configure
run: cmake -S firmware -B firmware/build -G "Unix Makefiles" -D CMAKE_TOOLCHAIN_FILE="$(pwd)/lib/libDaisy/cmake/toolchains/stm32h750xx.cmake" -D TOOLCHAIN_PREFIX=$(which arm-none-eabi-gcc | sed -e "s/bin\/arm-none-eabi-gcc//")
run: cmake -S firmware -B firmware/build -G "Unix Makefiles" -D CMAKE_TOOLCHAIN_FILE="$(pwd)/lib/libDaisy/cmake/toolchains/stm32h750xx.cmake" -D CMAKE_BUILD_TYPE=RelWithDebInfo -D TOOLCHAIN_PREFIX=$(which arm-none-eabi-gcc | sed -e "s/bin\/arm-none-eabi-gcc//")

- name: Build
run: cmake --build firmware/build

Expand All @@ -53,7 +53,7 @@ jobs:
with:
name: TapeLooper.bin
path: firmware/build/TapeLooper.bin

###############################################################################
# builds the automated tests with clang; runs tests and exports results
firmware-tests:
Expand All @@ -69,12 +69,12 @@ jobs:
run: |
cd firmware/tests
make release
- name: Run Tests
run: |
cd firmware/tests/build/bin
./TapeLooper_gtest --gtest_output=xml:gtestresults.xml
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/formatting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:
fail-fast: false
matrix:
path:
- 'firmware/src'
- 'firmware/tests'
- 'firmware/src'
- 'firmware/tests'
- 'dsp/src'
- 'dsp/tests'
- 'plugin/src'
- 'plugin/tests'
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/clang-format-action@v3.4.0
uses: jidicula/clang-format-action@v4.13.0
with:
clang-format-version: '11'
clang-format-version: '18'
check-path: ${{ matrix.path }}
23 changes: 18 additions & 5 deletions .github/workflows/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
###############################################################################
# builds the plugin on windows
testBuildWindows:
runs-on: windows-latest
runs-on: windows-2019

steps:
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.x'
cmake-version: '3.30.x'

- name: Checkout
uses: actions/checkout@v2
Expand All @@ -34,12 +34,15 @@ jobs:
- name: Configure
run: |
cmake.exe -G "Visual Studio 16 2019" -A x64 -B plugin/build -S plugin
- name: Build
run: |
cmake --build plugin/build --config Release
- name: Run Tests
run: |
plugin/build/Release/TapeLooperPlugin_Gtest.exe --gtest_output=xml:TestResults\gtestResults_windows.xml
- name: Upload Test Results
uses: actions/upload-artifact@v2
with:
Expand All @@ -64,12 +67,16 @@ jobs:
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.x'
cmake-version: '3.30.x'

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Select Xcode
run: |
sudo xcode-select --reset
- name: Checkout
uses: actions/checkout@v2
with:
Expand All @@ -78,12 +85,15 @@ jobs:
- name: Configure
run: |
cmake -G "Xcode" -B plugin/build -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -S plugin
- name: Build
run: |
cmake --build plugin/build --config Release
- name: Run Tests
run: |
plugin/build/Release/TapeLooperPlugin_Gtest --gtest_output=xml:TestResults/gtestResults_macos.xml
- name: Upload Test Results
uses: actions/upload-artifact@v2
with:
Expand All @@ -108,7 +118,7 @@ jobs:
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.19.x'
cmake-version: '3.30.x'

- name: Setup dependencies
run: |
Expand All @@ -122,12 +132,15 @@ jobs:
- name: Configure
run: |
cmake -G "Unix Makefiles" -B plugin/build -S plugin
- name: Build
run: |
cmake --build plugin/build --config Release
- name: Run Tests
run: |
plugin/build/TapeLooperPlugin_Gtest --gtest_output=xml:TestResults/gtestResults_ubuntu.xml
- name: Upload Test Results
uses: actions/upload-artifact@v2
with:
Expand All @@ -154,7 +167,7 @@ jobs:

steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: TestResults
path: TestResults
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "plugin/lib/JUCE"]
path = plugin/lib/JUCE
url = https://github.com/juce-framework/JUCE.git
[submodule "dsp/lib/gcem"]
path = dsp/lib/gcem
url = https://github.com/kthohr/gcem
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.8
hooks:
- id: clang-format
4 changes: 2 additions & 2 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"${workspaceRoot}/lib/googletest/",
"${workspaceRoot}/lib/googletest/googletest/include/",
"${workspaceRoot}/lib/googletest/googlemock/include/",
"${workspaceRoot}/dsp/lib/sprout",
"${workspaceRoot}/dsp/lib/gcem/include",
"${workspaceRoot}/lib/libDaisy/core",
"${workspaceRoot}/lib/libDaisy/src",
"${workspaceRoot}/lib/libDaisy/src/sys",
Expand Down Expand Up @@ -46,7 +46,7 @@
"${workspaceRoot}/lib/googletest/",
"${workspaceRoot}/lib/googletest/googletest/include/",
"${workspaceRoot}/lib/googletest/googlemock/include/",
"${workspaceRoot}/dsp/lib/sprout",
"${workspaceRoot}/dsp/lib/gcem/include",
"${workspaceRoot}/lib/libDaisy/core",
"${workspaceRoot}/lib/libDaisy/src",
"${workspaceRoot}/lib/libDaisy/src/sys",
Expand Down
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@
"name": "Plugin Tests",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/plugin/build/Debug/TapeLooperPlugin_Gtest",
"program": "${workspaceFolder}/plugin/build/TapeLooperPlugin_Gtest",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/plugin/build/Debug",
"cwd": "${workspaceFolder}/plugin/build",
"environment": [],
"externalConsole": false,
"logging": {
Expand Down Expand Up @@ -147,11 +147,11 @@
"osx": {
"type": "lldb",
"MIMode": "lldb",
"program": "${workspaceFolder}/plugin/build/TapeLooperPlugin_artefacts/Debug/Standalone/Tape Looper Plugin.app/Contents/MacOS/Tape Looper Plugin",
"program": "${workspaceFolder}/plugin/build/TapeLooperPlugin_artefacts/Standalone/Tape Looper Plugin.app/Contents/MacOS/Tape Looper Plugin",
},
"windows": {
"MIMode": "gdb",
"program": "${workspaceFolder}/plugin/build/TapeLooperPlugin_artefacts/Debug/Standalone/Tape Looper Plugin.exe",
"program": "${workspaceFolder}/plugin/build/TapeLooperPlugin_artefacts/Standalone/Tape Looper Plugin.exe",
}
}
]
Expand Down
14 changes: 9 additions & 5 deletions dsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@ set(HEADER_FILES
src/util/Memory.h
)

add_subdirectory(lib/sprout)
add_subdirectory(lib/gcem)

add_library(${TARGET}
src/dsp/DspHelpers.cpp
)
target_include_directories(${TARGET} INTERFACE
src/
${CMAKE_CURRENT_SOURCE_DIR}/lib/sprout/
)
${CMAKE_CURRENT_SOURCE_DIR}/lib/gcem/include/
)
target_include_directories(${TARGET} PRIVATE
src/
${CMAKE_CURRENT_SOURCE_DIR}/lib/sprout/
)
${CMAKE_CURRENT_SOURCE_DIR}/lib/gcem/include
)
target_compile_definitions(${TARGET}
PUBLIC
_USE_MATH_DEFINES
)
set_property(TARGET tapeLooperDsp PROPERTY CXX_STANDARD 17)
1 change: 1 addition & 0 deletions dsp/lib/gcem
Submodule gcem added at 012ae7
48 changes: 0 additions & 48 deletions dsp/lib/sprout/CMakeLists.txt

This file was deleted.

23 changes: 0 additions & 23 deletions dsp/lib/sprout/LICENSE_1_0.txt

This file was deleted.

55 changes: 0 additions & 55 deletions dsp/lib/sprout/README.rst

This file was deleted.

3 changes: 0 additions & 3 deletions dsp/lib/sprout/cmake/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit e1c4066

Please sign in to comment.