Skip to content

Commit 3bbd02a

Browse files
committed
Merge branch 'main' of github.com:google/or-tools
2 parents 8d2d46f + b223ef8 commit 3bbd02a

24 files changed

Lines changed: 199 additions & 43 deletions

tools/docker/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ help:
9696
# @echo -e "\t\t${BOLD}debian-13${RESET} (Trixie)"
9797
@echo -e "\t\t${BOLD}debian-12${RESET} (Bookworm)"
9898
@echo -e "\t\t${BOLD}debian-11${RESET} (Bullseye)"
99+
@echo -e "\t\t${BOLD}fedora-42${RESET}"
99100
@echo -e "\t\t${BOLD}fedora-41${RESET}"
100101
@echo -e "\t\t${BOLD}fedora-40${RESET}"
101102
@echo -e "\t\t${BOLD}opensuse-leap${RESET} (latest)"
@@ -115,7 +116,7 @@ help:
115116
@echo
116117
@echo -e "\t${BOLD}<lang>${RESET}: Language to build"
117118
@echo -e "\t\t${BOLD}cpp${RESET} C++"
118-
@echo -e "\t\t${BOLD}dotnet${RESET} .Net Core 3.1 and/or .Net 6.0 wrappers"
119+
@echo -e "\t\t${BOLD}dotnet${RESET} .Net Core 3.1 and/or .Net 8.0 wrappers"
119120
@echo -e "\t\t${BOLD}java${RESET} Java (JDK 8.0) wrappers"
120121
@echo -e "\t\t${BOLD}python${RESET} Python 3.9+ wrappers"
121122
@echo
@@ -431,7 +432,7 @@ DISTROS := \
431432
alpine-edge \
432433
archlinux \
433434
debian-11 debian-12 debian-sid \
434-
fedora-40 fedora-41 \
435+
fedora-40 fedora-41 fedora-42 \
435436
opensuse-leap \
436437
rockylinux-9 \
437438
ubuntu-20.04 ubuntu-22.04 ubuntu-24.04 ubuntu-24.10

tools/docker/images/almalinux-9.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN dnf -y update \
3333
RUN wget -q "https://dot.net/v1/dotnet-install.sh" \
3434
&& chmod a+x dotnet-install.sh \
3535
&& ./dotnet-install.sh -c 3.1 -i /usr/local/bin \
36-
&& ./dotnet-install.sh -c 6.0 -i /usr/local/bin
36+
&& ./dotnet-install.sh -c 8.0 -i /usr/local/bin
3737
# Trigger first run experience by running arbitrary cmd
3838
RUN dotnet --info
3939

tools/docker/images/debian-11.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN ARCH=$(uname -m) \
2525
RUN wget -q "https://dot.net/v1/dotnet-install.sh" \
2626
&& chmod a+x dotnet-install.sh \
2727
&& ./dotnet-install.sh -c 3.1 -i /usr/local/bin \
28-
&& ./dotnet-install.sh -c 6.0 -i /usr/local/bin
28+
&& ./dotnet-install.sh -c 8.0 -i /usr/local/bin
2929
# Trigger first run experience by running arbitrary cmd
3030
RUN dotnet --info
3131

tools/docker/images/debian-12.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CMD ["/bin/bash"]
1818
RUN wget -q "https://dot.net/v1/dotnet-install.sh" \
1919
&& chmod a+x dotnet-install.sh \
2020
&& ./dotnet-install.sh -c 3.1 -i /usr/local/bin \
21-
&& ./dotnet-install.sh -c 6.0 -i /usr/local/bin
21+
&& ./dotnet-install.sh -c 8.0 -i /usr/local/bin
2222
# Trigger first run experience by running arbitrary cmd
2323
RUN dotnet --info
2424

tools/docker/images/debian-13.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CMD ["/bin/bash"]
1818
RUN wget -q "https://dot.net/v1/dotnet-install.sh" \
1919
&& chmod a+x dotnet-install.sh \
2020
&& ./dotnet-install.sh -c 3.1 -i /usr/local/bin \
21-
&& ./dotnet-install.sh -c 6.0 -i /usr/local/bin
21+
&& ./dotnet-install.sh -c 8.0 -i /usr/local/bin
2222
# Trigger first run experience by running arbitrary cmd
2323
RUN dotnet --info
2424

