Skip to content

Commit

Permalink
driver: Windows CI terribleness
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Vorobiov <okawo.198@gmail.com>
  • Loading branch information
okawo80085 committed Aug 4, 2022
1 parent 8e8dc47 commit c40f09c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,20 @@ jobs:
- name: Clone submodules
run: git submodule init && git submodule update

- name: Python Setup
uses: actions/setup-python@v1
- name: Download and Install Boost
uses: MarkusJx/install-boost@v2.3.0
with:
python-version: '3.x'
- uses: ./.github/actions/setup-conan

- name: Downloading Windows Dependencies
if: runner.os == 'Windows'
run: |
${boostroot} = "${env:GITHUB_WORKSPACE}\boost_install"
conan install boost/1.72.0@ -o boost:header_only=True -g deploy --install-folder ${boostroot}
dir ${boostroot}
dir ${boostroot}\boost
echo "BOOST_ROOT=${boostroot}\boost" >> ${env:GITHUB_ENV}
- name: Downloading Linux Dependencies
if: runner.os != 'Windows'
run: |
sudo apt-get install -y libboost-dev
boost_version: 1.73.0

# Configure CMake projects
- name: Configure Driver CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake driver -B ${{github.workspace}}/driver_build -DCMAKE_BUILD_TYPE=${{inputs.buildType}}
# -DBoost_INCLUDE_DIR=${{steps.install-boost.outputs.BOOST_ROOT}}/include\
# -DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}

- name: Configure Poser Cmake
run: cmake bindings/cpp/examples/uduTest -B ${{github.workspace}}/poser_build -DCMAKE_BUILD_TYPE=${{inputs.buildType}}
Expand Down
2 changes: 2 additions & 0 deletions driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ target_link_libraries(${TARGET_NAME}
${CMAKE_DL_LIBS}
)

message(NOTICE "boost_root: ${BOOST_ROOT}|")

install(
TARGETS
${TARGET_NAME}
Expand Down
2 changes: 1 addition & 1 deletion driver/gaze_master_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ target_include_directories(gaze_logger PRIVATE
)

target_link_libraries(gaze_logger PRIVATE
${Boost_DLL_LIBRARy}
${Boost_DLL_LIBRARY}
${CMAKE_DL_LIBS}
)

Expand Down
17 changes: 15 additions & 2 deletions driver/src/addons.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,21 @@

#include <filesystem>
#ifdef WIN
#include <iostream>
#define _snprintf _snprintf_s
#include <cstring>
// #define _snprintf _snprintf_s
// #define snprintf _snprintf
// #undef snprintf
namespace std {
inline int snprintf (char *s, size_t maxlen, const char *format, ...)
{
va_list arg;
int done;
va_start (arg, format);
done = _snprintf_s(s, maxlen, maxlen, format, arg, 0);
va_end (arg);
return done;
}
}
#endif
#include <boost/dll.hpp>

Expand Down

0 comments on commit c40f09c

Please sign in to comment.