Skip to content

Commit 06d4aff

Browse files
Fix ci build (#1390)
* updated requirements * updated requirements * updated protobuf submodule * update unit test ci version * updated protobuf version * updated setuptools version * fixed condition * changed where packages are installed * used python3.11 to create the virtual environment instead of latest * reverted protobuf version * testing specificying version * removed pyvenv in ci job for consistency * installed python3.11 in dependencies docker file * added missing -y flag * removed unification of install scripts * added missing python3.11 install * updated ci job to install python3.11 * changed installed python version to 3.9 since protobuf does not officially support 3.11 * changed installed python version to 3.9 since protobuf does not officially support 3.11 * missed version * updated includes for newer gcc versions * updated versions * updated nlohmann json * updated json schema version * changed library search path * hopefully fixed json dep issues * updating function signature to match newer version of base class * updated protobuf * updated protobuf and cmake * downgraded cmake * fixed protobuf version * fixed protobuf version * 1398 pin python version (#1405) * Pin python version * fixed incorrect path * Switch to using .tar file install of libsodium (#1414) * 1413 libsodium build refactor (#1415) * Switch to using .tar file install of libsodium * Switch bad option in wget command from -C to -P * Update scripts/dependency_install_functions.sh * Update scripts/dependency_install_functions.sh * Update dependency_install_functions.sh Libsodium folder version number. * Update dependency_install_functions.sh Make paths explicit. * cleaned up comments * Update scripts/dependency_install_functions.sh Co-authored-by: Joshua S Brown <[email protected]> * Update cmake/JSONSchema.cmake Co-authored-by: Joshua S Brown <[email protected]> * Update scripts/dependency_install_functions.sh Co-authored-by: Joshua S Brown <[email protected]> * Update cmake/JSONSchema.cmake Co-authored-by: Joshua S Brown <[email protected]> * add changes from review * Changed install scripts to be consistent with new python installation method (#1417) * changed install scripts to be consistent * added sudo check * add apt sources check --------- Co-authored-by: Blake Nedved <[email protected]> Co-authored-by: nedvedba <[email protected]>
1 parent d619edd commit 06d4aff

26 files changed

+120
-66
lines changed

.github/workflows/unit-tests.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,22 @@ name: Unit-Testing
22
on: push
33
jobs:
44
unit-test:
5-
runs-on: ubuntu-20.04
5+
runs-on: ubuntu-24.04
66
if: ${{ always() }}
77
steps:
88
- uses: actions/checkout@v2
99
- name: Update ubuntu
1010
run: sudo apt-get update
11+
- name: Install software-properties-common
12+
run: sudo apt install software-properties-common
13+
- name: Add deadsnakes apt repository
14+
run: sudo add-apt-repository ppa:deadsnakes/ppa
15+
- name: Update to bring in deadsnakes packages
16+
run: sudo apt update
17+
- name: Install Python 3.9
18+
run: sudo apt install python3.9 python3.9-dev python3.9-venv python3.9-distutils
19+
- name: Ensure pip is installed
20+
run: python3.9 -m ensurepip
1121
- name: Install dependencies
1222
run: |
1323
./scripts/generate_datafed.sh

.gitlab/stage_provision_client.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ provision-client:
77
needs: ["signal"]
88
variables:
99
GIT_STRATEGY: clone
10+
DATAFED_PYTHON_DEPENDENCIES_DIR: /opt/datafed/dependencies/python
1011
stage: provision-client
1112
tags:
1213
- ci-datafed-client
1314
before_script:
1415
- export PATH=/opt/datafed/dependencies/bin:$PATH
16+
- rm -rf $DATAFED_PYTHON_DEPENDENCIES_DIR
1517
script:
1618
- ./scripts/generate_datafed.sh
1719
- ./scripts/install_client_dependencies.sh

cmake/JSON.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ function(find_json_library)
77
set(JSON_LIBRARY_PATH "" )
88

99
if(EXISTS ${DEPENDENCY_INSTALL_PATH})
10-
set(JSON_LIB_CMAKE_DIR "${DEPENDENCY_INSTALL_PATH}/lib/cmake")
10+
set(JSON_LIB_CMAKE_DIR "${DEPENDENCY_INSTALL_PATH}/share/cmake ${DEPENDENCY_INSTALL_PATH}/lib/cmake")
1111
set(JSON_INCLUDE_DIR "${DEPENDENCY_INSTALL_PATH}/include")
1212
set(JSON_LIB_DIR "${DEPENDENCY_INSTALL_PATH}/lib")
1313
endif()
1414

15-
16-
find_package(nlohmann_json CONFIG REQUIRED PATHS "${JSON_LIB_CMAKE_DIR}")
15+
find_package(nlohmann_json REQUIRED PATHS "${JSON_LIB_CMAKE_DIR}")
1716

1817
# NOTE interfaces do not have a physical location associated with the library
1918
get_target_property(JSON_INCLUDE_PATH nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES )

cmake/JSONSchema.cmake

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
21
function(find_json_schema_library)
32

43
set(JSON_SCHEMA_INCLUDE_DIR "" )
54
set(JSON_SCHEMA_LIB_DIR "" )
65
set(JSON_SCHEMA_LIB_CMAKE_DIR "" )
76
set(JSON_SCHEMA_LIBRARY_PATH "" )
8-
97
if(EXISTS ${DEPENDENCY_INSTALL_PATH})
108
set(JSON_SCHEMA_LIB_CMAKE_DIR "${DEPENDENCY_INSTALL_PATH}/lib/cmake")
119
set(JSON_SCHEMA_INCLUDE_DIR "${DEPENDENCY_INSTALL_PATH}/include")
1210
set(JSON_SCHEMA_LIB_DIR "${DEPENDENCY_INSTALL_PATH}/lib")
1311
endif()
14-
15-
find_package(nlohmann_json_schema_validator CONFIG REQUIRED VERSION "${JSON_SCHEMA_VALIDATOR_VERSION}" PATHS "${JSON_SCHEMA_LIB_CMAKE_DIR}")
12+
# Specifying the VERSION with find_package commands since updating the json schema version from
13+
# version "2.1.0" to "2.3.0" is no longer supported.
14+
find_package(nlohmann_json_schema_validator REQUIRED PATHS "${JSON_SCHEMA_LIB_CMAKE_DIR}")
1615

1716
# NOTE interfaces do not have a physical location associated with the library
18-
get_target_property(JSON_SCHEMA_INCLUDE_PATH nlohmann_json_schema_validator INTERFACE_INCLUDE_DIRECTORIES)
19-
get_target_property(JSON_SCHEMA_LIBRARY_PATH nlohmann_json_schema_validator IMPORTED_LOCATION_NOCONFIG)
17+
get_target_property(JSON_SCHEMA_INCLUDE_PATH nlohmann_json_schema_validator::validator INTERFACE_INCLUDE_DIRECTORIES)
18+
get_target_property(JSON_SCHEMA_LIBRARY_PATH nlohmann_json_schema_validator::validator LOCATION)
19+
20+
if(NOT "${JSON_SCHEMA_VALIDATOR_VERSION}" STREQUAL "${nlohmann_json_schema_validator_VERSION}")
21+
message(FATAL_ERROR "REQUIRED Nlohmann JSON Schema Validator version ${JSON_SCHEMA_VALIDATOR_VERSION}, not satisfied. Found version ${nlohmann_json_schema_validator_VERSION}")
22+
endif()
2023

2124
set(DATAFED_JSON_SCHEMA_INCLUDE_PATH "${JSON_SCHEMA_INCLUDE_PATH}" PARENT_SCOPE)
2225
set(DATAFED_JSON_SCHEMA_LIBRARY_PATH "${JSON_SCHEMA_LIBRARY_PATH}" PARENT_SCOPE)

common/include/common/IMessageMapper.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
// Standard includes
66
#include <string>
7+
#include <cstdint>
78

89
namespace SDMS {
910

common/include/common/ProtoBufMap.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// Standard includes
1313
#include <map>
1414
#include <unordered_map>
15+
#include <cstdint>
1516

1617
namespace SDMS {
1718

common/include/common/SocketOptions.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// Standard includes
99
#include <optional>
1010
#include <string>
11+
#include <cstdint>
1112

1213
namespace SDMS {
1314

common/include/common/Util.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <string>
55
#include <vector>
6+
#include <cstdint>
67

78
std::string exec(const char *cmd);
89

core/server/ClientWorker.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class ClientWorker : public nlohmann::json_schema::basic_error_handler {
198198
void schemaLoader(const nlohmann::json_uri &a_uri, nlohmann::json &a_value,
199199
LogContext log_context);
200200

201-
void error(const nlohmann::json_pointer<nlohmann::basic_json<>> &a_ptr,
201+
void error(const nlohmann::json::json_pointer &a_ptr,
202202
const nlohmann::json &a_inst,
203203
const std::string &a_err_msg) override {
204204
(void)a_ptr;

external/protobuf

Submodule protobuf updated 157 files

0 commit comments

Comments
 (0)