tools/docker/images/debian-sid.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN apt-get update -qq \
2525
&& dpkg -i packages-microsoft-prod.deb \
2626
&& rm packages-microsoft-prod.deb \
2727
&& apt-get update -qq \
28-
&& apt-get install -qq dotnet-sdk-6.0 \
28+
&& apt-get install -qq dotnet-sdk-8.0 \
2929
&& apt-get clean \
3030
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
3131
# Trigger first run experience by running arbitrary cmd
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# ref: https://hub.docker.com/_/fedora
2+
FROM fedora:42 AS env
3+
4+
#############
5+
## SETUP ##
6+
#############
7+
RUN dnf -y update \
8+
&& dnf -y install git \
9+
wget which redhat-lsb-core pkgconfig autoconf libtool zlib-devel \
10+
&& dnf -y install @development-tools \
11+
&& dnf -y install gcc-c++ cmake \
12+
&& dnf clean all
13+
ENTRYPOINT ["/usr/bin/bash", "-c"]
14+
CMD ["/usr/bin/bash"]
15+
16+
# Install SWIG
17+
RUN dnf -y update \
18+
&& dnf -y install swig \
19+
&& dnf clean all
20+
21+
# Install .Net
22+
# see: https://docs.microsoft.com/en-us/dotnet/core/install/linux-fedora
23+
RUN dnf -y update \
24+
&& dnf -y install dotnet-sdk-8.0 crypto-policies-scripts \
25+
&& dnf clean all
26+
# https://docs.redhat.com/en/documentation/net/6.0/html/release_notes_for_.net_6.0_rpm_packages/known-issues_release-notes-for-dotnet-rpms
27+
RUN update-crypto-policies --set DEFAULT:SHA1
28+
# Trigger first run experience by running arbitrary cmd
29+
RUN dotnet --info
30+
31+
# Install Java
32+
RUN dnf -y update \
33+
&& dnf -y install java-11-openjdk java-11-openjdk-devel maven \
34+
&& dnf clean all
35+
ENV JAVA_HOME=/usr/lib/jvm/java-openjdk
36+
37+
# Install Python
38+
RUN dnf -y update \
39+
&& dnf -y install python3 python3-devel python3-pip \
40+
&& dnf clean all
41+
RUN python3 -m pip install absl-py mypy mypy-protobuf
42+
43+
################
44+
## OR-TOOLS ##
45+
################
46+
FROM env AS devel
47+
WORKDIR /root
48+
# Copy the snk key
49+
COPY or-tools.snk /root/or-tools.snk
50+
ENV DOTNET_SNK=/root/or-tools.snk
51+
52+
ARG SRC_GIT_BRANCH
53+
ENV SRC_GIT_BRANCH ${SRC_GIT_BRANCH:-main}
54+
ARG SRC_GIT_SHA1
55+
ENV SRC_GIT_SHA1 ${SRC_GIT_SHA1:-unknown}
56+
57+
ARG OR_TOOLS_PATCH
58+
ENV OR_TOOLS_PATCH ${OR_TOOLS_PATCH:-9999}
59+
60+
# Download sources
61+
# use SRC_GIT_SHA1 to modify the command
62+
# i.e. avoid docker reusing the cache when new commit is pushed
63+
RUN git clone -b "${SRC_GIT_BRANCH}" --single-branch --depth=1 https://github.com/google/or-tools \
64+
&& [[ $(cd or-tools && git rev-parse --verify HEAD) == ${SRC_GIT_SHA1} ]]
65+
WORKDIR /root/or-tools
66+
67+
# C++
68+
## build
69+
FROM devel AS cpp_build
70+
RUN make detect_cpp \
71+
&& make cpp JOBS=8
72+
## archive
73+
FROM cpp_build AS cpp_archive
74+
RUN make archive_cpp
75+
76+
# .Net
77+
## build
78+
FROM cpp_build AS dotnet_build
79+
ENV USE_DOTNET_CORE_31=ON
80+
RUN make detect_dotnet \
81+
&& make dotnet JOBS=8
82+
## archive
83+
FROM dotnet_build AS dotnet_archive
84+
RUN make archive_dotnet
85+
86+
# Java
87+
## build
88+
FROM cpp_build AS java_build
89+
RUN make detect_java \
90+
&& make java JOBS=8
91+
## archive
92+
FROM java_build AS java_archive
93+
RUN make archive_java
94+
95+
# Python
96+
## build
97+
FROM cpp_build AS python_build
98+
RUN make detect_python \
99+
&& make python JOBS=8
100+
## archive
101+
FROM python_build AS python_archive
102+
RUN make archive_python

tools/docker/images/opensuse-leap.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN zypper refresh \
2626
RUN wget -q "https://dot.net/v1/dotnet-install.sh" \
2727
&& chmod a+x dotnet-install.sh \
2828
&& ./dotnet-install.sh -c 3.1 -i /usr/local/bin \
29-
&& ./dotnet-install.sh -c 6.0 -i /usr/local/bin
29+
&& ./dotnet-install.sh -c 8.0 -i /usr/local/bin
3030
# Trigger first run experience by running arbitrary cmd
3131
RUN dotnet --info
3232

tools/docker/images/rockylinux-9.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN dnf -y update \
3333
RUN wget -q "https://dot.net/v1/dotnet-install.sh" \
3434
&& chmod a+x dotnet-install.sh \
3535
&& ./dotnet-install.sh -c 3.1 -i /usr/local/bin \
36-
&& ./dotnet-install.sh -c 6.0 -i /usr/local/bin
36+
&& ./dotnet-install.sh -c 8.0 -i /usr/local/bin
3737
# Trigger first run experience by running arbitrary cmd
3838
RUN dotnet --info
3939

tools/docker/images/ubuntu-20.04.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN apt-get update -qq \
3333
&& wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb \
3434
&& dpkg -i packages-microsoft-prod.deb \
3535
&& apt-get update -qq \
36-
&& apt-get install -yq dotnet-sdk-3.1 dotnet-sdk-6.0 \
36+
&& apt-get install -yq dotnet-sdk-3.1 dotnet-sdk-8.0 \
3737
&& apt-get clean \
3838
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
3939
# Trigger first run experience by running arbitrary cmd

0 commit comments

Comments
 (0)