]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Clean up and modernize dockerfiles
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 3 May 2025 08:20:30 +0000 (10:20 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 29 May 2025 09:44:33 +0000 (11:44 +0200)
dockerfiles/README
dockerfiles/alpine-3.15/Dockerfile [deleted file]
dockerfiles/alpine-3.21/Dockerfile [moved from dockerfiles/alpine-3.11/Dockerfile with 93% similarity]
dockerfiles/fedora-36/Dockerfile [deleted file]
dockerfiles/fedora-42/Dockerfile [moved from dockerfiles/fedora-40/Dockerfile with 95% similarity]
misc/test-all-systems [deleted file]
misc/test-some-systems [new file with mode: 0755]

index d1de6859b48ec7972e7874f88b71013c61425d27..4bf087022e1fe09e45db074b68991179fe3f8dcc 100644 (file)
@@ -1,11 +1,12 @@
-This directory contains Dockerfiles for building and testing ccache in
-different build environments.
+This directory contains Dockerfiles for building and testing ccache in different
+build environments. These are unofficial Dockerfiles only intended for use by
+ccache developers locally.
 
-For instance, run something like this to build ccache in Ubuntu 20.04:
+For instance, run something like this to build ccache in Ubuntu 24.04:
 
-    misc/build-in-docker ubuntu-20.04
+    misc/build-in-docker ubuntu-24.04
 
-The above command will first build the Ubuntu 20.04 Docker image if needed and
+The above command will first build the Ubuntu 24.04 Docker image if needed and
 finally build ccache and run the ccache test suite.
 
-See also misc/test-all-systems.
+See also misc/test-some-systems.
diff --git a/dockerfiles/alpine-3.15/Dockerfile b/dockerfiles/alpine-3.15/Dockerfile
deleted file mode 100644 (file)
index ff3d4c1..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-ARG BASE_IMAGE=alpine:3.15
-FROM ${BASE_IMAGE} AS build
-
-RUN apk add --no-cache \
-        bash \
-        ccache \
-        clang \
-        cmake \
-        elfutils \
-        g++ \
-        gcc \
-        hiredis-dev \
-        libc-dev \
-        make \
-        perl \
-        python3 \
-        redis \
-        zstd-dev
-
-# Redirect all compilers to ccache.
-RUN for t in gcc g++ cc c++ clang clang++; do ln -vs /usr/bin/ccache /usr/local/bin/$t; done
similarity index 93%
rename from dockerfiles/alpine-3.11/Dockerfile
rename to dockerfiles/alpine-3.21/Dockerfile
index 8bc04cb385e6616b55177d53a8135f9ddd8d351a..4eec71bc852f5d66bcfb19a4d3b6fa8304100efa 100644 (file)
@@ -1,4 +1,4 @@
-ARG BASE_IMAGE=alpine:3.11
+ARG BASE_IMAGE=alpine:3.21
 FROM ${BASE_IMAGE} AS build
 
 RUN apk add --no-cache \
diff --git a/dockerfiles/fedora-36/Dockerfile b/dockerfiles/fedora-36/Dockerfile
deleted file mode 100644 (file)
index d7aa9c5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-ARG BASE_IMAGE=fedora:36
-FROM ${BASE_IMAGE} AS build
-
-RUN dnf install -y \
-        autoconf \
-        bash \
-        ccache \
-        clang \
-        cmake \
-        diffutils \
-        elfutils \
-        findutils \
-        gcc \
-        gcc-c++ \
-        libstdc++-static \
-        hiredis-devel \
-        libzstd-devel \
-        make \
-        python3 \
-        redis \
- && dnf clean all
similarity index 95%
rename from dockerfiles/fedora-40/Dockerfile
rename to dockerfiles/fedora-42/Dockerfile
index b9f0b4ac97eb212d966d5a94e40bf3d308adebbb..48bd0a806b37b01f178847e326113da8b16a93d8 100644 (file)
@@ -1,4 +1,4 @@
-ARG BASE_IMAGE=fedora:40
+ARG BASE_IMAGE=fedora:42
 FROM ${BASE_IMAGE} AS build
 
 RUN dnf install -y \
diff --git a/misc/test-all-systems b/misc/test-all-systems
deleted file mode 100755 (executable)
index 524597f..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-#
-# While it's obviously quite impossible to support and test every single
-# distribution, this script enables easy checking of the most common standard
-# distributions at least.
-
-set -eu
-
-top_dir="$(dirname "$(realpath "$0")")/.."
-build_in_docker="${top_dir}/misc/build-in-docker"
-
-build() {
-    local name=$1
-    local cc=$2
-    local cxx=$3
-    local test_cc=$4
-    shift 4
-    local cmake_params="$*"
-    if command -v >/dev/null ccache; then
-        cmake_params="${cmake_params} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
-    fi
-    echo "Build in Docker: $name CC=$cc CXX=$cxx TEST_CC=$test_cc CMAKE_PARAMS=\"$*\""
-    ASM=$cc CC=$cc CXX=$cxx TEST_CC=$test_cc CMAKE_PARAMS="${cmake_params}" $build_in_docker $name
-}
-
-#     NAME         CC     CXX     TEST_CC CMAKE_PARAMS
-
-build alma-8       gcc    g++     gcc
-build alma-8       clang  clang++ clang
-
-build debian-11    gcc    g++     gcc
-build debian-11    clang  clang++ clang
-
-build debian-12    gcc    g++     gcc
-build debian-12    clang  clang++ clang
-
-build ubuntu-20.04 gcc    g++     gcc
-build ubuntu-20.04 clang  clang++ clang
-
-build ubuntu-22.04 gcc-12 g++-12  gcc
-build ubuntu-22.04 clang  clang++ clang
-
-build ubuntu-24.04 gcc-13 g++-13  gcc
-build ubuntu-24.04 gcc-14 g++-14  gcc
-build ubuntu-24.04 clang  clang++ clang
-
-build centos-7     gcc    g++     gcc
-build centos-7     gcc    g++     clang
-
-build fedora-36    gcc    g++     gcc
-build fedora-36    clang  clang++ clang
-
-build fedora-40    gcc    g++     gcc     -D DEPS=LOCAL
-build fedora-40    clang  clang++ clang   -D DEPS=LOCAL
-
-build alpine-3.11  gcc    g++     gcc
-build alpine-3.11  gcc    g++     clang
-
-build alpine-3.15  gcc    g++     gcc
-build alpine-3.15  clang  clang++ clang
diff --git a/misc/test-some-systems b/misc/test-some-systems
new file mode 100755 (executable)
index 0000000..eb39574
--- /dev/null
@@ -0,0 +1,60 @@
+#!/bin/sh
+#
+# This script enables easy checking of some common standard Linux distributions.
+
+set -eu
+
+top_dir="$(dirname "$(realpath "$0")")/.."
+build_in_docker="${top_dir}/misc/build-in-docker"
+name_filter="${1:-}"
+
+build() {
+    local name=$1
+    local cc=$2
+    local cxx=$3
+    local test_cc=$4
+    shift 4
+    local cmake_params="$*"
+
+    echo "======================================================================"
+    echo "=== ${name} ${cc} ${cxx} ${test_cc} ${cmake_params}"
+
+    if [ -n "${name_filter}" ] && [ "${name}" != "${name_filter}" ]; then
+        echo "Skipping due to name_filter"
+        return
+    fi
+
+    if command -v >/dev/null ccache; then
+        cmake_params="${cmake_params} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
+    fi
+    echo "Build in Docker: $name CC=$cc CXX=$cxx TEST_CC=$test_cc CMAKE_PARAMS=\"$*\""
+    ASM=$cc CC=$cc CXX=$cxx TEST_CC=$test_cc CMAKE_PARAMS="${cmake_params}" $build_in_docker $name
+}
+
+#     NAME         CC     CXX     TEST_CC CMAKE_PARAMS
+
+build alma-8       gcc    g++     gcc     -D DEPS=DOWNLOAD
+build alma-8       clang  clang++ clang   -D DEPS=DOWNLOAD
+
+build alpine-3.21  gcc    g++     gcc     -D DEPS=DOWNLOAD
+build alpine-3.21  clang  clang++ clang   -D DEPS=DOWNLOAD
+
+build debian-11    gcc    g++     gcc     -D DEPS=DOWNLOAD
+build debian-11    clang  clang++ clang   -D DEPS=DOWNLOAD
+
+build debian-12    gcc    g++     gcc     -D DEPS=DOWNLOAD
+build debian-12    clang  clang++ clang   -D DEPS=DOWNLOAD
+
+build fedora-42    gcc    g++     gcc     -D DEPS=DOWNLOAD
+build fedora-42    clang  clang++ clang   -D DEPS=DOWNLOAD -D ENABLE_TESTING=OFF # doctest issue #900
+
+build ubuntu-20.04 gcc    g++     gcc     -D DEPS=DOWNLOAD
+build ubuntu-20.04 clang  clang++ clang   -D DEPS=DOWNLOAD
+
+build ubuntu-22.04 gcc-11 g++-11  gcc     -D DEPS=DOWNLOAD
+build ubuntu-22.04 gcc-12 g++-12  gcc     -D DEPS=DOWNLOAD
+build ubuntu-22.04 clang  clang++ clang   -D DEPS=DOWNLOAD
+
+build ubuntu-24.04 gcc-13 g++-13  gcc     -D DEPS=DOWNLOAD
+build ubuntu-24.04 gcc-14 g++-14  gcc     -D DEPS=DOWNLOAD
+build ubuntu-24.04 clang  clang++ clang   -D DEPS=DOWNLOAD