From cad7ad5bb7a4e6eb33d16a63cf64fdd52adf982b Mon Sep 17 00:00:00 2001 From: Raphael Riebl Date: Mon, 21 Oct 2024 15:24:43 +0200 Subject: [PATCH] CI: add Ubuntu noble to build matrix --- .github/workflows/docker-ci.yml | 2 +- tools/docker/Dockerfile | 4 ++-- tools/docker/apt_pkg_name.sh | 30 ++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100755 tools/docker/apt_pkg_name.sh diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 143cf498c..6934942e2 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ubuntu-version: [bionic, focal, jammy] + ubuntu-version: [bionic, focal, jammy, noble] steps: - uses: actions/checkout@v4 - run: > diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index a8802e791..56a0e5e44 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -2,7 +2,7 @@ ARG UBUNTU_VERSION=xenial FROM ubuntu:${UBUNTU_VERSION} ARG DEBIAN_FRONTEND=noninteractive SHELL ["/bin/bash", "-c"] -COPY update_cmake.sh /usr/local/bin/update_cmake.sh +COPY --chmod=755 update_cmake.sh apt_pkg_name.sh /usr/local/bin/ RUN update_cmake.sh && apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ @@ -12,7 +12,7 @@ RUN update_cmake.sh && apt-get update && \ libboost-program-options-dev \ libboost-system-dev \ libcrypto++-dev \ - libgeographic-dev \ + $(apt_pkg_name.sh geographiclib) \ libssl-dev \ ninja-build \ && rm -rf /var/lib/apt/lists/* diff --git a/tools/docker/apt_pkg_name.sh b/tools/docker/apt_pkg_name.sh new file mode 100755 index 000000000..a00188345 --- /dev/null +++ b/tools/docker/apt_pkg_name.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set -euo pipefail + +source /etc/os-release +case $VERSION_CODENAME in + bionic) + ;& + focal) + ;& + jammy) + GEOGRAPHICLIB=libgeographic-dev + ;; + noble) + GEOGRAPHICLIB=libgeographiclib-dev + ;; + *) + echo "Unsupported Ubuntu version: $VERSION_CODENAME" + exit 1 + ;; +esac + +case $1 in + geographiclib) + echo $GEOGRAPHICLIB + ;; + *) + echo "Unknown package name: $1" + exit 1 + ;; +esac