Skip to content

Commit

Permalink
Run jatins clap validator on the unity build results (#1344)
Browse files Browse the repository at this point in the history
- Run jatins clap validator on the unity build results
- Some tweaks to pass clap validation and remove a bad print
- Its SC not SU
  • Loading branch information
baconpaul authored Sep 18, 2024
1 parent cf7f249 commit 5bb6754
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,49 @@ jobs:
target: scxt-core
cmakeConfig: -A x64
runTests: false
clapValidate: false

- name: "windows clang VST3"
os: windows-latest
target: scxt_clapfirst_VST3
cmakeConfig: -GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
runTests: false
clapValidate: false

- name: "mac AU"
os: macos-latest
target: scxt_clapfirst_AU
cmakeConfig: -GNinja
runTests: true
clapValidate: false

- name: "ubuntu Standalone"
os: ubuntu-latest
target: scxt_clapfirst_Standalone
cmakeConfig: -GNinja
runTests: false
clapValidate: false

- name: "win unity"
os: windows-latest
target: shortcircuit-products
cmakeConfig: -GNinja -DCMAKE_UNITY_BUILD=TRUE -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
runTests: false
clapValidate: true

- name: "mac unity"
os: macos-latest
target: shortcircuit-products
cmakeConfig: -GNinja -DCMAKE_UNITY_BUILD=TRUE
runTests: false
clapValidate: true

- name: "ubuntu unity"
os: ubuntu-latest
target: shortcircuit-products
cmakeConfig: -GNinja -DCMAKE_UNITY_BUILD=TRUE
runTests: false
clapValidate: true

steps:
- name: Checkout code
Expand All @@ -71,6 +78,12 @@ jobs:
cmake -S . -B ./build ${{ matrix.cmakeConfig }} -DCMAKE_BUILD_TYPE=Debug
cmake --build ./build --config Debug --target ${{ matrix.target }} --parallel 4
- name: Run Clap Validator
if: ${{ matrix.clapValidate }}
uses: jatinchowdhury18/clap-val-action@main
with:
plugin_path: "./build/shortcircuit-products/Shortcircuit XT.clap"

- name: Run Tests
if: ${{ matrix.runTests }}
run: |
Expand Down
11 changes: 7 additions & 4 deletions clients/clap-first/scxt-plugin/scxt-plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,15 @@ bool SCXTPlugin::stateLoad(const clap_istream *istream) noexcept
}
}
buffer[totalRd] = 0;
if (totalRd == 0)
{
SCLOG("Received stream size 0. Invalid state");
return false;
}

auto xml = std::string(buffer.data());
auto data = std::string(buffer.data());

synchronousEngineUnstream(engine, xml);
synchronousEngineUnstream(engine, data);

scxt::messaging::client::clientSendToSerialization(
scxt::messaging::client::RequestHostCallback{(uint64_t)RESCAN_PARAM_IVT},
Expand Down Expand Up @@ -450,8 +455,6 @@ bool SCXTPlugin::handleEvent(const clap_event_header_t *nextEvent)
break;
default:
{
std::cout << __FILE__ << ":" << __LINE__ << " Unhandled event " << nextEvent->type
<< std::endl;
}
break;
}
Expand Down
3 changes: 2 additions & 1 deletion src/browser/browser_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,8 @@ CREATE TABLE IF NOT EXISTS DeviceLocations (
{
std::ostringstream oss;
oss << le.what() << "\n"
<< "Patch database is locked for writing. Most likely, another Surge "
<< "Patch database is locked for writing. Most likely, another "
"Shortcircuit "
"XT instance has exclusive write access. We will attempt to retry "
"writing up to 10 more times. "
"Please dismiss this error in the meantime!\n\n Attempt: "
Expand Down

0 comments on commit 5bb6754

Please sign in to comment.