From 79514c69a42305020e8fc55f1f6a733da6fc1720 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Sun, 21 Jan 2024 17:18:58 +0200 Subject: [PATCH 01/17] added workflow --- .github/workflows/learn-github-actions.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/workflows/learn-github-actions.yml diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml new file mode 100644 index 0000000..c0fadd3 --- /dev/null +++ b/.github/workflows/learn-github-actions.yml @@ -0,0 +1,9 @@ +name: learn-github-actions +run-name: ${{ github.actor }} is learning GitHub Actions +on: [push] +jobs: + build-latest-commit: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v4 + - run: cmake -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -DProtobuf_INSTALL_DIR=%Protobuf_INSTALL_DIR% -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 From ae3753d2d875ac59272ba8df55372479de84888c Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Sun, 21 Jan 2024 17:23:19 +0200 Subject: [PATCH 02/17] synax error fix --- .github/workflows/learn-github-actions.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index c0fadd3..ff3716a 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -2,8 +2,9 @@ name: learn-github-actions run-name: ${{ github.actor }} is learning GitHub Actions on: [push] jobs: - build-latest-commit: - runs-on: windows-2022 - steps: - - uses: actions/checkout@v4 - - run: cmake -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -DProtobuf_INSTALL_DIR=%Protobuf_INSTALL_DIR% -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 + build-latest-commit: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v4 + - run: cmake -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -DProtobuf_INSTALL_DIR=%Protobuf_INSTALL_DIR% -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 + From cac089078078cd2a55d0ace13001887e679b1a1a Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Sun, 21 Jan 2024 17:28:40 +0200 Subject: [PATCH 03/17] syntax fix --- .github/workflows/learn-github-actions.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index ff3716a..ad04aaa 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -3,8 +3,7 @@ run-name: ${{ github.actor }} is learning GitHub Actions on: [push] jobs: build-latest-commit: - runs-on: windows-2022 - steps: - - uses: actions/checkout@v4 - - run: cmake -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -DProtobuf_INSTALL_DIR=%Protobuf_INSTALL_DIR% -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 - + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - run: cmake -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -DProtobuf_INSTALL_DIR=%Protobuf_INSTALL_DIR% -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 From 8114a013fd0a6ed90545a4e166f6425f5fd459c4 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Sun, 21 Jan 2024 17:35:13 +0200 Subject: [PATCH 04/17] fix build error --- .github/workflows/learn-github-actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index ad04aaa..1e29b14 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -3,7 +3,7 @@ run-name: ${{ github.actor }} is learning GitHub Actions on: [push] jobs: build-latest-commit: - runs-on: windows-latest + runs-on: windows-2022 steps: - uses: actions/checkout@v4 - - run: cmake -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -DProtobuf_INSTALL_DIR=%Protobuf_INSTALL_DIR% -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 + - run: cmake -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 From 3df1991162bf4cbc5bd640682f4e0e2d8449e765 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 14:22:09 +0200 Subject: [PATCH 05/17] play with actions #1 --- CMakeLists.txt | 16 ++++++++-------- build.solution.cmd | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) 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 ) diff --git a/build.solution.cmd b/build.solution.cmd index e87711b..c8dcc87 100644 --- a/build.solution.cmd +++ b/build.solution.cmd @@ -1,7 +1,8 @@ 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 ./out -G "Visual Studio 17 2022" -A Win32 cd %CurPath% From 18912c708ccddb9d9b3b3d8cf2c1892520e8009a Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 14:24:20 +0200 Subject: [PATCH 06/17] #2 --- .github/workflows/learn-github-actions.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index 1e29b14..d108ad0 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -6,4 +6,6 @@ jobs: runs-on: windows-2022 steps: - uses: actions/checkout@v4 - - run: cmake -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 + - run: echo "CD: %cd%" + - run: build.solution.cmd + From ec23121c4567f2cb9582256ab7d57f21dc248898 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 14:26:35 +0200 Subject: [PATCH 07/17] #3 --- .github/workflows/learn-github-actions.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index d108ad0..0e53d05 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -6,6 +6,5 @@ jobs: runs-on: windows-2022 steps: - uses: actions/checkout@v4 - - run: echo "CD: %cd%" + - run: echo "CD: %%cd%%" - run: build.solution.cmd - From af610fa370e390f297dc8f3945a736660a9761f8 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 14:54:13 +0200 Subject: [PATCH 08/17] #4 --- .github/workflows/learn-github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index 0e53d05..e92b9b9 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -6,5 +6,5 @@ jobs: runs-on: windows-2022 steps: - uses: actions/checkout@v4 - - run: echo "CD: %%cd%%" + - run: echo "CD %cd% - run: build.solution.cmd From 4a9505d87463e001abb4d10cab2e3d877bc99df2 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 14:55:17 +0200 Subject: [PATCH 09/17] #5 --- .github/workflows/learn-github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index e92b9b9..5f70922 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -6,5 +6,5 @@ jobs: runs-on: windows-2022 steps: - uses: actions/checkout@v4 - - run: echo "CD %cd% + - run: echo "CD %cd%" - run: build.solution.cmd From 8242d525cc28ecb7c047f584ddbc023907e18d09 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 14:58:19 +0200 Subject: [PATCH 10/17] #6 --- .github/workflows/learn-github-actions.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index 5f70922..461a501 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -6,5 +6,6 @@ jobs: runs-on: windows-2022 steps: - uses: actions/checkout@v4 - - run: echo "CD %cd%" + - run: echo %cd% + - run: cd - run: build.solution.cmd From 9c1a28c1c0d1416650311e48be5acb4fbe804adc Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 15:02:58 +0200 Subject: [PATCH 11/17] #7 --- .github/workflows/learn-github-actions.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index 461a501..c8fdc34 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -5,7 +5,14 @@ jobs: build-latest-commit: runs-on: windows-2022 steps: - - uses: actions/checkout@v4 - - run: echo %cd% - - run: cd + - name: Checkout + uses: actions/checkout@v4 + + - name: Build solution 1 + run: pwd + + - name: Build solution 2 + run: pwd + working-directory: ${{ github.workspace }} + - run: build.solution.cmd From 1325f72a23a797615a98cd061b330a6b8bbc61e9 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 15:04:48 +0200 Subject: [PATCH 12/17] #8 --- .github/workflows/learn-github-actions.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index c8fdc34..ea413fa 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -10,9 +10,9 @@ jobs: - name: Build solution 1 run: pwd + run: dir - - name: Build solution 2 + - name: Build solution run: pwd + run: build.solution.cmd working-directory: ${{ github.workspace }} - - - run: build.solution.cmd From 7fccec7baf1b552deaa2e2401a96930ce3973382 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 15:05:49 +0200 Subject: [PATCH 13/17] #9 --- .github/workflows/learn-github-actions.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index ea413fa..c545e4f 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -9,10 +9,9 @@ jobs: uses: actions/checkout@v4 - name: Build solution 1 - run: pwd run: dir + working-directory: ${{ github.workspace }} - name: Build solution - run: pwd run: build.solution.cmd working-directory: ${{ github.workspace }} From 2ced6c807f4639d38c25f2981f9b17474cc2df35 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 15:08:27 +0200 Subject: [PATCH 14/17] #10 --- .github/workflows/learn-github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml index c545e4f..54fd207 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/learn-github-actions.yml @@ -13,5 +13,5 @@ jobs: working-directory: ${{ github.workspace }} - name: Build solution - run: build.solution.cmd + run: ./build.solution.cmd working-directory: ${{ github.workspace }} From d63f99cbbd490bcadf610d3171d32940cbebaff7 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 15:35:09 +0200 Subject: [PATCH 15/17] #11 --- .github/workflows/{learn-github-actions.yml => build.yml} | 8 ++++++-- .gitignore | 2 +- clean.solution.cmd => 0.clean.all.cmd | 0 build.solution.cmd => 1.generate.solution.cmd | 2 +- 2.build.solution.cmd | 8 ++++++++ 5 files changed, 16 insertions(+), 4 deletions(-) rename .github/workflows/{learn-github-actions.yml => build.yml} (67%) rename clean.solution.cmd => 0.clean.all.cmd (100%) rename build.solution.cmd => 1.generate.solution.cmd (75%) create mode 100644 2.build.solution.cmd diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/build.yml similarity index 67% rename from .github/workflows/learn-github-actions.yml rename to .github/workflows/build.yml index 54fd207..f7e864c 100644 --- a/.github/workflows/learn-github-actions.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: learn-github-actions +name: Build solution run-name: ${{ github.actor }} is learning GitHub Actions on: [push] jobs: @@ -12,6 +12,10 @@ jobs: run: dir working-directory: ${{ github.workspace }} + - name: Generate solution + run: ./1.generate.solution.cmd + working-directory: ${{ github.workspace }} + - name: Build solution - run: ./build.solution.cmd + 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 75% rename from build.solution.cmd rename to 1.generate.solution.cmd index c8dcc87..0229f8a 100644 --- a/build.solution.cmd +++ b/1.generate.solution.cmd @@ -3,6 +3,6 @@ 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 -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 +cmake -S ./ -B ./build -G "Visual Studio 17 2022" -A Win32 cd %CurPath% diff --git a/2.build.solution.cmd b/2.build.solution.cmd new file mode 100644 index 0000000..e79ff16 --- /dev/null +++ b/2.build.solution.cmd @@ -0,0 +1,8 @@ +set CurPath=%cd% + +echo "CurPath: %CurPath%" + +MSBuild.exe .\build\extio2tcp.sln -t:Build -p:Configuration=Debug +MSBuild.exe .\build\extio2tcp.sln -t:Build -p:Configuration=RelWithDebInfo + +cd %CurPath% From a12a20f338ab2d537aa45f2c153589f5bcc0810e Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 15:49:48 +0200 Subject: [PATCH 16/17] #12 --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f7e864c..05e41c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,11 @@ jobs: - 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 }} From 5ecbd585deef85adaab78706530594d6da1faaa2 Mon Sep 17 00:00:00 2001 From: Roman Ukhov Date: Tue, 23 Jan 2024 15:54:22 +0200 Subject: [PATCH 17/17] #13 --- 1.generate.solution.cmd | 2 ++ 2.build.solution.cmd | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/1.generate.solution.cmd b/1.generate.solution.cmd index 0229f8a..a007f0b 100644 --- a/1.generate.solution.cmd +++ b/1.generate.solution.cmd @@ -5,4 +5,6 @@ echo "CurPath: %CurPath%" ::cmake -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -S ./ -B ./out -G "Visual Studio 17 2022" -A Win32 --debug-find 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 index e79ff16..68c74bd 100644 --- a/2.build.solution.cmd +++ b/2.build.solution.cmd @@ -1,8 +1,11 @@ set CurPath=%cd% -echo "CurPath: %CurPath%" - 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%