Skip to content

Commit

Permalink
Merge pull request #113 from sudara/juce8
Browse files Browse the repository at this point in the history
Update to JUCE 8 and update dependencies
  • Loading branch information
sudara authored Sep 26, 2024
2 parents e169995 + 135d714 commit 622498f
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 240 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
submodules: true # Get JUCE populated

- name: Cache the build
uses: mozilla-actions/[email protected].4
uses: mozilla-actions/[email protected].5

- name: Import Certificates (macOS)
uses: apple-actions/import-codesign-certs@v3
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
- name: Codesign with Azure Trusted Signing
if: ${{ matrix.name == 'Windows' }}
uses: azure/trusted-signing-action@v0.3.18
uses: azure/trusted-signing-action@v0.4.0
with:
# The Azure Active Directory tenant (directory) ID.
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion JUCE
Submodule JUCE updated 582 files
229 changes: 6 additions & 223 deletions README.md

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions benchmarks/Benchmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ TEST_CASE ("Boot performance")
BENCHMARK_ADVANCED ("Processor constructor")
(Catch::Benchmark::Chronometer meter)
{
auto gui = juce::ScopedJuceInitialiser_GUI {};
std::vector<Catch::Benchmark::storage_for<PluginProcessor>> storage (size_t (meter.runs()));
meter.measure ([&] (int i) { storage[(size_t) i].construct(); });
};

BENCHMARK_ADVANCED ("Processor destructor")
(Catch::Benchmark::Chronometer meter)
{
auto gui = juce::ScopedJuceInitialiser_GUI {};
std::vector<Catch::Benchmark::destructable_object<PluginProcessor>> storage (size_t (meter.runs()));
for (auto& s : storage)
s.construct();
Expand All @@ -25,8 +23,6 @@ TEST_CASE ("Boot performance")
BENCHMARK_ADVANCED ("Editor open and close")
(Catch::Benchmark::Chronometer meter)
{
auto gui = juce::ScopedJuceInitialiser_GUI {};

PluginProcessor plugin;

// due to complex construction logic of the editor, let's measure open/close together
Expand Down
17 changes: 17 additions & 0 deletions benchmarks/Catch2Main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// All test files are included in the executable via the Glob in CMakeLists.txt

#include "juce_gui_basics/juce_gui_basics.h"
#include <catch2/catch_session.hpp>

int main (int argc, char* argv[])
{
// This lets us use JUCE's MessageManager without leaking.
// PluginProcessor might need this if you use the APVTS for example.
// You'll also need it for tests that rely on juce::Graphics, juce::Timer, etc.
// It's nicer DX when placed here vs. manually in Catch2 SECTIONs
juce::ScopedJuceInitialiser_GUI gui;

const int result = Catch::Session().run (argc, argv);

return result;
}
2 changes: 1 addition & 1 deletion cmake
18 changes: 18 additions & 0 deletions tests/Catch2Main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// All test files are included in the executable via the Glob in CMakeLists.txt

#include "juce_gui_basics/juce_gui_basics.h"
#include <catch2/catch_session.hpp>

int main (int argc, char* argv[])
{
// This lets us use JUCE's MessageManager without leaking.
// PluginProcessor might need this if you use the APVTS for example.
// You'll also need it for tests that rely on juce::Graphics, juce::Timer, etc.
// It's nicer DX when placed here vs. manually in Catch2 SECTIONs
juce::ScopedJuceInitialiser_GUI gui;

const int result = Catch::Session().run (argc, argv);

return result;
}
#include <catch2/catch_test_macros.hpp>
5 changes: 0 additions & 5 deletions tests/PluginBasics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ TEST_CASE ("Plugin instance", "[instance]")
{
PluginProcessor testPlugin;

// This lets us use JUCE's MessageManager without leaking.
// PluginProcessor might need this if you use the APVTS for example.
// You'll also need it for tests that rely on juce::Graphics, juce::Timer, etc.
auto gui = juce::ScopedJuceInitialiser_GUI {};

SECTION ("name")
{
CHECK_THAT (testPlugin.getName().toStdString(),
Expand Down
5 changes: 2 additions & 3 deletions tests/helpers/test_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@
});
*/
[[maybe_unused]] void runWithinPluginEditor (const std::function<void (PluginProcessor& plugin)>& testCode)
[[maybe_unused]] static void runWithinPluginEditor (const std::function<void (PluginProcessor& plugin)>& testCode)
{
PluginProcessor plugin;
auto gui = juce::ScopedJuceInitialiser_GUI {};
auto editor = plugin.createEditorIfNeeded();
const auto editor = plugin.createEditorIfNeeded();

testCode (plugin);

Expand Down

0 comments on commit 622498f

Please sign in to comment.