From f76f849e6a9912f18493818728e170de57cc366d Mon Sep 17 00:00:00 2001 From: Wolfgang Hess Date: Mon, 4 Jul 2022 19:38:24 +0200 Subject: [PATCH] Add Ubuntu 22.04 to the install scripts, CI, docs. (#1888) Signed-off-by: Wolfgang Hess --- .github/workflows/ci-jammy.yaml | 15 +++++++++++++++ Dockerfile.bionic | 2 +- Dockerfile.focal | 2 +- Dockerfile.jammy | 31 +++++++++++++++++++++++++++++++ README.rst | 8 ++++++-- docs/source/index.rst | 8 ++------ scripts/install_abseil.sh | 2 +- scripts/install_debs_cmake.sh | 24 +++++++++++------------- 8 files changed, 68 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/ci-jammy.yaml create mode 100644 Dockerfile.jammy diff --git a/.github/workflows/ci-jammy.yaml b/.github/workflows/ci-jammy.yaml new file mode 100644 index 0000000..104ed95 --- /dev/null +++ b/.github/workflows/ci-jammy.yaml @@ -0,0 +1,15 @@ +name: Ubuntu 22.04 CI + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run the Dockerfile + run: docker build . -f Dockerfile.jammy diff --git a/Dockerfile.bionic b/Dockerfile.bionic index 7066e6a..d79a257 100644 --- a/Dockerfile.bionic +++ b/Dockerfile.bionic @@ -22,7 +22,7 @@ ENV CC=$cc ENV CXX=$cxx # This base image doesn't ship with sudo, apt-utils. tzdata is installed here to avoid hanging later -# when it would wait for user input. +# when it would wait for user input. RUN apt-get update && apt-get install -y sudo apt-utils tzdata && rm -rf /var/lib/apt/lists/* COPY scripts/install_debs_cmake.sh cartographer/scripts/ diff --git a/Dockerfile.focal b/Dockerfile.focal index 4abbe56..e757524 100644 --- a/Dockerfile.focal +++ b/Dockerfile.focal @@ -22,7 +22,7 @@ ENV CC=$cc ENV CXX=$cxx # This base image doesn't ship with sudo, apt-utils. tzdata is installed here to avoid hanging later -# when it would wait for user input. +# when it would wait for user input. RUN apt-get update && apt-get install -y sudo apt-utils tzdata && rm -rf /var/lib/apt/lists/* COPY scripts/install_debs_cmake.sh cartographer/scripts/ diff --git a/Dockerfile.jammy b/Dockerfile.jammy new file mode 100644 index 0000000..7e5fb9b --- /dev/null +++ b/Dockerfile.jammy @@ -0,0 +1,31 @@ +# Copyright 2020 The Cartographer Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM ubuntu:jammy + +ARG cc +ARG cxx + +# Set the preferred C/C++ compiler toolchain, if given (otherwise default). +ENV CC=$cc +ENV CXX=$cxx + +# This base image doesn't ship with sudo, apt-utils. tzdata is installed here to avoid hanging later +# when it would wait for user input. +RUN apt-get update && apt-get install -y sudo apt-utils tzdata && rm -rf /var/lib/apt/lists/* + +COPY scripts/install_debs_cmake.sh cartographer/scripts/ +RUN cartographer/scripts/install_debs_cmake.sh && rm -rf /var/lib/apt/lists/* +COPY . cartographer +RUN cartographer/scripts/install_cartographer_cmake.sh && rm -rf cartographer diff --git a/README.rst b/README.rst index 9995a49..2b89e40 100644 --- a/README.rst +++ b/README.rst @@ -16,7 +16,7 @@ Cartographer ============ -|build| |docs| |license| +|build-jammy| |build-focal| |docs| |license| Purpose ======= @@ -83,7 +83,11 @@ Slides of these Cartographer Open House meetings are listed below. - June 22, 2017: `Slides `_ - June 8, 2017: `Slides `_ -.. |build| image:: https://github.com/cartographer-project/cartographer/actions/workflows/ci-focal.yaml/badge.svg +.. |build-jammy| image:: https://github.com/cartographer-project/cartographer/actions/workflows/ci-jammy.yaml/badge.svg + :alt: Ubuntu 22.04 Build Status + :scale: 100% + :target: https://github.com/cartographer-project/cartographer/actions/workflows/ci-jammy.yaml +.. |build-focal| image:: https://github.com/cartographer-project/cartographer/actions/workflows/ci-focal.yaml/badge.svg :alt: Ubuntu 20.04 Build Status :scale: 100% :target: https://github.com/cartographer-project/cartographer/actions/workflows/ci-focal.yaml diff --git a/docs/source/index.rst b/docs/source/index.rst index 4871233..29d5279 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -75,10 +75,6 @@ On Ubuntu 18.04 (Bionic): :language: bash :lines: 20- -.. literalinclude:: ../../scripts/install_ceres.sh - :language: bash - :lines: 20- - .. literalinclude:: ../../scripts/install_proto3.sh :language: bash :lines: 20- @@ -97,8 +93,8 @@ on systems that meet the following requirements: * 64-bit, modern CPU (e.g. 3rd generation i7) * 16 GB RAM -* Ubuntu 18.04 (Bionic), 20.04 (Focal) -* gcc version 6.3.0, 7.5.0, 9.3.0 +* Ubuntu 18.04 (Bionic), 20.04 (Focal), 22.04 (Jammy) +* gcc version 6.3.0, 7.5.0, 9.3.0, 11.2.0 Known Issues ------------ diff --git a/scripts/install_abseil.sh b/scripts/install_abseil.sh index 4962d6e..ca5740b 100755 --- a/scripts/install_abseil.sh +++ b/scripts/install_abseil.sh @@ -19,7 +19,7 @@ set -o verbose git clone https://github.com/abseil/abseil-cpp.git cd abseil-cpp -git checkout d902eb869bcfacc1bad14933ed9af4bed006d481 +git checkout 215105818dfde3174fe799600bb0f3cae233d0bf # 20211102.0 mkdir build cd build cmake -G Ninja \ diff --git a/scripts/install_debs_cmake.sh b/scripts/install_debs_cmake.sh index 7eda82a..932210a 100755 --- a/scripts/install_debs_cmake.sh +++ b/scripts/install_debs_cmake.sh @@ -37,17 +37,15 @@ sudo apt-get install -y \ ninja-build \ stow -# Install Ceres Solver and Protocol Buffers support if available. +# Install Ceres Solver, Protocol Buffers, Abseil support if available. # No need to build it ourselves. -if [[ "$(lsb_release -sc)" = "focal" || "$(lsb_release -sc)" = "buster" ]] -then - sudo apt-get install -y python3-sphinx libgmock-dev libceres-dev protobuf-compiler -else - sudo apt-get install -y python-sphinx - if [[ "$(lsb_release -sc)" = "bionic" ]] - then - sudo apt-get install -y libceres-dev - fi -fi - - +case "$(lsb_release -sc)" in + jammy) + sudo apt-get install -y python3-sphinx libgmock-dev libceres-dev protobuf-compiler libabsl-dev ;; + focal|buster) + sudo apt-get install -y python3-sphinx libgmock-dev libceres-dev protobuf-compiler ;; + bionic) + sudo apt-get install -y python-sphinx libceres-dev ;; + *) + sudo apt-get install -y python-sphinx ;; +esac