From 8a3f62a5ef4c66843b6a1b6f7419591f6bb12b63 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 11:44:00 +0100 Subject: [PATCH 01/82] Change protobuf version to 2.6.1 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index da70a5db3..88cd42eac 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.20.1 + PROTOBUF_VERSION: 2.6.1 PROTOBUF_VARIANT: '-all' # Use '-all' prior to 22.0, '' after ABSEIL_VERSION: 20230802.1 From 27a7ee22e4bd37dd982e1a0ce006cedc89099311 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 11:46:39 +0100 Subject: [PATCH 02/82] Remove -all Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 88cd42eac..6a9868e7b 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -2,7 +2,7 @@ name: ProtoBuf CI Builds env: PROTOBUF_VERSION: 2.6.1 - PROTOBUF_VARIANT: '-all' # Use '-all' prior to 22.0, '' after + PROTOBUF_VARIANT: '' # Use '-all' prior to 22.0, '' after ABSEIL_VERSION: 20230802.1 on: From 15ca2879ab83330d6972ce9649738ec19a089fbd Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 11:54:20 +0100 Subject: [PATCH 03/82] Introduce autotools parameter Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 6a9868e7b..236e3d513 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -2,7 +2,8 @@ name: ProtoBuf CI Builds env: PROTOBUF_VERSION: 2.6.1 - PROTOBUF_VARIANT: '' # Use '-all' prior to 22.0, '' after + PROTOBUF_VARIANT: '' # Use '-all' between 3.5.0 and 22.0, otherwise use '' + USE_AUTOTOOLS: true ABSEIL_VERSION: 20230802.1 on: @@ -50,16 +51,16 @@ jobs: run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${{env.PROTOBUF_VERSION}}/protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz && tar xzvf protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz - name: Download Abseil ${{ env.ABSEIL_VERSION }} - if: steps.cache-depends.outputs.cache-hit != 'true' && env.PROTOBUF_VARIANT == '' + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == false run: curl -OL https://github.com/abseil/abseil-cpp/archive/refs/tags/${{env.ABSEIL_VERSION}}.tar.gz && tar xzvf ${{env.ABSEIL_VERSION}}.tar.gz && rm -rf protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp && mv abseil-cpp-${{env.ABSEIL_VERSION}} protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools - if: steps.cache-depends.outputs.cache-hit != 'true' && env.PROTOBUF_VARIANT == '-all' + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == false working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: ./configure DIST_LANG=cpp --prefix=/usr && make - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake - if: steps.cache-depends.outputs.cache-hit != 'true' && env.PROTOBUF_VARIANT == '' + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == true working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: cmake -DCMAKE_CXX_STANDARD=17 -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF . && cmake --build . --config Release -j 4 From 585dc433ad332f62720203d69db6fd84d618ccf8 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 11:56:44 +0100 Subject: [PATCH 04/82] Fix autotools if condition Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 236e3d513..fdd795745 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -51,16 +51,16 @@ jobs: run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${{env.PROTOBUF_VERSION}}/protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz && tar xzvf protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz - name: Download Abseil ${{ env.ABSEIL_VERSION }} - if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == false + if: steps.cache-depends.outputs.cache-hit != 'true' && !env.USE_AUTOTOOLS run: curl -OL https://github.com/abseil/abseil-cpp/archive/refs/tags/${{env.ABSEIL_VERSION}}.tar.gz && tar xzvf ${{env.ABSEIL_VERSION}}.tar.gz && rm -rf protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp && mv abseil-cpp-${{env.ABSEIL_VERSION}} protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools - if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == false + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: ./configure DIST_LANG=cpp --prefix=/usr && make - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake - if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == true + if: steps.cache-depends.outputs.cache-hit != 'true' && !env.USE_AUTOTOOLS working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: cmake -DCMAKE_CXX_STANDARD=17 -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF . && cmake --build . --config Release -j 4 From 839807bbf5e27f2bdca62c5033fd7dc14a10d649 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 12:00:56 +0100 Subject: [PATCH 05/82] Set autotools variable also for proto3 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index fdd795745..6e440891c 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -3,7 +3,7 @@ name: ProtoBuf CI Builds env: PROTOBUF_VERSION: 2.6.1 PROTOBUF_VARIANT: '' # Use '-all' between 3.5.0 and 22.0, otherwise use '' - USE_AUTOTOOLS: true + USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 on: @@ -148,16 +148,16 @@ jobs: run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${{env.PROTOBUF_VERSION}}/protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz && tar xzvf protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz - name: Download Abseil ${{ env.ABSEIL_VERSION }} - if: steps.cache-depends.outputs.cache-hit != 'true' && env.PROTOBUF_VARIANT == '' + if: steps.cache-depends.outputs.cache-hit != 'true' && !env.USE_AUTOTOOLS run: curl -OL https://github.com/abseil/abseil-cpp/archive/refs/tags/${{env.ABSEIL_VERSION}}.tar.gz && tar xzvf ${{env.ABSEIL_VERSION}}.tar.gz && rm -rf protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp && mv abseil-cpp-${{env.ABSEIL_VERSION}} protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools - if: steps.cache-depends.outputs.cache-hit != 'true' && env.PROTOBUF_VARIANT == '-all' + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: ./configure DIST_LANG=cpp --prefix=/usr && make - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake - if: steps.cache-depends.outputs.cache-hit != 'true' && env.PROTOBUF_VARIANT == '' + if: steps.cache-depends.outputs.cache-hit != 'true' && !env.USE_AUTOTOOLS working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: cmake -DCMAKE_CXX_STANDARD=17 -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF . && cmake --build . --config Release -j 4 From e69a4acc9d5f3755375ad948d5b4274febc45690 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:17:32 +0100 Subject: [PATCH 06/82] Get version from protoc in setup.py Signed-off-by: ClemensLinnhoff --- setup.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 36672287e..d7e12428d 100644 --- a/setup.py +++ b/setup.py @@ -115,6 +115,18 @@ def run(self): except Exception: pass +# Get protobuf version from protoc to ensure protobuf python package and protoc have the same version +version_print = subprocess.run([GenerateProtobufCommand.find_protoc(), "--version"], capture_output=True, text=True).stdout +protobuf_version = version_print.split()[1] +protobuf_split_version = protobuf_version.split('.') +protobuf_major = int(protobuf_split_version[0]) +protobuf_minor = int(protobuf_split_version[1]) +protobuf_patch = int(protobuf_split_version[2]) +# Change protobuf major version from 3 to 4 for protobuf version > 21 +if protobuf_major >= 3 and protobuf_minor >= 21: + protobuf_major = 4 + +protobuf_install_req = 'protobuf==' + str(protobuf_major) + '.' + str(protobuf_minor) + '.' + str(protobuf_patch) setup( name="open-simulation-interface", version=str(VERSION_MAJOR) + "." + str(VERSION_MINOR) + "." + str(VERSION_PATCH), @@ -126,7 +138,7 @@ def run(self): "Nils.Hirsenkorn@tum.de, Pilar.Garcia-Ramos@bmw.de," "Mark.Schiementz@bmw.de, Sebastian.SB.Schneider@bmw.de", packages=[package_name], - install_requires=["protobuf"], + install_requires=[protobuf_install_req], cmdclass={ "build_py": GenerateProtobufCommand, }, From 4819ebc51314dc91e21cd7bc1b10eea808848446 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:19:17 +0100 Subject: [PATCH 07/82] Black formatting Signed-off-by: ClemensLinnhoff --- setup.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index d7e12428d..2f488fe01 100644 --- a/setup.py +++ b/setup.py @@ -116,9 +116,11 @@ def run(self): pass # Get protobuf version from protoc to ensure protobuf python package and protoc have the same version -version_print = subprocess.run([GenerateProtobufCommand.find_protoc(), "--version"], capture_output=True, text=True).stdout +version_print = subprocess.run( + [GenerateProtobufCommand.find_protoc(), "--version"], capture_output=True, text=True +).stdout protobuf_version = version_print.split()[1] -protobuf_split_version = protobuf_version.split('.') +protobuf_split_version = protobuf_version.split(".") protobuf_major = int(protobuf_split_version[0]) protobuf_minor = int(protobuf_split_version[1]) protobuf_patch = int(protobuf_split_version[2]) @@ -126,7 +128,14 @@ def run(self): if protobuf_major >= 3 and protobuf_minor >= 21: protobuf_major = 4 -protobuf_install_req = 'protobuf==' + str(protobuf_major) + '.' + str(protobuf_minor) + '.' + str(protobuf_patch) +protobuf_install_req = ( + "protobuf==" + + str(protobuf_major) + + "." + + str(protobuf_minor) + + "." + + str(protobuf_patch) +) setup( name="open-simulation-interface", version=str(VERSION_MAJOR) + "." + str(VERSION_MINOR) + "." + str(VERSION_PATCH), From a0780dc238d9f56443fe6177e9e943297e8576c1 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:24:01 +0100 Subject: [PATCH 08/82] Test protobuf 3.15.0 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 6e440891c..92668e5ff 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,8 +1,8 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 2.6.1 - PROTOBUF_VARIANT: '' # Use '-all' between 3.5.0 and 22.0, otherwise use '' + PROTOBUF_VERSION: 3.15.0 + PROTOBUF_VARIANT: '-all' # Use '-all' between 3.5.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From b301ddb8136bcb3e8586a4380b4e352029c2df61 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:35:30 +0100 Subject: [PATCH 09/82] Test protobuf 25.2 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 92668e5ff..4729e71a5 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.15.0 + PROTOBUF_VERSION: 3.25.2 # Specify the C++ major version (e.g. 3.25.2 instead of 25.2 or 4.25.2) PROTOBUF_VARIANT: '-all' # Use '-all' between 3.5.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 27e155ec3c4be316da78cb2c0251066ef2e72c14 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:36:33 +0100 Subject: [PATCH 10/82] Test protobuf 25.2 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 4729e71a5..46cc12c61 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.25.2 # Specify the C++ major version (e.g. 3.25.2 instead of 25.2 or 4.25.2) + PROTOBUF_VERSION: 25.2 PROTOBUF_VARIANT: '-all' # Use '-all' between 3.5.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From c83b34fd62ffb7551c908ab1700c5897c9e7c5c7 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:37:24 +0100 Subject: [PATCH 11/82] Test protobuf 3.4.0 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 46cc12c61..7c96f1577 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 25.2 + PROTOBUF_VERSION: 3.4.0 PROTOBUF_VARIANT: '-all' # Use '-all' between 3.5.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From e7178543d4e21f253c6798d5c5c84a7154a4c2e9 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:37:42 +0100 Subject: [PATCH 12/82] Test protobuf 3.0.0 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 7c96f1577..d556ea056 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.4.0 + PROTOBUF_VERSION: 3.0.0 PROTOBUF_VARIANT: '-all' # Use '-all' between 3.5.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 34869cc10800f8e3b69c1ac891be84eba93f6e43 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:38:11 +0100 Subject: [PATCH 13/82] Test protobuf 3.0.0 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index d556ea056..64737b229 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -2,7 +2,7 @@ name: ProtoBuf CI Builds env: PROTOBUF_VERSION: 3.0.0 - PROTOBUF_VARIANT: '-all' # Use '-all' between 3.5.0 and 22.0, otherwise use '' + PROTOBUF_VARIANT: '' # Use '-all' between 3.5.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 4f99edd6e85a72e6aec02ab474841536f2c8ddb7 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:38:27 +0100 Subject: [PATCH 14/82] Test protobuf 3.4.0 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 64737b229..92e88e424 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.0.0 + PROTOBUF_VERSION: 3.4.0 PROTOBUF_VARIANT: '' # Use '-all' between 3.5.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 97c61a5402297d468f6fc8a2f227f79fdd815db3 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:39:03 +0100 Subject: [PATCH 15/82] Test protobuf 25.2 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 92e88e424..7ba4b6eb5 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,9 +1,9 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.4.0 + PROTOBUF_VERSION: 25.2 PROTOBUF_VARIANT: '' # Use '-all' between 3.5.0 and 22.0, otherwise use '' - USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 + USE_AUTOTOOLS: false # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 on: From aa8ad1008791d4e2f284b48921e43e24511368cc Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:41:36 +0100 Subject: [PATCH 16/82] Add linux to version number Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 7ba4b6eb5..4aeb455dd 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 25.2 + PROTOBUF_VERSION: 3.0.0-linux-x86_64 PROTOBUF_VARIANT: '' # Use '-all' between 3.5.0 and 22.0, otherwise use '' USE_AUTOTOOLS: false # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 3f536d84ccd538311efb0a66d15570aea206c9b6 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:43:30 +0100 Subject: [PATCH 17/82] Try cpp version Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 4aeb455dd..35c7b4640 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,9 +1,9 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.0.0-linux-x86_64 - PROTOBUF_VARIANT: '' # Use '-all' between 3.5.0 and 22.0, otherwise use '' - USE_AUTOTOOLS: false # set true for PROTOBUF_VERSION <= 22.0 + PROTOBUF_VERSION: 3.0.0 + PROTOBUF_VARIANT: '-cpp' # Use '-all' between 3.5.0 and 22.0, otherwise use '' + USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 on: From 76afb880f722c261353b92f763c7575acfb94af2 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:49:28 +0100 Subject: [PATCH 18/82] Try protobuf 3.16.0 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 35c7b4640..8671123e5 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,8 +1,8 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.0.0 - PROTOBUF_VARIANT: '-cpp' # Use '-all' between 3.5.0 and 22.0, otherwise use '' + PROTOBUF_VERSION: 3.16.0 + PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From a9f8cef3deaa031ca1f5b7f89d7ffa0ecb2b6b9c Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:51:39 +0100 Subject: [PATCH 19/82] Try protobuf 25.2 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 8671123e5..c243572cb 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,9 +1,9 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.16.0 - PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' - USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 + PROTOBUF_VERSION: 25.2 + PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' + USE_AUTOTOOLS: false # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 on: From 538f8f0af5d5a04ce101ebc183fb293ec4339842 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:52:22 +0100 Subject: [PATCH 20/82] Try protobuf 24.3 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index c243572cb..88509e14e 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 25.2 + PROTOBUF_VERSION: 24.3 PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: false # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 5ddaafb142f3cc94c98fd227b0e6d7b994645ae4 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:54:48 +0100 Subject: [PATCH 21/82] Change setting true false in if condition Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 88509e14e..d099c1787 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -51,16 +51,16 @@ jobs: run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${{env.PROTOBUF_VERSION}}/protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz && tar xzvf protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz - name: Download Abseil ${{ env.ABSEIL_VERSION }} - if: steps.cache-depends.outputs.cache-hit != 'true' && !env.USE_AUTOTOOLS + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'false' run: curl -OL https://github.com/abseil/abseil-cpp/archive/refs/tags/${{env.ABSEIL_VERSION}}.tar.gz && tar xzvf ${{env.ABSEIL_VERSION}}.tar.gz && rm -rf protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp && mv abseil-cpp-${{env.ABSEIL_VERSION}} protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools - if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'true' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: ./configure DIST_LANG=cpp --prefix=/usr && make - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake - if: steps.cache-depends.outputs.cache-hit != 'true' && !env.USE_AUTOTOOLS + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'false' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: cmake -DCMAKE_CXX_STANDARD=17 -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF . && cmake --build . --config Release -j 4 From e03c880f000c45b4bf45965bf04db3bb0b454168 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 15:56:28 +0100 Subject: [PATCH 22/82] Change setting true false in if condition Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index d099c1787..6709bf254 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -3,7 +3,7 @@ name: ProtoBuf CI Builds env: PROTOBUF_VERSION: 24.3 PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' - USE_AUTOTOOLS: false # set true for PROTOBUF_VERSION <= 22.0 + USE_AUTOTOOLS: 'false' # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 on: @@ -51,7 +51,7 @@ jobs: run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${{env.PROTOBUF_VERSION}}/protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz && tar xzvf protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz - name: Download Abseil ${{ env.ABSEIL_VERSION }} - if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'false' + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' run: curl -OL https://github.com/abseil/abseil-cpp/archive/refs/tags/${{env.ABSEIL_VERSION}}.tar.gz && tar xzvf ${{env.ABSEIL_VERSION}}.tar.gz && rm -rf protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp && mv abseil-cpp-${{env.ABSEIL_VERSION}} protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools @@ -60,7 +60,7 @@ jobs: run: ./configure DIST_LANG=cpp --prefix=/usr && make - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake - if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'false' + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: cmake -DCMAKE_CXX_STANDARD=17 -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF . && cmake --build . --config Release -j 4 From a2d587f93639912533d9ac38ff6685a159aa99e9 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 16:04:37 +0100 Subject: [PATCH 23/82] Try if condition Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 6709bf254..41df70f27 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -3,7 +3,7 @@ name: ProtoBuf CI Builds env: PROTOBUF_VERSION: 24.3 PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' - USE_AUTOTOOLS: 'false' # set true for PROTOBUF_VERSION <= 22.0 + USE_AUTOTOOLS: false # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 on: From 7f07dafe299e844fca474eed84dc54f608ff5c1f Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 16:06:12 +0100 Subject: [PATCH 24/82] Fix proto3 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 41df70f27..86f9d5031 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -148,16 +148,16 @@ jobs: run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${{env.PROTOBUF_VERSION}}/protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz && tar xzvf protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz - name: Download Abseil ${{ env.ABSEIL_VERSION }} - if: steps.cache-depends.outputs.cache-hit != 'true' && !env.USE_AUTOTOOLS + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' run: curl -OL https://github.com/abseil/abseil-cpp/archive/refs/tags/${{env.ABSEIL_VERSION}}.tar.gz && tar xzvf ${{env.ABSEIL_VERSION}}.tar.gz && rm -rf protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp && mv abseil-cpp-${{env.ABSEIL_VERSION}} protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools - if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'true' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: ./configure DIST_LANG=cpp --prefix=/usr && make - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake - if: steps.cache-depends.outputs.cache-hit != 'true' && !env.USE_AUTOTOOLS + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: cmake -DCMAKE_CXX_STANDARD=17 -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF . && cmake --build . --config Release -j 4 From 33b7304c7d1409ebc33cf9371c439b2bcf98d7c2 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 16:23:06 +0100 Subject: [PATCH 25/82] Fix protobuf versioning in setup.py Signed-off-by: ClemensLinnhoff --- setup.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 2f488fe01..abf8b2630 100644 --- a/setup.py +++ b/setup.py @@ -121,9 +121,14 @@ def run(self): ).stdout protobuf_version = version_print.split()[1] protobuf_split_version = protobuf_version.split(".") -protobuf_major = int(protobuf_split_version[0]) -protobuf_minor = int(protobuf_split_version[1]) -protobuf_patch = int(protobuf_split_version[2]) +if len(protobuf_split_version) >= 3: + protobuf_major = int(protobuf_split_version[0]) + protobuf_minor = int(protobuf_split_version[1]) + protobuf_patch = int(protobuf_split_version[2]) +else: + protobuf_major = 4 + protobuf_minor = int(protobuf_split_version[0]) + protobuf_patch = int(protobuf_split_version[1]) # Change protobuf major version from 3 to 4 for protobuf version > 21 if protobuf_major >= 3 and protobuf_minor >= 21: protobuf_major = 4 From d4bdad0b99dd925da2d21c2772df90724e5b503b Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 16:29:35 +0100 Subject: [PATCH 26/82] Test protobuf 25.2 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 86f9d5031..b7c5bffe2 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 24.3 + PROTOBUF_VERSION: 25.2 PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: false # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From f52f4535821c5a99fb842a4d952dc3306d17af66 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 16:30:44 +0100 Subject: [PATCH 27/82] Test protobuf 3.18.0 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index b7c5bffe2..c9586eb7e 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,9 +1,9 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 25.2 - PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' - USE_AUTOTOOLS: false # set true for PROTOBUF_VERSION <= 22.0 + PROTOBUF_VERSION: 3.18.0 + PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' + USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 on: From d562fd4303ee452971b05702fe8a4cfb7fe89828 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 16:38:13 +0100 Subject: [PATCH 28/82] Test protobuf 3.5.0 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index c9586eb7e..10a8bcdb7 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.18.0 + PROTOBUF_VERSION: 3.5.0 PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From bf9f97d8b964e9f7ba87c825209c69a18f013324 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 16:43:00 +0100 Subject: [PATCH 29/82] Test protobuf 3.0.0 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 10a8bcdb7..1b97ac8eb 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.5.0 + PROTOBUF_VERSION: 3.0.0 PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 1edbf2b77f8567e6f6c5ec60d67398e6454b63de Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 16:54:26 +0100 Subject: [PATCH 30/82] Test protobuf 3.5.1 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 1b97ac8eb..300430adf 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.0.0 + PROTOBUF_VERSION: 3.5.1 PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 21ea6bf98aabedb65cdc96a0e71b7d541dffad0f Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 17:07:06 +0100 Subject: [PATCH 31/82] Test protobuf 3.0.2 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 300430adf..76aa37a09 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.5.1 + PROTOBUF_VERSION: 3.0.2 PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 43b46c51651ffb1a729fc42b507ed0cb1348cc55 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 17:08:02 +0100 Subject: [PATCH 32/82] Test protobuf 2.6.1 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 76aa37a09..e58ccbe41 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,8 +1,8 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.0.2 - PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' + PROTOBUF_VERSION: 2.6.1 + PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From c23d4c63aad2aadf4128c3982c98eff4bc2212c4 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 17:31:07 +0100 Subject: [PATCH 33/82] Try CXXFLAGS=-std=c++11 for protobuf 3.5.1 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index e58ccbe41..027b81f96 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -57,7 +57,7 @@ jobs: - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'true' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} - run: ./configure DIST_LANG=cpp --prefix=/usr && make + run: ./configure CXXFLAGS=-std=c++11 DIST_LANG=cpp --prefix=/usr && make - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' From 59cc72cf3817ec34a00124880faca0c6de2c0533 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 17:31:42 +0100 Subject: [PATCH 34/82] Try CXXFLAGS=-std=c++11 for protobuf 2.6.1 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 027b81f96..ef06dcfb1 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 2.6.1 + PROTOBUF_VERSION: 3.6.1 PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 296df425fbaf2f1646c4e98e852ad232ccbcf39f Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 17:41:04 +0100 Subject: [PATCH 35/82] Try CXXFLAGS=-std=c++11 for protobuf 3.0.2 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index ef06dcfb1..744f65c2b 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,8 +1,8 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.6.1 - PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' + PROTOBUF_VERSION: 3.0.2 + PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 2a986b9e1de2062d78c83d70b3d75c4c6670fe56 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 17:41:59 +0100 Subject: [PATCH 36/82] Try CXXFLAGS=-std=c++11 for protobuf 3.5.1 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 744f65c2b..9e116c9ea 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.0.2 + PROTOBUF_VERSION: 3.5.1 PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 2a5db980b3492dc90ad9991455ab38eb954b23d3 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 17:42:52 +0100 Subject: [PATCH 37/82] Try CXXFLAGS=-std=c++11 for protobuf 2.6.1 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 9e116c9ea..027b81f96 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,8 +1,8 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.5.1 - PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' + PROTOBUF_VERSION: 2.6.1 + PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From cd44dc08f38ba0b7170c116bb19d9c0d0ef3be6a Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 17:50:40 +0100 Subject: [PATCH 38/82] Set c++ standard to 17 for autotools, as it is set for cmake Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 027b81f96..a9dc98e9d 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -57,7 +57,7 @@ jobs: - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'true' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} - run: ./configure CXXFLAGS=-std=c++11 DIST_LANG=cpp --prefix=/usr && make + run: ./configure CXXFLAGS=-std=c++17 DIST_LANG=cpp --prefix=/usr && make - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' @@ -154,7 +154,7 @@ jobs: - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'true' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} - run: ./configure DIST_LANG=cpp --prefix=/usr && make + run: ./configure CXXFLAGS=-std=c++17 DIST_LANG=cpp --prefix=/usr && make - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' From bb4a3b089fa1dfe3b47a53793785fe8125f41b8b Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 17:53:44 +0100 Subject: [PATCH 39/82] Try protobuf 3.0.0 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index a9dc98e9d..3c238a9c9 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,8 +1,8 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 2.6.1 - PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' + PROTOBUF_VERSION: 3.0.0 + PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 143d0a187491b26b6f4d326f279e46542967dd8c Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 17:56:50 +0100 Subject: [PATCH 40/82] Try protobuf 3.0.2 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 3c238a9c9..24f8af5bf 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.0.0 + PROTOBUF_VERSION: 3.0.2 PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From d6080b79e78038654b55be09e0fcd23c1ed4c58a Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 18:02:28 +0100 Subject: [PATCH 41/82] Protobuf 3.0.2, CXXFLAGS=-std=c++11 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 24f8af5bf..b73c61a95 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -57,7 +57,7 @@ jobs: - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'true' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} - run: ./configure CXXFLAGS=-std=c++17 DIST_LANG=cpp --prefix=/usr && make + run: ./configure CXXFLAGS=-std=c++11 DIST_LANG=cpp --prefix=/usr && make - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' @@ -154,7 +154,7 @@ jobs: - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'true' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} - run: ./configure CXXFLAGS=-std=c++17 DIST_LANG=cpp --prefix=/usr && make + run: ./configure CXXFLAGS=-std=c++11 DIST_LANG=cpp --prefix=/usr && make - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' From f7245b672ad54ec6ffbfbe178df27ae69c1ee4b3 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 18:02:47 +0100 Subject: [PATCH 42/82] Protobuf 3.0.0, CXXFLAGS=-std=c++11 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index b73c61a95..30fb3b314 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.0.2 + PROTOBUF_VERSION: 3.0.0 PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From 4670a62e1ecbd11c012406aa33b6a97848a1e77a Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 18:03:28 +0100 Subject: [PATCH 43/82] Protobuf 3.18.0, CXXFLAGS=-std=c++11 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 30fb3b314..97ae65ed5 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,7 +1,7 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.0.0 + PROTOBUF_VERSION: 3.18.0 PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 From a2c74a07be69eadacac8cd9d281d6b830fe954e1 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 18:10:45 +0100 Subject: [PATCH 44/82] Protobuf 25.2, CXXFLAGS=-std=c++11 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 97ae65ed5..1fb5dbaf9 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,9 +1,9 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 3.18.0 - PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' - USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 + PROTOBUF_VERSION: 25.2 + PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' + USE_AUTOTOOLS: false # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 on: From 9c52c93225f1f13867387096dc0c7fa87bb2685d Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Mon, 22 Jan 2024 18:11:51 +0100 Subject: [PATCH 45/82] Protobuf 2.6.1, CXXFLAGS=-std=c++11 Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 1fb5dbaf9..ee1a15dd0 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,9 +1,9 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 25.2 + PROTOBUF_VERSION: 2.6.1 PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' - USE_AUTOTOOLS: false # set true for PROTOBUF_VERSION <= 22.0 + USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1 on: From 0d5a9c8e77ca1c4d687738d4c3e5454b9b7b31fe Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 10:18:10 +0100 Subject: [PATCH 46/82] Try setting protoc path variable Signed-off-by: ClemensLinnhoff --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index abf8b2630..3e3bf0505 100644 --- a/setup.py +++ b/setup.py @@ -119,6 +119,7 @@ def run(self): version_print = subprocess.run( [GenerateProtobufCommand.find_protoc(), "--version"], capture_output=True, text=True ).stdout +subprocess.run(["export PROTOC_PATH=`", GenerateProtobufCommand.find_protoc(), "`--version`"], capture_output=False, text=True) protobuf_version = version_print.split()[1] protobuf_split_version = protobuf_version.split(".") if len(protobuf_split_version) >= 3: From 2cc530984a5c7997823cc947043150e9202ec64a Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 10:20:48 +0100 Subject: [PATCH 47/82] Formatting Signed-off-by: ClemensLinnhoff --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3e3bf0505..56882cab6 100644 --- a/setup.py +++ b/setup.py @@ -119,7 +119,11 @@ def run(self): version_print = subprocess.run( [GenerateProtobufCommand.find_protoc(), "--version"], capture_output=True, text=True ).stdout -subprocess.run(["export PROTOC_PATH=`", GenerateProtobufCommand.find_protoc(), "`--version`"], capture_output=False, text=True) +subprocess.run( + ["export PROTOC_PATH=`", GenerateProtobufCommand.find_protoc(), "`--version`"], + capture_output=False, + text=True, +) protobuf_version = version_print.split()[1] protobuf_split_version = protobuf_version.split(".") if len(protobuf_split_version) >= 3: From 3f6e419853cbd05076521b1e1fa693b2c719860f Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 10:24:38 +0100 Subject: [PATCH 48/82] Don't execute proto3 job when 2.6.1 is set Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index ee1a15dd0..f51d80bb8 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -119,8 +119,8 @@ jobs: build-proto3-linux64: name: Build Proto3 Linux 64 - runs-on: ubuntu-22.04 + if: ${PROTOBUF_VERSION} != '2.6.1' steps: - name: Checkout OSI From dba583f7b5a4655d69b4d7694bbdf5acc4c063d2 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 10:29:33 +0100 Subject: [PATCH 49/82] Set protoc path Signed-off-by: ClemensLinnhoff --- setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 56882cab6..59b447343 100644 --- a/setup.py +++ b/setup.py @@ -116,14 +116,14 @@ def run(self): pass # Get protobuf version from protoc to ensure protobuf python package and protoc have the same version +protoc_path = subprocess.run( + ["which", GenerateProtobufCommand.find_protoc()], capture_output=True, text=True +).stdout +print(protoc_path) +os.environ['PROTOC_PATH'] = protoc_path version_print = subprocess.run( [GenerateProtobufCommand.find_protoc(), "--version"], capture_output=True, text=True ).stdout -subprocess.run( - ["export PROTOC_PATH=`", GenerateProtobufCommand.find_protoc(), "`--version`"], - capture_output=False, - text=True, -) protobuf_version = version_print.split()[1] protobuf_split_version = protobuf_version.split(".") if len(protobuf_split_version) >= 3: From 6bb19056c22b224cbaabe94c472644d50daebc69 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 10:32:22 +0100 Subject: [PATCH 50/82] Fix proto3 if Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index f51d80bb8..9d3703b8d 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -120,7 +120,7 @@ jobs: build-proto3-linux64: name: Build Proto3 Linux 64 runs-on: ubuntu-22.04 - if: ${PROTOBUF_VERSION} != '2.6.1' + if: ${{ PROTOBUF_VERSION != '2.6.1' }} steps: - name: Checkout OSI From ae099f3374f0c9c2b399ae15ff8575137b738ded Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 10:34:07 +0100 Subject: [PATCH 51/82] Fix proto3 if Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 9d3703b8d..b4d8625cb 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -120,7 +120,7 @@ jobs: build-proto3-linux64: name: Build Proto3 Linux 64 runs-on: ubuntu-22.04 - if: ${{ PROTOBUF_VERSION != '2.6.1' }} + if: ${{ env.PROTOBUF_VERSION != '2.6.1' }} steps: - name: Checkout OSI From e92c691de247f03ee408241b7f4043e37b03d7b2 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 10:41:29 +0100 Subject: [PATCH 52/82] another try for if Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index b4d8625cb..67f303e4b 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -120,7 +120,7 @@ jobs: build-proto3-linux64: name: Build Proto3 Linux 64 runs-on: ubuntu-22.04 - if: ${{ env.PROTOBUF_VERSION != '2.6.1' }} + if: env.PROTOBUF_VERSION != '2.6.1' steps: - name: Checkout OSI From ecbca3e15a2fd4dd8d89b36f5b21019ca50c0dba Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 10:48:01 +0100 Subject: [PATCH 53/82] Change if Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 67f303e4b..f0223f65d 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -120,23 +120,26 @@ jobs: build-proto3-linux64: name: Build Proto3 Linux 64 runs-on: ubuntu-22.04 - if: env.PROTOBUF_VERSION != '2.6.1' steps: - name: Checkout OSI + if: env.PROTOBUF_VERSION != '2.6.1' #Has to be in every step, see https://github.com/actions/runner/issues/1189 uses: actions/checkout@v4 with: submodules: true - name: Setup Python + if: env.PROTOBUF_VERSION != '2.6.1' uses: actions/setup-python@v5 with: python-version: '3.8' - name: Install Python Dependencies + if: env.PROTOBUF_VERSION != '2.6.1' run: python -m pip install --upgrade pip setuptools wheel pyyaml - name: Cache Dependencies + if: env.PROTOBUF_VERSION != '2.6.1' id: cache-depends uses: actions/cache@v3 with: @@ -144,48 +147,56 @@ jobs: key: ${{ runner.os }}-v2-depends - name: Download ProtoBuf ${{ env.PROTOBUF_VERSION }} - if: steps.cache-depends.outputs.cache-hit != 'true' + if: steps.cache-depends.outputs.cache-hit != 'true' && env.PROTOBUF_VERSION != '2.6.1' run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${{env.PROTOBUF_VERSION}}/protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz && tar xzvf protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz - name: Download Abseil ${{ env.ABSEIL_VERSION }} - if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' && env.PROTOBUF_VERSION != '2.6.1' run: curl -OL https://github.com/abseil/abseil-cpp/archive/refs/tags/${{env.ABSEIL_VERSION}}.tar.gz && tar xzvf ${{env.ABSEIL_VERSION}}.tar.gz && rm -rf protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp && mv abseil-cpp-${{env.ABSEIL_VERSION}} protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools - if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'true' + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS == 'true' && env.PROTOBUF_VERSION != '2.6.1' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: ./configure CXXFLAGS=-std=c++11 DIST_LANG=cpp --prefix=/usr && make - name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake - if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' + if: steps.cache-depends.outputs.cache-hit != 'true' && env.USE_AUTOTOOLS != 'true' && env.PROTOBUF_VERSION != '2.6.1' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: cmake -DCMAKE_CXX_STANDARD=17 -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF . && cmake --build . --config Release -j 4 - name: Install ProtoBuf ${{ env.PROTOBUF_VERSION }} + if: env.PROTOBUF_VERSION != '2.6.1' working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: sudo make install && sudo ldconfig - name: Prepare C++ Build + if: env.PROTOBUF_VERSION != '2.6.1' run: mkdir build - name: Switch to Proto3 Syntax + if: env.PROTOBUF_VERSION != '2.6.1' run: | bash convert-to-proto3.sh rm *.pb2 - name: Configure C++ Build + if: env.PROTOBUF_VERSION != '2.6.1' working-directory: build run: cmake ${{ env.PROTOBUF_VARIANT =='' && '-DCMAKE_CXX_STANDARD=17' }} .. - name: Build C++ + if: env.PROTOBUF_VERSION != '2.6.1' working-directory: build run: cmake --build . --config Release -j 4 - name: Build Python + if: env.PROTOBUF_VERSION != '2.6.1' run: python setup.py build && python setup.py sdist - name: Install Python + if: env.PROTOBUF_VERSION != '2.6.1' run: python -m pip install . - name: Run Python Tests + if: env.PROTOBUF_VERSION != '2.6.1' run: python -m unittest discover tests From 64dc9f94c0f4fce769c46157c8f028da4092319f Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 10:49:10 +0100 Subject: [PATCH 54/82] Formatting Signed-off-by: ClemensLinnhoff --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 59b447343..4521b162e 100644 --- a/setup.py +++ b/setup.py @@ -120,7 +120,7 @@ def run(self): ["which", GenerateProtobufCommand.find_protoc()], capture_output=True, text=True ).stdout print(protoc_path) -os.environ['PROTOC_PATH'] = protoc_path +os.environ["PROTOC_PATH"] = protoc_path version_print = subprocess.run( [GenerateProtobufCommand.find_protoc(), "--version"], capture_output=True, text=True ).stdout From 54e021c34af316b1bf67fcb0c2f1563e0327b21d Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 10:55:17 +0100 Subject: [PATCH 55/82] Set protoc path at different location Signed-off-by: ClemensLinnhoff --- setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 4521b162e..11639c537 100644 --- a/setup.py +++ b/setup.py @@ -89,6 +89,11 @@ def find_protoc(): """ Generate Protobuf Messages """ def run(self): + protoc_path = subprocess.run( + ["which", self.find_protoc()], capture_output=True, text=True + ).stdout + print(protoc_path) + os.environ["PROTOC_PATH"] = protoc_path pattern = re.compile('^import "osi_') for source in self.osi_files: with open(source) as src_file: @@ -116,11 +121,6 @@ def run(self): pass # Get protobuf version from protoc to ensure protobuf python package and protoc have the same version -protoc_path = subprocess.run( - ["which", GenerateProtobufCommand.find_protoc()], capture_output=True, text=True -).stdout -print(protoc_path) -os.environ["PROTOC_PATH"] = protoc_path version_print = subprocess.run( [GenerateProtobufCommand.find_protoc(), "--version"], capture_output=True, text=True ).stdout From e530410ee2eacd778d3780da6ad199125251febf Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 11:02:08 +0100 Subject: [PATCH 56/82] Set protoc path in ci pipeline Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 +++- setup.py | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index f0223f65d..4b01de27c 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -94,7 +94,9 @@ jobs: run: cmake --build . --config Release -j 4 - name: Build Python - run: python setup.py build && python setup.py sdist + run: | + export PROTOC_PATH=`which protoc` + python setup.py build && python setup.py sdist - name: Install Python run: python -m pip install . diff --git a/setup.py b/setup.py index 11639c537..abf8b2630 100644 --- a/setup.py +++ b/setup.py @@ -89,11 +89,6 @@ def find_protoc(): """ Generate Protobuf Messages """ def run(self): - protoc_path = subprocess.run( - ["which", self.find_protoc()], capture_output=True, text=True - ).stdout - print(protoc_path) - os.environ["PROTOC_PATH"] = protoc_path pattern = re.compile('^import "osi_') for source in self.osi_files: with open(source) as src_file: From ecba368952d0b8e215a08378913ab4030f4a9a1c Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 11:14:34 +0100 Subject: [PATCH 57/82] Check python site Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 4b01de27c..93a2eaf62 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -93,9 +93,11 @@ jobs: working-directory: build run: cmake --build . --config Release -j 4 + - name: Fix Protobuf init # only for 2.6.1, todo: if condition + run: echo "python -m site" + - name: Build Python run: | - export PROTOC_PATH=`which protoc` python setup.py build && python setup.py sdist - name: Install Python From ee869288cd998e49f8fc6079fbcbde20058ed021 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 11:19:00 +0100 Subject: [PATCH 58/82] New trial Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 93a2eaf62..a42b72a26 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -28,6 +28,9 @@ jobs: with: python-version: '3.8' + - name: Fix Protobuf init # only for 2.6.1, todo: if condition + run: python -m site + - name: Install Python Dependencies run: | python -m pip install --upgrade pip @@ -93,9 +96,6 @@ jobs: working-directory: build run: cmake --build . --config Release -j 4 - - name: Fix Protobuf init # only for 2.6.1, todo: if condition - run: echo "python -m site" - - name: Build Python run: | python setup.py build && python setup.py sdist From 8ae2b9c193257f83b400714786a56ae40675ad7f Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 11:22:27 +0100 Subject: [PATCH 59/82] Check site-packages Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index a42b72a26..3a0f93060 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -29,7 +29,8 @@ jobs: python-version: '3.8' - name: Fix Protobuf init # only for 2.6.1, todo: if condition - run: python -m site + working-directory: /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/google/protobuf + run: ls -l - name: Install Python Dependencies run: | From ffb8e4a57d136be1a72df7500bcf5d9780aca207 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 11:25:14 +0100 Subject: [PATCH 60/82] Remove trial code Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 3a0f93060..7b1e5e020 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -28,10 +28,6 @@ jobs: with: python-version: '3.8' - - name: Fix Protobuf init # only for 2.6.1, todo: if condition - working-directory: /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/google/protobuf - run: ls -l - - name: Install Python Dependencies run: | python -m pip install --upgrade pip From c3647be5e8669138b4f23a0ac0ebb5583421d5ce Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 13:36:07 +0100 Subject: [PATCH 61/82] Check site-packages Signed-off-by: ClemensLinnhoff --- setup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.py b/setup.py index abf8b2630..a9baef3a4 100644 --- a/setup.py +++ b/setup.py @@ -89,6 +89,13 @@ def find_protoc(): """ Generate Protobuf Messages """ def run(self): + + command = "python -m site" + test_print = subprocess.run( + command, capture_output=True, text=True, shell=True + ).stdout + print(test_print) + pattern = re.compile('^import "osi_') for source in self.osi_files: with open(source) as src_file: From 5448473fc2f6a7d89c014e8d59970549a9162c35 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 14:22:15 +0100 Subject: [PATCH 62/82] Formatting Signed-off-by: ClemensLinnhoff --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index a9baef3a4..e653605bd 100644 --- a/setup.py +++ b/setup.py @@ -89,7 +89,6 @@ def find_protoc(): """ Generate Protobuf Messages """ def run(self): - command = "python -m site" test_print = subprocess.run( command, capture_output=True, text=True, shell=True From 24be253abc24d49d9ec0185dc80f749087ad7ac2 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 14:27:56 +0100 Subject: [PATCH 63/82] Check site-packages folder Signed-off-by: ClemensLinnhoff --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e653605bd..4ea006d70 100644 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def find_protoc(): """ Generate Protobuf Messages """ def run(self): - command = "python -m site" + command = "cd /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages; ls -l" test_print = subprocess.run( command, capture_output=True, text=True, shell=True ).stdout From 90b099ce26d5f49bbe52e45c5aca9ca2b1345210 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 14:45:38 +0100 Subject: [PATCH 64/82] Protobuf python test Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 7b1e5e020..f94b5b2b9 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -170,6 +170,13 @@ jobs: working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: sudo make install && sudo ldconfig + - name: Test python conversion + run: | + mkdir python-test + protoc --python_out=./python-test osi_version.proto + cd python-test + ls -l + - name: Prepare C++ Build if: env.PROTOBUF_VERSION != '2.6.1' run: mkdir build From 5aa498d32e3b461bb248ee0fdc0af7cfe4138ca1 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 14:47:04 +0100 Subject: [PATCH 65/82] Fix test Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index f94b5b2b9..c747f4b2a 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -68,6 +68,13 @@ jobs: working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: sudo make install && sudo ldconfig + - name: Test python conversion + run: | + mkdir python-test + protoc --python_out=./python-test osi_version.proto + cd python-test + ls -l + - name: Install proto2cpp run: git clone --depth 1 https://github.com/OpenSimulationInterface/proto2cpp.git @@ -170,13 +177,6 @@ jobs: working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: sudo make install && sudo ldconfig - - name: Test python conversion - run: | - mkdir python-test - protoc --python_out=./python-test osi_version.proto - cd python-test - ls -l - - name: Prepare C++ Build if: env.PROTOBUF_VERSION != '2.6.1' run: mkdir build From ff142957665f3e4fbec2b2f5106485305297b033 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 14:50:39 +0100 Subject: [PATCH 66/82] Fix test Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index c747f4b2a..f630a22e4 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -68,13 +68,6 @@ jobs: working-directory: protobuf-${{ env.PROTOBUF_VERSION }} run: sudo make install && sudo ldconfig - - name: Test python conversion - run: | - mkdir python-test - protoc --python_out=./python-test osi_version.proto - cd python-test - ls -l - - name: Install proto2cpp run: git clone --depth 1 https://github.com/OpenSimulationInterface/proto2cpp.git @@ -100,6 +93,13 @@ jobs: working-directory: build run: cmake --build . --config Release -j 4 + - name: Test python conversion + run: | + mkdir python-test + protoc --python_out=./python-test osi_version.proto + cd python-test + ls -l + - name: Build Python run: | python setup.py build && python setup.py sdist From 1216a9120b5270d95515c2f9d902440ec72e1522 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 14:56:36 +0100 Subject: [PATCH 67/82] Fix test Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index f630a22e4..59b137556 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -96,7 +96,7 @@ jobs: - name: Test python conversion run: | mkdir python-test - protoc --python_out=./python-test osi_version.proto + protoc --python_out=./python-test build/osi_version.proto cd python-test ls -l From ea5d18bc978e75264bf0db789e37ac9ebca73a13 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 15:01:03 +0100 Subject: [PATCH 68/82] Try setting environment variable Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 59b137556..67cbac216 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -96,6 +96,7 @@ jobs: - name: Test python conversion run: | mkdir python-test + export PROTOC_PATH=`which protoc` protoc --python_out=./python-test build/osi_version.proto cd python-test ls -l From 35d7d6a3577ef56ba6b43d325e5ab10d2d9c7577 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 15:05:26 +0100 Subject: [PATCH 69/82] Try removing path to description.proto Signed-off-by: ClemensLinnhoff --- osi_version.proto.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osi_version.proto.in b/osi_version.proto.in index 1170d1e58..b4b5b4146 100644 --- a/osi_version.proto.in +++ b/osi_version.proto.in @@ -2,7 +2,7 @@ syntax = "proto2"; option optimize_for = SPEED; -import "google/protobuf/descriptor.proto"; +import "descriptor.proto"; package osi3; From 5d15e307b5131f91acc9367eb7112c63ea899087 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 15:08:57 +0100 Subject: [PATCH 70/82] Revert Signed-off-by: ClemensLinnhoff --- osi_version.proto.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osi_version.proto.in b/osi_version.proto.in index b4b5b4146..1170d1e58 100644 --- a/osi_version.proto.in +++ b/osi_version.proto.in @@ -2,7 +2,7 @@ syntax = "proto2"; option optimize_for = SPEED; -import "descriptor.proto"; +import "google/protobuf/descriptor.proto"; package osi3; From 057691281429a612b442611b88350007d4737ea7 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 15:18:27 +0100 Subject: [PATCH 71/82] Try specifying include path Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 67cbac216..0ee7c6228 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -97,7 +97,7 @@ jobs: run: | mkdir python-test export PROTOC_PATH=`which protoc` - protoc --python_out=./python-test build/osi_version.proto + protoc -I/usr/local/include --python_out=./python-test build/osi_version.proto cd python-test ls -l From e9206e3ca728aa2c93659ff49c9744b62659b4e3 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 15:23:29 +0100 Subject: [PATCH 72/82] Set proto_path Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 0ee7c6228..88c7d8027 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -97,7 +97,7 @@ jobs: run: | mkdir python-test export PROTOC_PATH=`which protoc` - protoc -I/usr/local/include --python_out=./python-test build/osi_version.proto + protoc --proto_path=/usr/local/include --python_out=./python-test ./build/osi_version.proto cd python-test ls -l From 896b10831b75d05426b6e40c598b2f32165be5ab Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 15:28:26 +0100 Subject: [PATCH 73/82] Add second proto_path Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 88c7d8027..06b0dd144 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -97,7 +97,7 @@ jobs: run: | mkdir python-test export PROTOC_PATH=`which protoc` - protoc --proto_path=/usr/local/include --python_out=./python-test ./build/osi_version.proto + protoc --proto_path=/usr/local/include --proto_path=. --python_out=./python-test ./build/osi_version.proto cd python-test ls -l From 49a805dd589aa0d669eca0df9530a20816ce47e8 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 15:36:32 +0100 Subject: [PATCH 74/82] Check protobuf include files Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 06b0dd144..f0a00c3db 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -93,6 +93,15 @@ jobs: working-directory: build run: cmake --build . --config Release -j 4 + - name: Test protobuf files + run: | + cd /usr/local/include + ls -l + cd google + ls -l + cd protobuf + ls -l + - name: Test python conversion run: | mkdir python-test From b1f7944b67e3effd6bf34751807c9a0b43d52054 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 15:45:03 +0100 Subject: [PATCH 75/82] Set protobuf src directory Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index f0a00c3db..d3952540a 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -93,20 +93,11 @@ jobs: working-directory: build run: cmake --build . --config Release -j 4 - - name: Test protobuf files - run: | - cd /usr/local/include - ls -l - cd google - ls -l - cd protobuf - ls -l - - name: Test python conversion run: | mkdir python-test export PROTOC_PATH=`which protoc` - protoc --proto_path=/usr/local/include --proto_path=. --python_out=./python-test ./build/osi_version.proto + protoc --proto_path=protobuf-${{ env.PROTOBUF_VERSION }}/src --proto_path=. --python_out=./python-test ./build/osi_version.proto cd python-test ls -l From 978d068d19d456039e6101bdda286f2a0987ef01 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 15:50:07 +0100 Subject: [PATCH 76/82] Add user/include Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index d3952540a..c9661b20b 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -97,7 +97,7 @@ jobs: run: | mkdir python-test export PROTOC_PATH=`which protoc` - protoc --proto_path=protobuf-${{ env.PROTOBUF_VERSION }}/src --proto_path=. --python_out=./python-test ./build/osi_version.proto + protoc --proto_path=/usr/include --proto_path=. --python_out=./python-test ./build/osi_version.proto cd python-test ls -l From 518e0be5b5fe1afa11170fa295a66eca9fb1822d Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 15:55:23 +0100 Subject: [PATCH 77/82] Set proto_path in setup.py Signed-off-by: ClemensLinnhoff --- setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4ea006d70..bf5c644f5 100644 --- a/setup.py +++ b/setup.py @@ -106,7 +106,13 @@ def run(self): for source in self.osi_files: sys.stdout.write("Protobuf-compiling " + source + "\n") source_path = os.path.join(package_name, source) - subprocess.check_call([self.find_protoc(), "--python_out=.", source_path]) + subprocess.check_call( + [ + self.find_protoc(), + "--proto_path=/usr/include --proto_path=/usr/local/include --proto_path=. --python_out=.", + source_path, + ] + ) build_py.run(self) From 1a361b866cb3644dd30d476b17d71a91e6de5b5b Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 16:02:02 +0100 Subject: [PATCH 78/82] reformat check_call Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 2 +- setup.py | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index c9661b20b..eb523ec02 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -98,7 +98,7 @@ jobs: mkdir python-test export PROTOC_PATH=`which protoc` protoc --proto_path=/usr/include --proto_path=. --python_out=./python-test ./build/osi_version.proto - cd python-test + cd python-test/build ls -l - name: Build Python diff --git a/setup.py b/setup.py index bf5c644f5..278b1a7e3 100644 --- a/setup.py +++ b/setup.py @@ -89,12 +89,6 @@ def find_protoc(): """ Generate Protobuf Messages """ def run(self): - command = "cd /opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages; ls -l" - test_print = subprocess.run( - command, capture_output=True, text=True, shell=True - ).stdout - print(test_print) - pattern = re.compile('^import "osi_') for source in self.osi_files: with open(source) as src_file: @@ -109,7 +103,10 @@ def run(self): subprocess.check_call( [ self.find_protoc(), - "--proto_path=/usr/include --proto_path=/usr/local/include --proto_path=. --python_out=.", + "--proto_path=/usr/include", + "--proto_path=/usr/local/include", + "--proto_path=.", + "--python_out=.", source_path, ] ) From 0f49330aa68dfe42f864b429e2a18f038fa27e32 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Thu, 8 Feb 2024 16:18:00 +0100 Subject: [PATCH 79/82] Remove test steps in pipeline Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index eb523ec02..f0223f65d 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -93,17 +93,8 @@ jobs: working-directory: build run: cmake --build . --config Release -j 4 - - name: Test python conversion - run: | - mkdir python-test - export PROTOC_PATH=`which protoc` - protoc --proto_path=/usr/include --proto_path=. --python_out=./python-test ./build/osi_version.proto - cd python-test/build - ls -l - - name: Build Python - run: | - python setup.py build && python setup.py sdist + run: python setup.py build && python setup.py sdist - name: Install Python run: python -m pip install . From 8830b258a08fa62c4489489e7f9db8ab94b6939a Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Fri, 26 Apr 2024 16:34:27 +0200 Subject: [PATCH 80/82] Fix setup.py file ending Signed-off-by: ClemensLinnhoff --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 710c5e025..5a310a8b3 100644 --- a/setup.py +++ b/setup.py @@ -160,4 +160,4 @@ def run(self): "sdist": CustomSDistCommand, "build_py": CustomBuildPyCommand, }, -) \ No newline at end of file +) From 1305513f2bd162e2c1ef2ba1f7839b53b6b39885 Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Fri, 26 Apr 2024 16:43:50 +0200 Subject: [PATCH 81/82] Fix proto3 piepline Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index 371618261..e6bed171c 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -151,13 +151,11 @@ jobs: steps: - name: Checkout OSI - if: env.PROTOBUF_VERSION != '2.6.1' #Has to be in every step, see https://github.com/actions/runner/issues/1189 uses: actions/checkout@v4 with: submodules: true - name: Setup Python - if: env.PROTOBUF_VERSION != '2.6.1' uses: actions/setup-python@v5 with: python-version: '3.8' @@ -177,7 +175,7 @@ jobs: key: ${{ runner.os }}-v2-depends - name: Download ProtoBuf ${{ env.PROTOBUF_VERSION }} - if: steps.cache-depends.outputs.cache-hit != 'true' && env.PROTOBUF_VERSION != '2.6.1' + if: steps.cache-depends.outputs.cache-hit != 'true' && env.PROTOBUF_VERSION != '2.6.1' #Has to be in every step, see https://github.com/actions/runner/issues/1189 run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${{env.PROTOBUF_VERSION}}/protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz && tar xzvf protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz - name: Download Abseil ${{ env.ABSEIL_VERSION }} @@ -228,11 +226,9 @@ jobs: run: python -m build - name: Install Python - if: env.PROTOBUF_VERSION != '2.6.1' run: python -m pip install . - name: Run Python Tests - if: env.PROTOBUF_VERSION != '2.6.1' run: python -m unittest discover tests publish-python-dist: From e563daf610ac5f1f531b95f508a43651327b902f Mon Sep 17 00:00:00 2001 From: ClemensLinnhoff Date: Fri, 26 Apr 2024 16:46:55 +0200 Subject: [PATCH 82/82] Change protobuf version Signed-off-by: ClemensLinnhoff --- .github/workflows/protobuf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index e6bed171c..f5028ae9f 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -1,8 +1,8 @@ name: ProtoBuf CI Builds env: - PROTOBUF_VERSION: 2.6.1 - PROTOBUF_VARIANT: '' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' + PROTOBUF_VERSION: 3.20.1 + PROTOBUF_VARIANT: '-cpp' # Use '-cpp' between 3.0.0 and 22.0, otherwise use '' USE_AUTOTOOLS: true # set true for PROTOBUF_VERSION <= 22.0 ABSEIL_VERSION: 20230802.1