Skip to content

Commit 367994b

Browse files
committed
FIX: Fix C++ client CI
- Fix syntax of multiline commands in `build.yaml` - Disable cppcheck due to old version in CI that can't parse `enum class`es - Disable clang-tidy for examples due to lack of support for `NOLINTBEGIN` - Add missing `throw`
1 parent 6cb506a commit 367994b

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.github/workflows/build.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,27 @@ jobs:
1010
ubuntu:
1111
strategy:
1212
matrix:
13-
compiler: [clang, gcc]
13+
compiler: [clang++, g++]
1414

15-
name: build - ubuntu-latest - (${{ matrix.compiler}})
15+
name: build - ubuntu-latest - ${{ matrix.compiler}}
1616
runs-on: ubuntu-latest
1717

1818
steps:
1919
- name: Checkout repository
2020
uses: actions/checkout@v3
2121
- name: Install dependencies
22-
run: sudo apt-get install libzstd-dev ninja-build libgtest-dev
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install libzstd-dev ninja-build
2325
- name: Install gtest
2426
uses: MarkusJx/[email protected]
2527
- name: CMake configure
26-
run: cmake -S . -B build \
27-
-GNinja \
28-
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }} \
29-
-DCMAKE_ENABLE_EXAMPLES=1 \
30-
-DDATABENTO_ENABLE_CLANG_TIDY=1 \
31-
-DDATABENTO_ENABLE_CPPCHECK=1
28+
run: |
29+
cmake -S . -B build \
30+
-GNinja \
31+
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }} \
32+
-DDATABENTO_ENABLE_EXAMPLES=1 \
33+
-DDATABENTO_ENABLE_CLANG_TIDY=1
3234
- name: CMake build
3335
run: cmake --build build
3436
- name: Unit tests

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ if(${PROJECT_NAME_UPPERCASE}_ENABLE_UNIT_TESTING)
310310
endif()
311311

312312
if(${PROJECT_NAME_UPPERCASE}_ENABLE_EXAMPLES)
313-
unset(CMAKE_CXX_CPPCHECK) # disable cppcheck for tests
313+
unset(CMAKE_CXX_CPPCHECK) # disable cppcheck for examples
314+
unset(CMAKE_CXX_CLANG_TIDY) # disable clang-tidy for examples
314315
message(STATUS "Build examples for the project.")
315316
add_subdirectory(example)
316317
endif()

src/historical.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ std::vector<databento::BatchJob> Historical::BatchListJobs(
334334
static const std::string kPath = ::BuildBatchPath(".list_jobs");
335335
const nlohmann::json json = client_.GetJson(kPath, params);
336336
if (!json.is_array()) {
337-
JsonResponseError::TypeMismatch(kEndpoint, "array", json);
337+
throw JsonResponseError::TypeMismatch(kEndpoint, "array", json);
338338
}
339339
std::vector<BatchJob> jobs;
340340
jobs.reserve(json.size());

0 commit comments

Comments
 (0)