From 685eb5f576a6b0bf94ca6e78e8a065580950ec3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikkel=20H=C3=B8jlund=20Larsen?= Date: Thu, 10 Oct 2024 15:01:24 +0200 Subject: [PATCH 1/3] working on it --- CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 18fa220..a476676 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,6 +65,20 @@ target_compile_features(sw_protobuf PUBLIC cxx_std_17) target_link_libraries(sw_protobuf PUBLIC sw_protobuf_abseil sw_protobuf_utf8_range) target_include_directories(sw_protobuf PUBLIC ${STEINWURF_RESOLVE}/protobuf-source/src) +message(STATUS "STEINWURF_PROTOC: ${STEINWURF_PROTOC}") + +if (STEINWURF_PROTOC) + file(GLOB_RECURSE sw_protobuf_protoc_sources ${STEINWURF_RESOLVE}/protobuf-source/src/google/protobuf/compiler/*.cc) + list(FILTER sw_protobuf_protoc_sources EXCLUDE REGEX .*src/google/protobuf\/compiler\/.*test.*) + list(FILTER sw_protobuf_protoc_sources EXCLUDE REGEX .*src/google/protobuf\/compiler\/.*mock.*) + list(FILTER sw_protobuf_protoc_sources EXCLUDE REGEX .*src/google/protobuf\/compiler\/.*fake.*) + list(FILTER sw_protobuf_protoc_sources EXCLUDE REGEX .*src/google/protobuf\/compiler\/allowlists\/.*_test.*) + + add_executable(protoc ${sw_protobuf_protoc_sources}) + target_link_libraries(protoc PRIVATE sw_protobuf) + target_include_directories(protoc PRIVATE ${STEINWURF_RESOLVE}/protobuf-source/src) + target_compile_features(protoc PRIVATE cxx_std_17) +endif () # Ignore -Wattribute warnings for GCC and Clang if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") target_compile_options(sw_protobuf PRIVATE -Wno-attributes) From c9aef2ee78c11b1c8a5415ba6a5bfa8b83790769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikkel=20H=C3=B8jlund=20Larsen?= Date: Fri, 11 Oct 2024 11:32:31 +0200 Subject: [PATCH 2/3] working on it --- .github/workflows/linux_mkspecs.yml | 54 ++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux_mkspecs.yml b/.github/workflows/linux_mkspecs.yml index 7c9d4ab..997bee3 100644 --- a/.github/workflows/linux_mkspecs.yml +++ b/.github/workflows/linux_mkspecs.yml @@ -12,10 +12,56 @@ name: Linux C++ make-specs - master pull_request: jobs: - Linux-mkspecs: - uses: steinwurf/linux-mkspecs-action/.github/workflows/action.yml@7.0.0 - with: - extra_resolve_options: ${{ github.event.inputs.extra_resolve_options }} + docker_builds: + timeout-minutes: 45 + strategy: + fail-fast: false + matrix: + config: + - container: ghcr.io/steinwurf/ubuntu-lts-2404:1.0.0 + CXX: g++ + name: GCC Latest + cxxflags: "" + - container: ghcr.io/steinwurf/ubuntu-lts-2404:1.0.0 + name: Clang Latest + CXX: clang++ + cxxflags: "" + - container: ghcr.io/steinwurf/ubuntu-lts-2004:1.0.0 + name: GCC Oldest + CXX: g++ + cxxflags: "" + - container: ghcr.io/steinwurf/ubuntu-lts-2004:1.0.0 + name: Clang Oldest + CXX: clang++ + cxxflags: "" + runs-on: + - self-hosted + - docker + - builder + name: ${{ matrix.config.name }} + container: + image: ${{ matrix.config.container }} + options: --user 0:0 --privileged --ulimit core=-1 + volumes: + - /home/buildbot/.ssh:/root/.ssh + steps: + - name: Checkout source code + uses: actions/checkout@v4 + - name: Waf Configure + env: + EXTRA_RESOLVE_OPTIONS: ${{ inputs.extra_resolve_options }} + CXX: ${{ matrix.config.CXX }} + uses: nick-fields/retry@v3 + with: + max_attempts: 3 + timeout_minutes: 15 + command: python3 waf configure --git_protocol=git@ ${{ matrix.config.cxxflags }} ${{ env.EXTRA_RESOLVE_OPTIONS }} + - name: Waf Build + run: | + echo "::add-matcher::.github/gcc-problem-matcher.json" + python3 waf + - name: Waf Test + run: ${{ matrix.config.env }} python3 waf --run_tests concurrency: group: ${{ github.workflow }}-${{ github.ref || github.run_id }} cancel-in-progress: true From 875f47ad15a7a77d42c75d004c238632b0a1076b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikkel=20H=C3=B8jlund=20Larsen?= Date: Fri, 11 Oct 2024 12:24:15 +0200 Subject: [PATCH 3/3] working on it --- NEWS.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.rst b/NEWS.rst index 989a5d5..f31fb10 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -6,7 +6,7 @@ every change, see the Git log. Latest ------ -* tbd +* Patch: Added the `protoc` executable target to CMakeLists.txt. 2.0.10 ------