diff --git a/.github/workflows/alpine-build.yml b/.github/workflows/alpine-build.yml index 6317d4309..633f966c2 100644 --- a/.github/workflows/alpine-build.yml +++ b/.github/workflows/alpine-build.yml @@ -19,7 +19,12 @@ jobs: run: apk add --no-cache build-base cmake linux-headers git - uses: actions/checkout@v6 - 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 + -DCMAKE_COMPILE_WARNING_AS_ERROR=ON - name: build run: cmake --build build --config Debug - name: test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d6486cee..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: @@ -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 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) 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_; 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";