From adea33b0271016bdf8eb5e9137d735b053ea4bc9 Mon Sep 17 00:00:00 2001 From: "Vladimir E. Koltunov" Date: Sun, 15 Jun 2025 08:03:11 +0300 Subject: [PATCH 01/11] Create main.yml --- .github/workflows/main.yml | 64 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..56704b3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,64 @@ +# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml +name: CMake on multiple platforms + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. + fail-fast: false + + # Set up a matrix to run the following 3 configurations: + # 1. + # 2. + # + # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. + matrix: + os: [ubuntu-latest] + build_type: [Release] + c_compiler: [gcc, clang] + include: + - os: ubuntu-latest + c_compiler: gcc + cpp_compiler: g++ + - os: ubuntu-latest + c_compiler: clang + cpp_compiler: clang++ + + steps: + - uses: actions/checkout@v4 + + - name: Set reusable strings + # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: > + cmake -B ${{ steps.strings.outputs.build-output-dir }} + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -S ${{ github.workspace }} + + - name: Build + # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} + + - name: Test + working-directory: ${{ steps.strings.outputs.build-output-dir }} + # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest --build-config ${{ matrix.build_type }} From 7100b99caa92ff7e6d5eae5f828fc9d8de13e467 Mon Sep 17 00:00:00 2001 From: "Vladimir E. Koltunov" Date: Sun, 15 Jun 2025 08:05:37 +0300 Subject: [PATCH 02/11] Update main.yml --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 56704b3..f3a6e57 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,6 +47,7 @@ jobs: # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > + cd lcloud-sql-discovery-cpp && cmake -B ${{ steps.strings.outputs.build-output-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} From 1bf938128b965bb44cea007489de738376e63209 Mon Sep 17 00:00:00 2001 From: "Vladimir E. Koltunov" Date: Sun, 15 Jun 2025 08:09:09 +0300 Subject: [PATCH 03/11] Update main.yml --- .github/workflows/main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f3a6e57..bc6f846 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,18 +41,17 @@ jobs: id: strings shell: bash run: | - echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + echo "build-output-dir=${{ github.workspace }}/lcloud-sql-discovery-cpp/build" >> "$GITHUB_OUTPUT" - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > - cd lcloud-sql-discovery-cpp && cmake -B ${{ steps.strings.outputs.build-output-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - -S ${{ github.workspace }} + -S ${{ github.workspace }}/lcloud-sql-discovery-cpp - name: Build # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). From 98787f1474379c86b887c4bd18d190d74dcc76f0 Mon Sep 17 00:00:00 2001 From: "Vladimir E. Koltunov" Date: Sun, 15 Jun 2025 08:15:27 +0300 Subject: [PATCH 04/11] Delete .github/workflows/cmake-multi-platform.yml --- .github/workflows/cmake-multi-platform.yml | 64 ---------------------- 1 file changed, 64 deletions(-) delete mode 100644 .github/workflows/cmake-multi-platform.yml diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml deleted file mode 100644 index 56704b3..0000000 --- a/.github/workflows/cmake-multi-platform.yml +++ /dev/null @@ -1,64 +0,0 @@ -# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. -# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml -name: CMake on multiple platforms - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - runs-on: ${{ matrix.os }} - - strategy: - # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. - fail-fast: false - - # Set up a matrix to run the following 3 configurations: - # 1. - # 2. - # - # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. - matrix: - os: [ubuntu-latest] - build_type: [Release] - c_compiler: [gcc, clang] - include: - - os: ubuntu-latest - c_compiler: gcc - cpp_compiler: g++ - - os: ubuntu-latest - c_compiler: clang - cpp_compiler: clang++ - - steps: - - uses: actions/checkout@v4 - - - name: Set reusable strings - # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. - id: strings - shell: bash - run: | - echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - - - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: > - cmake -B ${{ steps.strings.outputs.build-output-dir }} - -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} - -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - -S ${{ github.workspace }} - - - name: Build - # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). - run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} - - - name: Test - working-directory: ${{ steps.strings.outputs.build-output-dir }} - # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest --build-config ${{ matrix.build_type }} From 7cdb036520922b189fa74cfe8d7433c435830779 Mon Sep 17 00:00:00 2001 From: "vladimir.koltunov" Date: Sun, 15 Jun 2025 08:23:05 +0300 Subject: [PATCH 05/11] revert --- lcloud-sql-discovery-cpp/libpqxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcloud-sql-discovery-cpp/libpqxx b/lcloud-sql-discovery-cpp/libpqxx index 9dd7110..98ea79a 160000 --- a/lcloud-sql-discovery-cpp/libpqxx +++ b/lcloud-sql-discovery-cpp/libpqxx @@ -1 +1 @@ -Subproject commit 9dd71102e1f3e10b0f14eed253873ee6ce2a4880 +Subproject commit 98ea79a03eaa0f0185dafd4135930a12ecbb9ec4 From 75b714352d7b5ac1867f5a943a330cd2b48d61bf Mon Sep 17 00:00:00 2001 From: "vladimir.koltunov" Date: Sun, 15 Jun 2025 08:33:23 +0300 Subject: [PATCH 06/11] apt --- .github/workflows/cpp-main.yml | 91 ++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 64 ------------------------ 2 files changed, 91 insertions(+), 64 deletions(-) create mode 100644 .github/workflows/cpp-main.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/cpp-main.yml b/.github/workflows/cpp-main.yml new file mode 100644 index 0000000..c7d6ade --- /dev/null +++ b/.github/workflows/cpp-main.yml @@ -0,0 +1,91 @@ +# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml +name: CMake on multiple platforms + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. + fail-fast: false + + # Set up a matrix to run the following 3 configurations: + # 1. + # 2. + # + # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. + matrix: + os: [ ubuntu-latest ] + build_type: [ Release ] + c_compiler: [ gcc, clang ] + include: + - os: ubuntu-latest + c_compiler: gcc + cpp_compiler: g++ + - os: ubuntu-latest + c_compiler: clang + cpp_compiler: clang++ + + steps: + - uses: actions/checkout@v4 + + - name: Set reusable strings + # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/lcloud-sql-discovery-cpp/build" >> "$GITHUB_OUTPUT" + + - name: APT + run: | + apt-get update && apt-get install -y cmake gcc g++ libpq-dev lcov gcovr + + - name: RxCpp + working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/RxCpp/build + run: | + cmake -G"Unix Makefiles" -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \ + -DCMAKE_BUILD_TYPE=Release -DRXCPP_DISABLE_TESTS_AND_EXAMPLES=1 ../projects/CMake + make -j4 + make install + + - name: libpqxx + working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/libpqxx/build + run: | + cmake -G"Unix Makefiles" -DCMAKE_C_FLAGS="-DPQXX_PQ_STATIC=1" -DCMAKE_CXX_FLAGS="-DPQXX_PQ_STATIC=1" \ + -DSKIP_BUILD_TEST=1 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ .. + make -j4 + make install + + - name: googletest + working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/googletest/build + run: | + cmake .. + make -j4 + make install + + - name: Configure CMake + working-directory: ${{ steps.strings.outputs.build-output-dir }} + run: > + cmake + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + .. + + - name: Build + # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} + + - name: Test + working-directory: ${{ steps.strings.outputs.build-output-dir }} + # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest --build-config ${{ matrix.build_type }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index bc6f846..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,64 +0,0 @@ -# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. -# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml -name: CMake on multiple platforms - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - runs-on: ${{ matrix.os }} - - strategy: - # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. - fail-fast: false - - # Set up a matrix to run the following 3 configurations: - # 1. - # 2. - # - # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. - matrix: - os: [ubuntu-latest] - build_type: [Release] - c_compiler: [gcc, clang] - include: - - os: ubuntu-latest - c_compiler: gcc - cpp_compiler: g++ - - os: ubuntu-latest - c_compiler: clang - cpp_compiler: clang++ - - steps: - - uses: actions/checkout@v4 - - - name: Set reusable strings - # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. - id: strings - shell: bash - run: | - echo "build-output-dir=${{ github.workspace }}/lcloud-sql-discovery-cpp/build" >> "$GITHUB_OUTPUT" - - - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: > - cmake -B ${{ steps.strings.outputs.build-output-dir }} - -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} - -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - -S ${{ github.workspace }}/lcloud-sql-discovery-cpp - - - name: Build - # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). - run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} - - - name: Test - working-directory: ${{ steps.strings.outputs.build-output-dir }} - # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest --build-config ${{ matrix.build_type }} From ff0f3895a16b8d65cec60e0dc15f54b63e0b7f90 Mon Sep 17 00:00:00 2001 From: "vladimir.koltunov" Date: Sun, 15 Jun 2025 08:34:55 +0300 Subject: [PATCH 07/11] sudo --- .github/workflows/cpp-main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cpp-main.yml b/.github/workflows/cpp-main.yml index c7d6ade..f229a7f 100644 --- a/.github/workflows/cpp-main.yml +++ b/.github/workflows/cpp-main.yml @@ -45,7 +45,8 @@ jobs: - name: APT run: | - apt-get update && apt-get install -y cmake gcc g++ libpq-dev lcov gcovr + sudo apt-get update + sudo apt-get install -y cmake gcc g++ libpq-dev lcov gcovr - name: RxCpp working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/RxCpp/build @@ -54,7 +55,7 @@ jobs: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \ -DCMAKE_BUILD_TYPE=Release -DRXCPP_DISABLE_TESTS_AND_EXAMPLES=1 ../projects/CMake make -j4 - make install + sudo make install - name: libpqxx working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/libpqxx/build @@ -62,14 +63,14 @@ jobs: cmake -G"Unix Makefiles" -DCMAKE_C_FLAGS="-DPQXX_PQ_STATIC=1" -DCMAKE_CXX_FLAGS="-DPQXX_PQ_STATIC=1" \ -DSKIP_BUILD_TEST=1 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ .. make -j4 - make install + sudo make install - name: googletest working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/googletest/build run: | cmake .. make -j4 - make install + sudo make install - name: Configure CMake working-directory: ${{ steps.strings.outputs.build-output-dir }} From 6494e38b7f2e21f28b52e811c1ae1000f92b5773 Mon Sep 17 00:00:00 2001 From: "vladimir.koltunov" Date: Sun, 15 Jun 2025 08:43:43 +0300 Subject: [PATCH 08/11] layout --- .github/workflows/cpp-main.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cpp-main.yml b/.github/workflows/cpp-main.yml index f229a7f..895858d 100644 --- a/.github/workflows/cpp-main.yml +++ b/.github/workflows/cpp-main.yml @@ -35,6 +35,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: true - name: Set reusable strings # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. @@ -49,33 +51,41 @@ jobs: sudo apt-get install -y cmake gcc g++ libpq-dev lcov gcovr - name: RxCpp - working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/RxCpp/build + working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/RxCpp run: | - cmake -G"Unix Makefiles" -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ - -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \ - -DCMAKE_BUILD_TYPE=Release -DRXCPP_DISABLE_TESTS_AND_EXAMPLES=1 ../projects/CMake + mkdir build + cd build + cmake -G"Unix Makefiles" \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \ + -DCMAKE_BUILD_TYPE=Release -DRXCPP_DISABLE_TESTS_AND_EXAMPLES=1 ../projects/CMake make -j4 sudo make install - name: libpqxx - working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/libpqxx/build + working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/libpqxx run: | + mkdir build + cd build cmake -G"Unix Makefiles" -DCMAKE_C_FLAGS="-DPQXX_PQ_STATIC=1" -DCMAKE_CXX_FLAGS="-DPQXX_PQ_STATIC=1" \ -DSKIP_BUILD_TEST=1 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ .. make -j4 sudo make install - name: googletest - working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/googletest/build + working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/googletest run: | + mkdir build + cd build cmake .. make -j4 sudo make install - name: Configure CMake - working-directory: ${{ steps.strings.outputs.build-output-dir }} + working-directory: ${{ github.workspace }}/lcloud-sql-discovery-cpp/googletest run: > - cmake + cmake -B ${{ steps.strings.outputs.build-output-dir }} + -S ${{ github.workspace }}/lcloud-sql-discovery-cpp -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} From 160a0823132a5acf04012f80be9f81a39d8ebcf8 Mon Sep 17 00:00:00 2001 From: "vladimir.koltunov" Date: Sun, 15 Jun 2025 08:51:24 +0300 Subject: [PATCH 09/11] gtest --- .github/workflows/cpp-main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cpp-main.yml b/.github/workflows/cpp-main.yml index 895858d..85f2467 100644 --- a/.github/workflows/cpp-main.yml +++ b/.github/workflows/cpp-main.yml @@ -24,7 +24,8 @@ jobs: matrix: os: [ ubuntu-latest ] build_type: [ Release ] - c_compiler: [ gcc, clang ] + # c_compiler: [ gcc, clang ] + c_compiler: [ gcc ] include: - os: ubuntu-latest c_compiler: gcc @@ -97,6 +98,6 @@ jobs: - name: Test working-directory: ${{ steps.strings.outputs.build-output-dir }} - # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest --build-config ${{ matrix.build_type }} + run: | + cd ./test + ./test/unit_tests --gtest_color=no \ No newline at end of file From b41204df421a6717690af388021db8dceb75c07d Mon Sep 17 00:00:00 2001 From: "vladimir.koltunov" Date: Sun, 15 Jun 2025 08:56:03 +0300 Subject: [PATCH 10/11] -clang --- .github/workflows/cpp-main.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cpp-main.yml b/.github/workflows/cpp-main.yml index 85f2467..834edb7 100644 --- a/.github/workflows/cpp-main.yml +++ b/.github/workflows/cpp-main.yml @@ -24,15 +24,11 @@ jobs: matrix: os: [ ubuntu-latest ] build_type: [ Release ] - # c_compiler: [ gcc, clang ] c_compiler: [ gcc ] include: - os: ubuntu-latest c_compiler: gcc cpp_compiler: g++ - - os: ubuntu-latest - c_compiler: clang - cpp_compiler: clang++ steps: - uses: actions/checkout@v4 @@ -57,6 +53,8 @@ jobs: mkdir build cd build cmake -G"Unix Makefiles" \ + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \ + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \ -DCMAKE_BUILD_TYPE=Release -DRXCPP_DISABLE_TESTS_AND_EXAMPLES=1 ../projects/CMake @@ -68,8 +66,12 @@ jobs: run: | mkdir build cd build - cmake -G"Unix Makefiles" -DCMAKE_C_FLAGS="-DPQXX_PQ_STATIC=1" -DCMAKE_CXX_FLAGS="-DPQXX_PQ_STATIC=1" \ - -DSKIP_BUILD_TEST=1 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ .. + cmake -G"Unix Makefiles" \ + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \ + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \ + -DCMAKE_C_FLAGS="-DPQXX_PQ_STATIC=1" \ + -DCMAKE_CXX_FLAGS="-DPQXX_PQ_STATIC=1" \ + -DSKIP_BUILD_TEST=1 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ .. make -j4 sudo make install @@ -78,7 +80,10 @@ jobs: run: | mkdir build cd build - cmake .. + cmake \ + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \ + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \ + .. make -j4 sudo make install @@ -100,4 +105,4 @@ jobs: working-directory: ${{ steps.strings.outputs.build-output-dir }} run: | cd ./test - ./test/unit_tests --gtest_color=no \ No newline at end of file + ./unit_tests --gtest_color=no \ No newline at end of file From ab0fa0668d18970ceb643aa49816379ada8139f2 Mon Sep 17 00:00:00 2001 From: "vladimir.koltunov" Date: Sun, 15 Jun 2025 08:58:08 +0300 Subject: [PATCH 11/11] join --- .github/workflows/cpp-main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cpp-main.yml b/.github/workflows/cpp-main.yml index 834edb7..3a1d104 100644 --- a/.github/workflows/cpp-main.yml +++ b/.github/workflows/cpp-main.yml @@ -54,7 +54,7 @@ jobs: cd build cmake -G"Unix Makefiles" \ -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \ - -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \ -DCMAKE_BUILD_TYPE=Release -DRXCPP_DISABLE_TESTS_AND_EXAMPLES=1 ../projects/CMake