diff --git a/tools/docker/Makefile b/tools/docker/Makefile index e188fc2ae7..c46a23d569 100644 --- a/tools/docker/Makefile +++ b/tools/docker/Makefile @@ -97,12 +97,14 @@ help: @echo -e "\t\t${BOLD}debian-sid${RESET} (unstable)" @echo -e "\t\t${BOLD}debian-11${RESET} (bullseye, latest)" @echo -e "\t\t${BOLD}debian-10${RESET} (buster)" - @echo -e "\t\t${BOLD}fedora-36${RESET} (latest)" + @echo -e "\t\t${BOLD}fedora-38${RESET} (rawhide)" + @echo -e "\t\t${BOLD}fedora-37${RESET} (latest)" + @echo -e "\t\t${BOLD}fedora-36${RESET}" @echo -e "\t\t${BOLD}fedora-35${RESET}" @echo -e "\t\t${BOLD}fedora-34${RESET}" @echo -e "\t\t${BOLD}fedora-33${RESET}" @echo -e "\t\t${BOLD}opensuse-leap${RESET} (latest)" - @echo -e "\t\t${BOLD}ubuntu-22.10${RESET} (Ubuntu 22.10, devel)" + @echo -e "\t\t${BOLD}ubuntu-22.10${RESET} (Ubuntu 22.10, rolling)" @echo -e "\t\t${BOLD}ubuntu-22.04${RESET} (Ubuntu 22.04 LTS, latest)" @echo -e "\t\t${BOLD}ubuntu-20.04${RESET} (Ubuntu 20.04 LTS)" @echo -e "\t\t${BOLD}ubuntu-18.04${RESET} (Ubuntu 18.04 LTS)" @@ -406,7 +408,7 @@ DISTROS := \ archlinux \ centos-7 centos-8 \ debian-10 debian-11 debian-sid \ - fedora-33 fedora-34 fedora-35 fedora-36 \ + fedora-33 fedora-34 fedora-35 fedora-36 fedora-37 fedora-38 \ opensuse-leap \ ubuntu-18.04 ubuntu-20.04 ubuntu-22.04 ubuntu-22.10 diff --git a/tools/docker/images/fedora-37.Dockerfile b/tools/docker/images/fedora-37.Dockerfile new file mode 100644 index 0000000000..183779ab89 --- /dev/null +++ b/tools/docker/images/fedora-37.Dockerfile @@ -0,0 +1,98 @@ +# ref: https://hub.docker.com/_/fedora +FROM fedora:37 AS env + +############# +## SETUP ## +############# +RUN dnf -y update \ +&& dnf -y install git \ + wget which redhat-lsb-core pkgconfig autoconf libtool zlib-devel \ +&& dnf -y groupinstall "Development Tools" \ +&& dnf -y install gcc-c++ cmake \ +&& dnf clean all +ENTRYPOINT ["/usr/bin/bash", "-c"] +CMD ["/usr/bin/bash"] + +# Install SWIG +RUN dnf -y update \ +&& dnf -y install swig \ +&& dnf clean all + +# Install .Net +# see: https://docs.microsoft.com/en-us/dotnet/core/install/linux-fedora +RUN dnf -y update \ +&& dnf -y install dotnet-sdk-3.1 dotnet-sdk-6.0 \ +&& dnf clean all +# Trigger first run experience by running arbitrary cmd +RUN dotnet --info + +# Install Java +RUN dnf -y update \ +&& dnf -y install java-11-openjdk java-11-openjdk-devel maven \ +&& dnf clean all +ENV JAVA_HOME=/usr/lib/jvm/java-openjdk + +# Install Python +RUN dnf -y update \ +&& dnf -y install python3 python3-devel python3-pip \ +&& dnf clean all + +################ +## OR-TOOLS ## +################ +FROM env AS devel +WORKDIR /root +# Copy the snk key +COPY or-tools.snk /root/or-tools.snk +ENV DOTNET_SNK=/root/or-tools.snk + +ARG SRC_GIT_BRANCH +ENV SRC_GIT_BRANCH ${SRC_GIT_BRANCH:-main} +ARG SRC_GIT_SHA1 +ENV SRC_GIT_SHA1 ${SRC_GIT_SHA1:-unknown} + +ARG OR_TOOLS_PATCH +ENV OR_TOOLS_PATCH ${OR_TOOLS_PATCH:-9999} + +# Download sources +# use SRC_GIT_SHA1 to modify the command +# i.e. avoid docker reusing the cache when new commit is pushed +RUN git clone -b "${SRC_GIT_BRANCH}" --single-branch --depth=1 https://github.com/google/or-tools \ +&& [[ $(cd or-tools && git rev-parse --verify HEAD) == ${SRC_GIT_SHA1} ]] +WORKDIR /root/or-tools + +# C++ +## build +FROM devel AS cpp_build +RUN make detect_cpp \ +&& make cpp JOBS=8 +## archive +FROM cpp_build AS cpp_archive +RUN make archive_cpp + +# .Net +## build +FROM cpp_build AS dotnet_build +RUN make detect_dotnet \ +&& make dotnet JOBS=8 +## archive +FROM dotnet_build AS dotnet_archive +RUN make archive_dotnet + +# Java +## build +FROM cpp_build AS java_build +RUN make detect_java \ +&& make java JOBS=8 +## archive +FROM java_build AS java_archive +RUN make archive_java + +# Python +## build +FROM cpp_build AS python_build +RUN make detect_python \ +&& make python JOBS=8 +## archive +FROM python_build AS python_archive +RUN make archive_python diff --git a/tools/docker/images/fedora-38.Dockerfile b/tools/docker/images/fedora-38.Dockerfile new file mode 100644 index 0000000000..16564a4a76 --- /dev/null +++ b/tools/docker/images/fedora-38.Dockerfile @@ -0,0 +1,98 @@ +# ref: https://hub.docker.com/_/fedora +FROM fedora:38 AS env + +############# +## SETUP ## +############# +RUN dnf -y update \ +&& dnf -y install git \ + wget which redhat-lsb-core pkgconfig autoconf libtool zlib-devel \ +&& dnf -y groupinstall "Development Tools" \ +&& dnf -y install gcc-c++ cmake \ +&& dnf clean all +ENTRYPOINT ["/usr/bin/bash", "-c"] +CMD ["/usr/bin/bash"] + +# Install SWIG +RUN dnf -y update \ +&& dnf -y install swig \ +&& dnf clean all + +# Install .Net +# see: https://docs.microsoft.com/en-us/dotnet/core/install/linux-fedora +RUN dnf -y update \ +&& dnf -y install dotnet-sdk-3.1 dotnet-sdk-6.0 \ +&& dnf clean all +# Trigger first run experience by running arbitrary cmd +RUN dotnet --info + +# Install Java +RUN dnf -y update \ +&& dnf -y install java-11-openjdk java-11-openjdk-devel maven \ +&& dnf clean all +ENV JAVA_HOME=/usr/lib/jvm/java-openjdk + +# Install Python +RUN dnf -y update \ +&& dnf -y install python3 python3-devel python3-pip \ +&& dnf clean all + +################ +## OR-TOOLS ## +################ +FROM env AS devel +WORKDIR /root +# Copy the snk key +COPY or-tools.snk /root/or-tools.snk +ENV DOTNET_SNK=/root/or-tools.snk + +ARG SRC_GIT_BRANCH +ENV SRC_GIT_BRANCH ${SRC_GIT_BRANCH:-main} +ARG SRC_GIT_SHA1 +ENV SRC_GIT_SHA1 ${SRC_GIT_SHA1:-unknown} + +ARG OR_TOOLS_PATCH +ENV OR_TOOLS_PATCH ${OR_TOOLS_PATCH:-9999} + +# Download sources +# use SRC_GIT_SHA1 to modify the command +# i.e. avoid docker reusing the cache when new commit is pushed +RUN git clone -b "${SRC_GIT_BRANCH}" --single-branch --depth=1 https://github.com/google/or-tools \ +&& [[ $(cd or-tools && git rev-parse --verify HEAD) == ${SRC_GIT_SHA1} ]] +WORKDIR /root/or-tools + +# C++ +## build +FROM devel AS cpp_build +RUN make detect_cpp \ +&& make cpp JOBS=8 +## archive +FROM cpp_build AS cpp_archive +RUN make archive_cpp + +# .Net +## build +FROM cpp_build AS dotnet_build +RUN make detect_dotnet \ +&& make dotnet JOBS=8 +## archive +FROM dotnet_build AS dotnet_archive +RUN make archive_dotnet + +# Java +## build +FROM cpp_build AS java_build +RUN make detect_java \ +&& make java JOBS=8 +## archive +FROM java_build AS java_archive +RUN make archive_java + +# Python +## build +FROM cpp_build AS python_build +RUN make detect_python \ +&& make python JOBS=8 +## archive +FROM python_build AS python_archive +RUN make archive_python diff --git a/tools/docker/test/fedora-37/cpp.Dockerfile b/tools/docker/test/fedora-37/cpp.Dockerfile new file mode 100644 index 0000000000..436a4c6177 --- /dev/null +++ b/tools/docker/test/fedora-37/cpp.Dockerfile @@ -0,0 +1,14 @@ +# ref: https://hub.docker.com/_/fedora +FROM fedora:37 + +RUN dnf -y update \ +&& dnf -y install git \ + wget which redhat-lsb-core pkgconfig autoconf libtool zlib-devel \ +&& dnf -y groupinstall "Development Tools" \ +&& dnf -y install gcc-c++ cmake \ +&& dnf clean all + +WORKDIR /root +ADD or-tools_amd64_fedora-37_cpp_v*.tar.gz . + +RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/fedora-37/dotnet.Dockerfile b/tools/docker/test/fedora-37/dotnet.Dockerfile new file mode 100644 index 0000000000..cab2f3d055 --- /dev/null +++ b/tools/docker/test/fedora-37/dotnet.Dockerfile @@ -0,0 +1,22 @@ +# ref: https://hub.docker.com/_/fedora +FROM fedora:37 + +RUN dnf -y update \ +&& dnf -y install git \ + wget which redhat-lsb-core pkgconfig autoconf libtool zlib-devel \ +&& dnf -y groupinstall "Development Tools" \ +&& dnf -y install gcc-c++ cmake \ +&& dnf clean all + +# Install .Net +# see: https://docs.microsoft.com/en-us/dotnet/core/install/linux-fedora +RUN dnf -y update \ +&& dnf -y install dotnet-sdk-3.1 dotnet-sdk-6.0 \ +&& dnf clean all +# Trigger first run experience by running arbitrary cmd +RUN dotnet --info + +WORKDIR /root +ADD or-tools_amd64_fedora-37_dotnet_v*.tar.gz . + +RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/fedora-37/java.Dockerfile b/tools/docker/test/fedora-37/java.Dockerfile new file mode 100644 index 0000000000..bf681d4238 --- /dev/null +++ b/tools/docker/test/fedora-37/java.Dockerfile @@ -0,0 +1,20 @@ +# ref: https://hub.docker.com/_/fedora +FROM fedora:37 + +RUN dnf -y update \ +&& dnf -y install git \ + wget which redhat-lsb-core pkgconfig autoconf libtool zlib-devel \ +&& dnf -y groupinstall "Development Tools" \ +&& dnf -y install gcc-c++ cmake \ +&& dnf clean all + +# Java Install +RUN dnf -y update \ +&& dnf -y install java-11-openjdk java-11-openjdk-devel maven \ +&& dnf clean all +ENV JAVA_HOME=/usr/lib/jvm/java-openjdk + +WORKDIR /root +ADD or-tools_amd64_fedora-37_java_v*.tar.gz . + +RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/fedora-37/python.Dockerfile b/tools/docker/test/fedora-37/python.Dockerfile new file mode 100644 index 0000000000..6ad814a402 --- /dev/null +++ b/tools/docker/test/fedora-37/python.Dockerfile @@ -0,0 +1,14 @@ +# ref: https://hub.docker.com/_/fedora +FROM fedora:37 + +RUN dnf -y update \ +&& dnf -y install git \ + wget which redhat-lsb-core pkgconfig autoconf libtool zlib-devel \ +&& dnf -y groupinstall "Development Tools" \ +&& dnf -y install gcc-c++ cmake \ +&& dnf clean all + +WORKDIR /root +ADD or-tools_amd64_fedora-37_python_v*.tar.gz . + +RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/fedora-38/cpp.Dockerfile b/tools/docker/test/fedora-38/cpp.Dockerfile new file mode 100644 index 0000000000..9006386ec7 --- /dev/null +++ b/tools/docker/test/fedora-38/cpp.Dockerfile @@ -0,0 +1,14 @@ +# ref: https://hub.docker.com/_/fedora +FROM fedora:38 + +RUN dnf -y update \ +&& dnf -y install git \ + wget which redhat-lsb-core pkgconfig autoconf libtool zlib-devel \ +&& dnf -y groupinstall "Development Tools" \ +&& dnf -y install gcc-c++ cmake \ +&& dnf clean all + +WORKDIR /root +ADD or-tools_amd64_fedora-38_cpp_v*.tar.gz . + +RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/fedora-38/dotnet.Dockerfile b/tools/docker/test/fedora-38/dotnet.Dockerfile new file mode 100644 index 0000000000..f0df232ba6 --- /dev/null +++ b/tools/docker/test/fedora-38/dotnet.Dockerfile @@ -0,0 +1,22 @@ +# ref: https://hub.docker.com/_/fedora +FROM fedora:38 + +RUN dnf -y update \ +&& dnf -y install git \ + wget which redhat-lsb-core pkgconfig autoconf libtool zlib-devel \ +&& dnf -y groupinstall "Development Tools" \ +&& dnf -y install gcc-c++ cmake \ +&& dnf clean all + +# Install .Net +# see: https://docs.microsoft.com/en-us/dotnet/core/install/linux-fedora +RUN dnf -y update \ +&& dnf -y install dotnet-sdk-3.1 dotnet-sdk-6.0 \ +&& dnf clean all +# Trigger first run experience by running arbitrary cmd +RUN dotnet --info + +WORKDIR /root +ADD or-tools_amd64_fedora-38_dotnet_v*.tar.gz . + +RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/fedora-38/java.Dockerfile b/tools/docker/test/fedora-38/java.Dockerfile new file mode 100644 index 0000000000..4bb20a9c63 --- /dev/null +++ b/tools/docker/test/fedora-38/java.Dockerfile @@ -0,0 +1,20 @@ +# ref: https://hub.docker.com/_/fedora +FROM fedora:38 + +RUN dnf -y update \ +&& dnf -y install git \ + wget which redhat-lsb-core pkgconfig autoconf libtool zlib-devel \ +&& dnf -y groupinstall "Development Tools" \ +&& dnf -y install gcc-c++ cmake \ +&& dnf clean all + +# Java Install +RUN dnf -y update \ +&& dnf -y install java-11-openjdk java-11-openjdk-devel maven \ +&& dnf clean all +ENV JAVA_HOME=/usr/lib/jvm/java-openjdk + +WORKDIR /root +ADD or-tools_amd64_fedora-38_java_v*.tar.gz . + +RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/fedora-38/python.Dockerfile b/tools/docker/test/fedora-38/python.Dockerfile new file mode 100644 index 0000000000..ff2f669a0f --- /dev/null +++ b/tools/docker/test/fedora-38/python.Dockerfile @@ -0,0 +1,14 @@ +# ref: https://hub.docker.com/_/fedora +FROM fedora:38 + +RUN dnf -y update \ +&& dnf -y install git \ + wget which redhat-lsb-core pkgconfig autoconf libtool zlib-devel \ +&& dnf -y groupinstall "Development Tools" \ +&& dnf -y install gcc-c++ cmake \ +&& dnf clean all + +WORKDIR /root +ADD or-tools_amd64_fedora-38_python_v*.tar.gz . + +RUN cd or-tools_*_v* && make test