From b896d6314f422f66ccbbb342e639e4f73394cea9 Mon Sep 17 00:00:00 2001 From: 4c3y <69460051+4c3y@users.noreply.github.com> Date: Mon, 27 May 2024 12:59:44 +0200 Subject: [PATCH 1/8] Update to checkout v4, added gcc 12 --- .github/workflows/cpp_ubuntu20_04.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cpp_ubuntu20_04.yml b/.github/workflows/cpp_ubuntu20_04.yml index cf21535..47e5d0d 100644 --- a/.github/workflows/cpp_ubuntu20_04.yml +++ b/.github/workflows/cpp_ubuntu20_04.yml @@ -14,12 +14,12 @@ jobs: fail-fast: false matrix: rosdistro: ['noetic'] - gcc: ['8', '9', '10', '11'] + gcc: ['8', '9', '10', '11', '12'] cxx: ['11', '14', '17'] container: ros:${{ matrix.rosdistro }}-ros-base-focal name: ROS ${{ matrix.rosdistro }} - GCC ${{ matrix.gcc }} - C++${{ matrix.cxx }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 name: Checkout lpp with: repository: ethz-asl/lpp From abae6956a2f89d6d5548cc63be58a1fbe1fd3ddf Mon Sep 17 00:00:00 2001 From: 4c3y <69460051+4c3y@users.noreply.github.com> Date: Mon, 27 May 2024 16:26:31 +0200 Subject: [PATCH 2/8] Add repository for newer gcc versions --- .github/workflows/cpp_ubuntu20_04.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cpp_ubuntu20_04.yml b/.github/workflows/cpp_ubuntu20_04.yml index 47e5d0d..8939296 100644 --- a/.github/workflows/cpp_ubuntu20_04.yml +++ b/.github/workflows/cpp_ubuntu20_04.yml @@ -29,6 +29,10 @@ jobs: - name: Install newest git version run: sudo apt update && sudo apt-get install -y software-properties-common && sudo add-apt-repository -y ppa:git-core/ppa && sudo apt-get update && sudo apt-get install -y git + - name: Add testing repository + run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update + if: ${{ matrix.gcc }} == '12' + - name: Install GCC version ${{ matrix.gcc }} run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.gcc }} From 7ce2b0428fabe30e67de40b87b7e59453124ffa4 Mon Sep 17 00:00:00 2001 From: 4c3y <69460051+4c3y@users.noreply.github.com> Date: Wed, 29 May 2024 12:59:50 +0200 Subject: [PATCH 3/8] Add gcc 13 and remove 12 as it is not available in ubuntu test repository --- .github/workflows/cpp_ubuntu20_04.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cpp_ubuntu20_04.yml b/.github/workflows/cpp_ubuntu20_04.yml index 8939296..3c5ad9c 100644 --- a/.github/workflows/cpp_ubuntu20_04.yml +++ b/.github/workflows/cpp_ubuntu20_04.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: rosdistro: ['noetic'] - gcc: ['8', '9', '10', '11', '12'] + gcc: ['8', '9', '10', '11', '13'] cxx: ['11', '14', '17'] container: ros:${{ matrix.rosdistro }}-ros-base-focal name: ROS ${{ matrix.rosdistro }} - GCC ${{ matrix.gcc }} - C++${{ matrix.cxx }} From e5410897dbcdae4f12abdb6dd4e1ae72908f474b Mon Sep 17 00:00:00 2001 From: 4c3y <69460051+4c3y@users.noreply.github.com> Date: Wed, 29 May 2024 13:11:17 +0200 Subject: [PATCH 4/8] Add C++20 Support --- .github/workflows/cpp_ubuntu20_04.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/cpp_ubuntu20_04.yml b/.github/workflows/cpp_ubuntu20_04.yml index 3c5ad9c..76be424 100644 --- a/.github/workflows/cpp_ubuntu20_04.yml +++ b/.github/workflows/cpp_ubuntu20_04.yml @@ -15,7 +15,7 @@ jobs: matrix: rosdistro: ['noetic'] gcc: ['8', '9', '10', '11', '13'] - cxx: ['11', '14', '17'] + cxx: ['11', '14', '17', '20'] container: ros:${{ matrix.rosdistro }}-ros-base-focal name: ROS ${{ matrix.rosdistro }} - GCC ${{ matrix.gcc }} - C++${{ matrix.cxx }} steps: @@ -29,10 +29,6 @@ jobs: - name: Install newest git version run: sudo apt update && sudo apt-get install -y software-properties-common && sudo add-apt-repository -y ppa:git-core/ppa && sudo apt-get update && sudo apt-get install -y git - - name: Add testing repository - run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update - if: ${{ matrix.gcc }} == '12' - - name: Install GCC version ${{ matrix.gcc }} run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.gcc }} From 169016e36694aef23710fe6b62a36d0bcae7d622 Mon Sep 17 00:00:00 2001 From: 4c3y <69460051+4c3y@users.noreply.github.com> Date: Wed, 29 May 2024 13:43:45 +0200 Subject: [PATCH 5/8] Verify gcc compiler version --- .github/workflows/cpp_ubuntu20_04.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cpp_ubuntu20_04.yml b/.github/workflows/cpp_ubuntu20_04.yml index 76be424..2cd33e1 100644 --- a/.github/workflows/cpp_ubuntu20_04.yml +++ b/.github/workflows/cpp_ubuntu20_04.yml @@ -30,7 +30,7 @@ jobs: run: sudo apt update && sudo apt-get install -y software-properties-common && sudo add-apt-repository -y ppa:git-core/ppa && sudo apt-get update && sudo apt-get install -y git - name: Install GCC version ${{ matrix.gcc }} - run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.gcc }} + run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.gcc }} && gcc --version - name: Install catkin tools run: sudo apt install -y python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential python3-catkin-tools @@ -39,7 +39,7 @@ jobs: run: sudo apt install -y libgoogle-glog-dev - name: Build lpp - run: source /opt/ros/${{ matrix.rosdistro }}/setup.bash && catkin build -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DLPP_BUILD_TESTS=1 lpp && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash + run: source /opt/ros/${{ matrix.rosdistro }}/setup.bash && catkin build -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/gcc -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DLPP_BUILD_TESTS=1 lpp && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash working-directory: catkin_ws shell: bash From 297cb99a33ab4db0b3cfcada7e868ac45599a1e7 Mon Sep 17 00:00:00 2001 From: 4c3y <69460051+4c3y@users.noreply.github.com> Date: Wed, 29 May 2024 13:47:59 +0200 Subject: [PATCH 6/8] Fix CMAKE_CXX_COMPILER --- .github/workflows/cpp_ubuntu20_04.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cpp_ubuntu20_04.yml b/.github/workflows/cpp_ubuntu20_04.yml index 2cd33e1..01f0b69 100644 --- a/.github/workflows/cpp_ubuntu20_04.yml +++ b/.github/workflows/cpp_ubuntu20_04.yml @@ -39,7 +39,7 @@ jobs: run: sudo apt install -y libgoogle-glog-dev - name: Build lpp - run: source /opt/ros/${{ matrix.rosdistro }}/setup.bash && catkin build -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/gcc -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DLPP_BUILD_TESTS=1 lpp && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash + run: source /opt/ros/${{ matrix.rosdistro }}/setup.bash && catkin build -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DLPP_BUILD_TESTS=1 lpp && source ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash working-directory: catkin_ws shell: bash From 8717c56c34f18c5e742b6a1728e49851860c2e79 Mon Sep 17 00:00:00 2001 From: 4c3y <69460051+4c3y@users.noreply.github.com> Date: Wed, 29 May 2024 13:54:36 +0200 Subject: [PATCH 7/8] Verify g++ version --- .github/workflows/cpp_ubuntu20_04.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cpp_ubuntu20_04.yml b/.github/workflows/cpp_ubuntu20_04.yml index 01f0b69..07c46be 100644 --- a/.github/workflows/cpp_ubuntu20_04.yml +++ b/.github/workflows/cpp_ubuntu20_04.yml @@ -30,7 +30,7 @@ jobs: run: sudo apt update && sudo apt-get install -y software-properties-common && sudo add-apt-repository -y ppa:git-core/ppa && sudo apt-get update && sudo apt-get install -y git - name: Install GCC version ${{ matrix.gcc }} - run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.gcc }} && gcc --version + run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.gcc }} && gcc --version && g++ --version - name: Install catkin tools run: sudo apt install -y python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential python3-catkin-tools From 390a9102595ceedcf5f48983b6a761430e33b566 Mon Sep 17 00:00:00 2001 From: 4c3y <69460051+4c3y@users.noreply.github.com> Date: Wed, 10 Jul 2024 17:10:37 +0200 Subject: [PATCH 8/8] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2525092..e7138aa 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ - All log calls are thread-safe. - Lightweight with performance in mind - Header only -- Recommended to use with C++17, but also works with C++11 when compiling with GCC. +- GCC 8 or later required +- Recommended to use with C++17/C++20, but also works with C++11/C++14. ## Example