From dee0c9d1ff851f7ec1774a2e52583210aa4931f2 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Wed, 18 Mar 2026 13:38:33 +0100 Subject: [PATCH 1/6] Add build job using clang --- .github/workflows/alpine-build.yml | 44 +++++++++++++++++++++++++++--- tests/CMakeLists.txt | 2 +- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/.github/workflows/alpine-build.yml b/.github/workflows/alpine-build.yml index 6317d4309..5d358f93b 100644 --- a/.github/workflows/alpine-build.yml +++ b/.github/workflows/alpine-build.yml @@ -10,17 +10,53 @@ on: jobs: alpine-build: + name: Alpine (${{ matrix.compiler }}) runs-on: ubuntu-latest container: alpine:latest - timeout-minutes: 30 + timeout-minutes: 60 + strategy: + matrix: + compiler: [gcc, clang] + include: + - compiler: gcc + cc: gcc + cxx: g++ + packages: build-base + ROBOT_MODEL: 'ur5e' + URSIM_VERSION: '5.24.0' + PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/e-series' + - compiler: clang + cc: clang + cxx: clang++ + ROBOT_MODEL: 'ur5e' + packages: build-base clang + URSIM_VERSION: '5.24.0' + PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/e-series' steps: - name: install dependencies - run: apk add --no-cache build-base cmake linux-headers git + run: apk add --no-cache ${{ matrix.packages }} cmake linux-headers git python3 - uses: actions/checkout@v6 + - name: start ursim + run: | + scripts/start_ursim.sh -m $ROBOT_MODEL -v $URSIM_VERSION -p $PROGRAM_FOLDER -d -f DISABLED + env: + DOCKER_RUN_OPTS: --network ursim_net + ROBOT_MODEL: ${{matrix.env.ROBOT_MODEL}} + URSIM_VERSION: ${{matrix.env.URSIM_VERSION}} + PROGRAM_FOLDER: ${{matrix.env.PROGRAM_FOLDER}} + - name: install-pips + run: pip install pandas lxml - name: configure - run: mkdir build && cd build && cmake .. -DBUILDING_TESTS=1 -DCMAKE_COMPILE_WARNING_AS_ERROR=ON + run: > + mkdir build && cd build && + cmake .. + -DBUILDING_TESTS=1 + -DINTEGRATION_TESTS=1 + -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF + -DCMAKE_C_COMPILER=${{ matrix.cc }} + -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} - name: build - run: cmake --build build --config Debug + run: cmake --build build --config Debug -- -j$(nproc) - name: test run: cd build && ctest --output-on-failure diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 99db15ba2..593f50f13 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -8,7 +8,7 @@ include(FetchContent) FetchContent_Declare( googletest GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG v1.15.2 + GIT_TAG v1.17.0 ) # For Windows: Prevent overriding the parent project's compiler/linker settings set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) From 835aa1dd817337bb398d3c58e1a2c740b1ff9e87 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Thu, 26 Mar 2026 07:50:46 +0100 Subject: [PATCH 2/6] Setup docker --- .github/workflows/alpine-build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/alpine-build.yml b/.github/workflows/alpine-build.yml index 5d358f93b..b0d0f8ee1 100644 --- a/.github/workflows/alpine-build.yml +++ b/.github/workflows/alpine-build.yml @@ -35,10 +35,11 @@ jobs: steps: - name: install dependencies - run: apk add --no-cache ${{ matrix.packages }} cmake linux-headers git python3 + run: apk add --no-cache ${{ matrix.packages }} cmake linux-headers git python3 docker - uses: actions/checkout@v6 - name: start ursim - run: | + run: > + /bin/bash scripts/start_ursim.sh -m $ROBOT_MODEL -v $URSIM_VERSION -p $PROGRAM_FOLDER -d -f DISABLED env: DOCKER_RUN_OPTS: --network ursim_net From dabc7a912c2dd3789ebcf4137e6f1346ddf49ff9 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Thu, 26 Mar 2026 07:55:39 +0100 Subject: [PATCH 3/6] Move clang job to ubuntu-based build --- .github/workflows/alpine-build.yml | 44 ++++-------------------------- .github/workflows/ci.yml | 19 +++++++++++++ 2 files changed, 25 insertions(+), 38 deletions(-) diff --git a/.github/workflows/alpine-build.yml b/.github/workflows/alpine-build.yml index b0d0f8ee1..633f966c2 100644 --- a/.github/workflows/alpine-build.yml +++ b/.github/workflows/alpine-build.yml @@ -10,54 +10,22 @@ on: jobs: alpine-build: - name: Alpine (${{ matrix.compiler }}) runs-on: ubuntu-latest container: alpine:latest - timeout-minutes: 60 - strategy: - matrix: - compiler: [gcc, clang] - include: - - compiler: gcc - cc: gcc - cxx: g++ - packages: build-base - ROBOT_MODEL: 'ur5e' - URSIM_VERSION: '5.24.0' - PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/e-series' - - compiler: clang - cc: clang - cxx: clang++ - ROBOT_MODEL: 'ur5e' - packages: build-base clang - URSIM_VERSION: '5.24.0' - PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/e-series' + timeout-minutes: 30 steps: - name: install dependencies - run: apk add --no-cache ${{ matrix.packages }} cmake linux-headers git python3 docker + run: apk add --no-cache build-base cmake linux-headers git - uses: actions/checkout@v6 - - name: start ursim - run: > - /bin/bash - scripts/start_ursim.sh -m $ROBOT_MODEL -v $URSIM_VERSION -p $PROGRAM_FOLDER -d -f DISABLED - env: - DOCKER_RUN_OPTS: --network ursim_net - ROBOT_MODEL: ${{matrix.env.ROBOT_MODEL}} - URSIM_VERSION: ${{matrix.env.URSIM_VERSION}} - PROGRAM_FOLDER: ${{matrix.env.PROGRAM_FOLDER}} - - name: install-pips - run: pip install pandas lxml - name: configure run: > - mkdir build && cd build && + mkdir build && + cd build && cmake .. -DBUILDING_TESTS=1 - -DINTEGRATION_TESTS=1 - -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF - -DCMAKE_C_COMPILER=${{ matrix.cc }} - -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} + -DCMAKE_COMPILE_WARNING_AS_ERROR=ON - name: build - run: cmake --build build --config Debug -- -j$(nproc) + run: cmake --build build --config Debug - name: test run: cd build && ctest --output-on-failure diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d6486cee..b30767160 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,21 +20,38 @@ jobs: - ROBOT_MODEL: 'ur5' URSIM_VERSION: '3.14.3' PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/cb3' + cc: gcc + cxx: g++ - ROBOT_MODEL: 'ur5e' URSIM_VERSION: '5.9.4' PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/e-series' + cc: gcc + cxx: g++ - ROBOT_MODEL: 'ur20' URSIM_VERSION: 'latest' PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/e-series' + cc: gcc + cxx: g++ + - ROBOT_MODEL: 'ur16e' + URSIM_VERSION: '5.12.6' + PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/e-series' + cc: clang + cxx: clang++ - ROBOT_MODEL: 'ur5e' URSIM_VERSION: '10.7.0' PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/polyscopex' + cc: gcc + cxx: g++ - ROBOT_MODEL: 'ur5e' URSIM_VERSION: '10.11.0' PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/polyscopex' + cc: gcc + cxx: g++ - ROBOT_MODEL: 'ur5e' URSIM_VERSION: '10.12.0' PROGRAM_FOLDER: 'tests/resources/dockerursim/programs/polyscopex' + cc: gcc + cxx: g++ steps: - uses: actions/checkout@v6 @@ -67,6 +84,8 @@ jobs: -DWITH_ASAN=ON -DPRIMARY_CLIENT_STRICT_PARSING=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON + -DCMAKE_C_COMPILER=${{ matrix.env.cc }} + -DCMAKE_CXX_COMPILER=${{ matrix.env.cxx }} env: CXXFLAGS: -g -O2 -fprofile-arcs -ftest-coverage CFLAGS: -g -O2 -fprofile-arcs -ftest-coverage From 6ce8c5d3a5d17e4753226da00f6e38fba4b78339 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Thu, 26 Mar 2026 08:59:11 +0100 Subject: [PATCH 4/6] Remove virtual keyword from non-virtual class --- tests/fake_rtde_server.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fake_rtde_server.h b/tests/fake_rtde_server.h index b34eec510..a621f8331 100644 --- a/tests/fake_rtde_server.h +++ b/tests/fake_rtde_server.h @@ -33,11 +33,11 @@ class RTDEServer std::thread send_thread_; - virtual void connectionCallback(const socket_t filedescriptor); + void connectionCallback(const socket_t filedescriptor); - virtual void disconnectionCallback(const socket_t filedescriptor); + void disconnectionCallback(const socket_t filedescriptor); - virtual void messageCallback(const socket_t filedescriptor, char* buffer, int nbytesrecv); + void messageCallback(const socket_t filedescriptor, char* buffer, int nbytesrecv); void sendDataLoop(); std::atomic send_loop_running_; From 3d7e5009a60e8ba0d41476c4176cad33d14fcaf0 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Thu, 26 Mar 2026 09:35:12 +0100 Subject: [PATCH 5/6] Ignore deprecation warnings on test for deprecated construction --- tests/test_deprecated_ur_driver_construction.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_deprecated_ur_driver_construction.cpp b/tests/test_deprecated_ur_driver_construction.cpp index 41a29e519..31c7c62ba 100644 --- a/tests/test_deprecated_ur_driver_construction.cpp +++ b/tests/test_deprecated_ur_driver_construction.cpp @@ -33,6 +33,14 @@ #include #include "ur_client_library/ur/ur_driver.h" +// This file adds tests for deprecated constructors of UrDriver. To avoid a compiler warning in CI +// we suppress the warning inside this file / compilation unit. +#ifdef _MSC_VER +# pragma warning(disable : 4996) +#else +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + const std::string SCRIPT_FILE = "../resources/external_control.urscript"; const std::string OUTPUT_RECIPE = "resources/rtde_output_recipe.txt"; const std::string INPUT_RECIPE = "resources/rtde_input_recipe.txt"; From 90eb8a86a387de4bc358c24469db385ebc89ed2b Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Thu, 26 Mar 2026 09:37:31 +0100 Subject: [PATCH 6/6] Add compiler to job name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b30767160..033b80cf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: build: timeout-minutes: 60 runs-on: ubuntu-latest - name: build (${{matrix.env.URSIM_VERSION}}-${{matrix.env.ROBOT_MODEL}}) + name: build ${{matrix.env.cc}}(${{matrix.env.URSIM_VERSION}}-${{matrix.env.ROBOT_MODEL}}) strategy: fail-fast: false matrix: