cmake: cleanup ci dockers

This commit is contained in:
Corentin Le Molgat
2024-11-15 09:57:34 +01:00
parent 79d194ceff
commit 2d8f157098
13 changed files with 20 additions and 25 deletions

View File

@@ -1,11 +1,12 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/almalinux
FROM almalinux:latest AS base
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
&& dnf -y install git wget openssl-devel cmake \
&& dnf -y groupinstall "Development Tools" \
&& dnf -y group install "Development Tools" \
&& dnf clean all \
&& rm -rf /var/cache/dnf
CMD [ "/usr/bin/bash" ]

View File

@@ -1,6 +1,7 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/alpine
FROM alpine:edge AS base
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN apk add --no-cache git build-base linux-headers cmake

View File

@@ -1,6 +1,7 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/archlinux/
FROM archlinux:latest AS base
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN pacman -Syu --noconfirm git base-devel cmake

View File

@@ -1,6 +1,7 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/debian
FROM debian:latest AS base
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN apt-get update -qq \

View File

@@ -1,11 +1,12 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/fedora
FROM fedora:latest AS base
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
&& dnf -y install git wget \
&& dnf -y groupinstall "Development Tools" \
&& dnf -y install @development-tools \
&& dnf -y install gcc-c++ cmake \
&& dnf clean all
CMD [ "/usr/bin/bash" ]

View File

@@ -2,7 +2,7 @@ FROM ortools/cmake:fedora_swig AS env
# see: https://docs.microsoft.com/en-us/dotnet/core/install/linux-fedora
RUN dnf -y update \
&& dnf -y install dotnet-sdk-6.0 \
&& dnf -y install dotnet-sdk-8.0 \
&& dnf clean all
# Trigger first run experience by running arbitrary cmd
RUN dotnet --info

View File

@@ -1,28 +1,22 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/ubuntu
FROM ubuntu:rolling AS env
FROM ubuntu:latest AS env
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN apt-get update -qq \
&& apt-get install -yq git wget libssl-dev build-essential \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq \
git wget libssl-dev build-essential cmake \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install CMake 3.28.3
RUN wget -q "https://cmake.org/files/v3.28/cmake-3.28.3-linux-x86_64.sh" \
&& chmod a+x cmake-3.28.3-linux-x86_64.sh \
&& ./cmake-3.28.3-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
&& rm cmake-3.28.3-linux-x86_64.sh
CMD [ "/usr/bin/bash" ]
FROM env AS devel
WORKDIR /home/project
COPY . .
FROM devel AS build
RUN cmake -S. -Bbuild -DBUILD_DEPS=ON -DBUILD_CXX=OFF -DBUILD_GLOP=ON
RUN cmake --build build --target all -v
RUN cmake --build build --target all -j 4 -v
RUN cmake --build build --target install
FROM build AS test

View File

@@ -1,6 +1,7 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/r/opensuse/tumbleweed
FROM opensuse/tumbleweed AS base
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN zypper refresh \

View File

@@ -1,11 +1,12 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/rockylinux
FROM rockylinux:9 AS base
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN dnf -y update \
&& dnf -y install git wget openssl-devel cmake \
&& dnf -y groupinstall "Development Tools" \
&& dnf -y group install "Development Tools" \
&& dnf clean all \
&& rm -rf /var/cache/dnf
CMD [ "/usr/bin/bash" ]

View File

@@ -12,7 +12,7 @@ RUN pacman -Syu --noconfirm \
coin-or-cbc coin-or-clp \
glpk \
scip \
gtest
gtest benchmark
ENTRYPOINT ["/bin/bash", "-c"]
CMD [ "/bin/bash" ]

View File

@@ -6,17 +6,9 @@ FROM ubuntu:latest AS env
ENV PATH=/usr/local/bin:$PATH
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq git wget libssl-dev build-essential \
ninja-build python3 python3-venv pkgconf libglib2.0-dev \
cmake ninja-build python3 python3-venv pkgconf libglib2.0-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENTRYPOINT ["/usr/bin/bash", "-c"]
CMD ["/usr/bin/bash"]
# Install CMake 3.28.3
RUN wget "https://cmake.org/files/v3.28/cmake-3.28.3-linux-x86_64.sh" \
&& chmod a+x cmake-3.28.3-linux-x86_64.sh \
&& ./cmake-3.28.3-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
&& rm cmake-3.28.3-linux-x86_64.sh
FROM env AS devel
WORKDIR /home/project

View File

@@ -1,6 +1,7 @@
# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/ubuntu
FROM ubuntu:rolling AS base
# Install system build dependencies
ENV PATH=/usr/local/bin:$PATH
RUN apt-get update -qq \

View File

@@ -4,7 +4,8 @@ ENV PATH=/root/.local/bin:$PATH
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq \
python3-dev python3-pip \
python3-wheel python3-venv python3-virtualenv \
python3-setuptools python3-wheel \
python3-venv python3-virtualenv \
python3-numpy python3-pandas \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*