diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..05e41c2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build solution +run-name: ${{ github.actor }} is learning GitHub Actions +on: [push] +jobs: + build-latest-commit: + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1 + with: + msbuild-architecture: x64 + + - name: Build solution 1 + run: dir + working-directory: ${{ github.workspace }} + + - name: Generate solution + run: ./1.generate.solution.cmd + working-directory: ${{ github.workspace }} + + - name: Build solution + run: ./2.build.solution.cmd + working-directory: ${{ github.workspace }} diff --git a/.gitignore b/.gitignore index c20e521..d2d5cac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -out +build .vscode diff --git a/clean.solution.cmd b/0.clean.all.cmd similarity index 100% rename from clean.solution.cmd rename to 0.clean.all.cmd diff --git a/build.solution.cmd b/1.generate.solution.cmd similarity index 52% rename from build.solution.cmd rename to 1.generate.solution.cmd index e87711b..a007f0b 100644 --- a/build.solution.cmd +++ b/1.generate.solution.cmd @@ -1,7 +1,10 @@ set CurPath=%cd% +echo "CurPath: %CurPath%" ::cd extio2tcp ::cmake -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 --debug-find -cmake -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -DProtobuf_INSTALL_DIR=%Protobuf_INSTALL_DIR% -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 +cmake -S ./ -B ./build -G "Visual Studio 17 2022" -A Win32 + +if %errorlevel% neq 0 exit /b %errorlevel% cd %CurPath% diff --git a/2.build.solution.cmd b/2.build.solution.cmd new file mode 100644 index 0000000..68c74bd --- /dev/null +++ b/2.build.solution.cmd @@ -0,0 +1,11 @@ +set CurPath=%cd% + +MSBuild.exe .\build\extio2tcp.sln -t:Build -p:Configuration=Debug + +if %errorlevel% neq 0 exit /b %errorlevel% + +MSBuild.exe .\build\extio2tcp.sln -t:Build -p:Configuration=RelWithDebInfo + +if %errorlevel% neq 0 exit /b %errorlevel% + +cd %CurPath% diff --git a/CMakeLists.txt b/CMakeLists.txt index 17ab35f..7a6705b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,13 +31,13 @@ endif() # ========================================================================== # Protocol bufers section -set( PROTOBUF_ROOT ${Protobuf_INSTALL_DIR}) -set( Protobuf_INCLUDE_DIR ${PROTOBUF_ROOT}/include ) -set( Protobuf_LIBRARY_DEBUG ${PROTOBUF_ROOT}/lib/libprotobufd.lib ) +#set( PROTOBUF_ROOT ${Protobuf_INSTALL_DIR}) +#set( Protobuf_INCLUDE_DIR ${PROTOBUF_ROOT}/include ) +#set( Protobuf_LIBRARY_DEBUG ${PROTOBUF_ROOT}/lib/libprotobufd.lib ) #set( Protobuf_LITE_LIBRARY_DEBUG ${PROTOBUF_ROOT}/Debug/libprotobuf-lited.lib ) -message( "Protobuf_INCLUDE_DIR: " ${Protobuf_INCLUDE_DIR} ) -message( "CMAKE_BINARY_DIR: " ${CMAKE_BINARY_DIR}) +#message( "Protobuf_INCLUDE_DIR: " ${Protobuf_INCLUDE_DIR} ) +#message( "CMAKE_BINARY_DIR: " ${CMAKE_BINARY_DIR}) #message( "Protobuf_LITE_LIBRARY_DEBUG: " ${Protobuf_LITE_LIBRARY_DEBUG}) include(FindProtobuf) @@ -45,7 +45,7 @@ include(FindProtobuf) find_package(Protobuf CONFIG REQUIRED) find_package(Boost - 1.82.0 +# 1.84.0 #[EXACT] # Minimum or EXACT version e.g. 1.67.0 REQUIRED # Fail with error if Boost is not found #[COMPONENTS ...] # Boost libraries by their canonical name @@ -56,8 +56,8 @@ find_package(Boost #set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") -include_directories( ${Boost_INCLUDE_DIRS} ) -link_directories( ${Boost_LIBRARY_DIRS} ) +#include_directories( ${Boost_INCLUDE_DIRS} ) +#link_directories( ${Boost_LIBRARY_DIRS} ) add_subdirectory( src )