Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build examples in CI #749

Merged
merged 6 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ci/build-kit/install_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cmake \
-S "$EXT_MOUNT/source" \
-G Ninja \
-DBUILD_TESTING=ON \
-DLIBOCPP16_BUILD_EXAMPLES=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="$WORKSPACE_PATH/dist" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ find_package(everest-cmake 0.1 REQUIRED
option(${PROJECT_NAME}_BUILD_TESTING "Build unit tests, used if included as dependency" OFF)
option(BUILD_TESTING "Build unit tests, used if standalone project" OFF)
option(CMAKE_RUN_CLANG_TIDY "Run clang-tidy" OFF)
option(LIBOCPP_BUILD_EXAMPLES "Build charge_point and central_system binaries." OFF)
option(LIBOCPP16_BUILD_EXAMPLES "Build charge_point binary" OFF)
option(OCPP_INSTALL "Install the library (shared data might be installed anyway)" ${EVC_MAIN_PROJECT})
option(LIBOCPP_ENABLE_DEPRECATED_WEBSOCKETPP "Usage of deprecated websocket++ instead of libwebsockets" OFF)

Expand Down
9 changes: 3 additions & 6 deletions config/v16/config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"Internal": {
"ChargePointId": "",
"CentralSystemURI": "",
"ChargeBoxSerialNumber": "",
"ChargePointId": "cp001",
"CentralSystemURI": "127.0.0.1:8180/steve/websocket/CentralSystemService/",
"ChargeBoxSerialNumber": "cp001",
"ChargePointModel": "Yeti",
"ChargePointVendor": "Pionix",
"FirmwareVersion": "0.1",
Expand Down Expand Up @@ -54,8 +54,5 @@
},
"CostAndPrice": {
"CustomDisplayCostAndPrice": false
},
"Custom": {
"ExampleConfigurationKey": "example"
}
}
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ target_link_libraries(charge_point
ocpp
OpenSSL::SSL
OpenSSL::Crypto
SQLite::SQLite3
)

install(TARGETS charge_point
Expand Down
8 changes: 4 additions & 4 deletions src/charge_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int main(int argc, char* argv[]) {
fs.close();
}

const fs::path sql_init_path = share_path / "init.sql";
const fs::path sql_init_path = share_path / "core_migrations";

// create the cso_path
const fs::path cso_path = "/tmp/client/cso";
Expand Down Expand Up @@ -247,9 +247,9 @@ int main(int argc, char* argv[]) {
<< "Setting charging profiles" << std::endl;
});

charge_point->register_transaction_updated_callback([](const int32_t connector, const int32_t transaction_id,
const std::string& session_id,
const IdTagInfo& id_tag_info) {
charge_point->register_transaction_updated_callback([](const int32_t connector, const std::string& session_id,
const int32_t transaction_id,
const ocpp::v16::IdTagInfo& id_tag_info) {
std::cout << "Callback: Transaction updated at connector# " << connector
<< " and transaction id: " << transaction_id << std::endl;
});
Expand Down
Loading