Skip to content

Commit 2b0085b

Browse files
committed
backport ci/cd/release stuff from main
1 parent 48ace85 commit 2b0085b

36 files changed

+528
-124
lines changed

.bazelignore

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ install_make
44
build_cross
55
dependencies/install
66
dependencies/sources
7+
temp_cpp
8+
temp_dotnet
9+
temp_java
10+
temp_python

.github/workflows/amd64_macos_bazel.yml

-5
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ jobs:
3232
python-version: ${{ matrix.python.version }}
3333
- name: Check Python
3434
run: python --version
35-
- name: Install Bazel
36-
run: |
37-
brew update
38-
brew unlink bazelisk
39-
brew install bazel
4035
- name: Check Bazel
4136
run: bazel version
4237
- name: Build

cmake/docker/centos/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ RUN dnf -y update \
1919
RUN echo "source /opt/rh/gcc-toolset-11/enable" >> /etc/bashrc
2020
SHELL ["/bin/bash", "--login", "-c"]
2121

22-
# Install CMake 3.26.4
23-
RUN wget -q "https://cmake.org/files/v3.26/cmake-3.26.4-linux-x86_64.sh" \
24-
&& chmod a+x cmake-3.26.4-linux-x86_64.sh \
25-
&& ./cmake-3.26.4-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
26-
&& rm cmake-3.26.4-linux-x86_64.sh
22+
# Install CMake 3.28.3
23+
RUN wget -q "https://cmake.org/files/v3.28/cmake-3.28.3-linux-x86_64.sh" \
24+
&& chmod a+x cmake-3.28.3-linux-x86_64.sh \
25+
&& ./cmake-3.28.3-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
26+
&& rm cmake-3.28.3-linux-x86_64.sh
2727
CMD [ "/usr/bin/bash" ]
2828

2929
# Install SWIG 4.2.0

cmake/docker/glop/Dockerfile

+6-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ RUN apt-get update -qq \
77
&& apt-get install -yq git wget libssl-dev build-essential \
88
&& apt-get clean \
99
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
10-
# Install CMake 3.27.7
11-
RUN wget -q "https://cmake.org/files/v3.27/cmake-3.27.7-linux-x86_64.sh" \
12-
&& chmod a+x cmake-3.27.7-linux-x86_64.sh \
13-
&& ./cmake-3.27.7-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
14-
&& rm cmake-3.27.7-linux-x86_64.sh
10+
11+
# Install CMake 3.28.3
12+
RUN wget -q "https://cmake.org/files/v3.28/cmake-3.28.3-linux-x86_64.sh" \
13+
&& chmod a+x cmake-3.28.3-linux-x86_64.sh \
14+
&& ./cmake-3.28.3-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
15+
&& rm cmake-3.28.3-linux-x86_64.sh
1516
CMD [ "/usr/bin/bash" ]
1617

1718
FROM env AS devel

cmake/docker/toolchain/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ RUN apt-get update -qq \
1111
ENTRYPOINT ["/usr/bin/bash", "-c"]
1212
CMD ["/usr/bin/bash"]
1313

14-
# Install CMake 3.25.2
15-
RUN wget "https://cmake.org/files/v3.25/cmake-3.25.2-linux-x86_64.sh" \
16-
&& chmod a+x cmake-3.25.2-linux-x86_64.sh \
17-
&& ./cmake-3.25.2-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
18-
&& rm cmake-3.25.2-linux-x86_64.sh
14+
# Install CMake 3.28.3
15+
RUN wget "https://cmake.org/files/v3.28/cmake-3.28.3-linux-x86_64.sh" \
16+
&& chmod a+x cmake-3.28.3-linux-x86_64.sh \
17+
&& ./cmake-3.28.3-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
18+
&& rm cmake-3.28.3-linux-x86_64.sh
1919

2020
FROM env AS devel
2121
WORKDIR /home/project

cmake/docker/ubuntu/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ RUN apt-get update -qq \
99
&& apt-get clean \
1010
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
1111

12-
# Install CMake 3.25.2
13-
RUN wget -q "https://cmake.org/files/v3.25/cmake-3.25.2-linux-x86_64.sh" \
14-
&& chmod a+x cmake-3.25.2-linux-x86_64.sh \
15-
&& ./cmake-3.25.2-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
16-
&& rm cmake-3.25.2-linux-x86_64.sh
12+
# Install CMake 3.28.3
13+
RUN wget -q "https://cmake.org/files/v3.28/cmake-3.28.3-linux-x86_64.sh" \
14+
&& chmod a+x cmake-3.28.3-linux-x86_64.sh \
15+
&& ./cmake-3.28.3-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
16+
&& rm cmake-3.28.3-linux-x86_64.sh
1717
CMD [ "/usr/bin/bash" ]
1818

1919
FROM base AS swig

makefiles/docker/centos/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ RUN dnf -y update \
2020
RUN echo "source /opt/rh/gcc-toolset-11/enable" >> /etc/bashrc
2121
SHELL ["/bin/bash", "--login", "-c"]
2222

23-
# Install CMake 3.26.4
24-
RUN wget -q "https://cmake.org/files/v3.26/cmake-3.26.4-linux-x86_64.sh" \
25-
&& chmod a+x cmake-3.26.4-linux-x86_64.sh \
26-
&& ./cmake-3.26.4-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
27-
&& rm cmake-3.26.4-linux-x86_64.sh
23+
# Install CMake 3.28.3
24+
RUN wget -q "https://cmake.org/files/v3.28/cmake-3.28.3-linux-x86_64.sh" \
25+
&& chmod a+x cmake-3.28.3-linux-x86_64.sh \
26+
&& ./cmake-3.28.3-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
27+
&& rm cmake-3.28.3-linux-x86_64.sh
2828
CMD [ "/usr/bin/bash" ]
2929

3030
# Install SWIG 4.1.1

makefiles/docker/ubuntu/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ RUN apt-get update -qq \
1010
&& apt-get clean \
1111
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
1212

13-
# Install CMake 3.25.2
14-
RUN wget -q "https://cmake.org/files/v3.25/cmake-3.25.2-linux-x86_64.sh" \
15-
&& chmod a+x cmake-3.25.2-linux-x86_64.sh \
16-
&& ./cmake-3.25.2-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
17-
&& rm cmake-3.25.2-linux-x86_64.sh
13+
# Install CMake 3.28.3
14+
RUN wget -q "https://cmake.org/files/v3.28/cmake-3.28.3-linux-x86_64.sh" \
15+
&& chmod a+x cmake-3.28.3-linux-x86_64.sh \
16+
&& ./cmake-3.28.3-linux-x86_64.sh --prefix=/usr/local/ --skip-license \
17+
&& rm cmake-3.28.3-linux-x86_64.sh
1818
CMD [ "/usr/bin/bash" ]
1919

2020
FROM base AS swig

tools/docker/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ help:
9393
@echo -e "\t\t${BOLD}archlinux${RESET} (latest)"
9494
@echo -e "\t\t${BOLD}centos-7${RESET} (Centos 7 LTS)"
9595
@echo -e "\t\t${BOLD}debian-sid${RESET} (unstable)"
96-
@echo -e "\t\t${BOLD}debian-11${RESET} (bullseye)"
96+
@echo -e "\t\t${BOLD}debian-13${RESET} (Trixie)"
97+
@echo -e "\t\t${BOLD}debian-12${RESET} (Bookworm)"
98+
@echo -e "\t\t${BOLD}debian-11${RESET} (Bullseye)"
9799
# @echo -e "\t\t${BOLD}debian-10${RESET} (buster)"
98-
# @echo -e "\t\t${BOLD}fedora-39${RESET}"
100+
@echo -e "\t\t${BOLD}fedora-39${RESET}"
99101
@echo -e "\t\t${BOLD}fedora-38${RESET}"
100102
@echo -e "\t\t${BOLD}fedora-37${RESET}"
101103
# @echo -e "\t\t${BOLD}opensuse-leap${RESET} (latest)"
@@ -404,8 +406,8 @@ DISTROS := \
404406
alpine-edge \
405407
archlinux \
406408
centos-7 \
407-
debian-11 debian-sid \
408-
fedora-37 fedora-38 \
409+
debian-11 debian-12 debian-13 debian-sid \
410+
fedora-37 fedora-38 fedora-39 \
409411
ubuntu-20.04 ubuntu-22.04 ubuntu-23.04 ubuntu-23.10
410412

411413
# List of stages

tools/docker/images/centos-7.Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ ENTRYPOINT ["/usr/bin/bash", "--login", "-c"]
2424
CMD ["/usr/bin/bash", "--login"]
2525
# RUN g++ --version
2626

27-
# Install CMake v3.26.4
27+
# Install CMake 3.28.3
2828
RUN ARCH=$(uname -m) \
29-
&& wget -q "https://cmake.org/files/v3.26/cmake-3.26.4-linux-${ARCH}.sh" \
30-
&& chmod a+x cmake-3.26.4-linux-${ARCH}.sh \
31-
&& ./cmake-3.26.4-linux-${ARCH}.sh --prefix=/usr/local/ --skip-license \
32-
&& rm cmake-3.26.4-linux-${ARCH}.sh
29+
&& wget -q "https://cmake.org/files/v3.28/cmake-3.28.3-linux-${ARCH}.sh" \
30+
&& chmod a+x cmake-3.28.3-linux-${ARCH}.sh \
31+
&& ./cmake-3.28.3-linux-${ARCH}.sh --prefix=/usr/local/ --skip-license \
32+
&& rm cmake-3.28.3-linux-${ARCH}.sh
3333

3434
# Install Swig 4.1.1
3535
RUN curl --location-trusted \

tools/docker/images/debian-10.Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ RUN apt-get update -qq \
1313
ENTRYPOINT ["/bin/bash", "-c"]
1414
CMD ["/bin/bash"]
1515

16-
# Install CMake v3.26.4
16+
# Install CMake 3.28.3
1717
RUN ARCH=$(uname -m) \
18-
&& wget -q "https://cmake.org/files/v3.26/cmake-3.26.4-linux-${ARCH}.sh" \
19-
&& chmod a+x cmake-3.26.4-linux-${ARCH}.sh \
20-
&& ./cmake-3.26.4-linux-${ARCH}.sh --prefix=/usr/local/ --skip-license \
21-
&& rm cmake-3.26.4-linux-${ARCH}.sh
18+
&& wget -q "https://cmake.org/files/v3.28/cmake-3.28.3-linux-${ARCH}.sh" \
19+
&& chmod a+x cmake-3.28.3-linux-${ARCH}.sh \
20+
&& ./cmake-3.28.3-linux-${ARCH}.sh --prefix=/usr/local/ --skip-license \
21+
&& rm cmake-3.28.3-linux-${ARCH}.sh
2222

2323
# Install .Net
2424
# see https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian#debian-10-

tools/docker/images/debian-11.Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ RUN apt-get update -qq \
1313
ENTRYPOINT ["/bin/bash", "-c"]
1414
CMD ["/bin/bash"]
1515

16-
# Install CMake v3.26.4
16+
# Install CMake 3.28.3
1717
RUN ARCH=$(uname -m) \
18-
&& wget -q "https://cmake.org/files/v3.26/cmake-3.26.4-linux-${ARCH}.sh" \
19-
&& chmod a+x cmake-3.26.4-linux-${ARCH}.sh \
20-
&& ./cmake-3.26.4-linux-${ARCH}.sh --prefix=/usr/local/ --skip-license \
21-
&& rm cmake-3.26.4-linux-${ARCH}.sh
18+
&& wget -q "https://cmake.org/files/v3.28/cmake-3.28.3-linux-${ARCH}.sh" \
19+
&& chmod a+x cmake-3.28.3-linux-${ARCH}.sh \
20+
&& ./cmake-3.28.3-linux-${ARCH}.sh --prefix=/usr/local/ --skip-license \
21+
&& rm cmake-3.28.3-linux-${ARCH}.sh
2222

2323
# Install .Net
2424
# see https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian#debian-11-
+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# ref: https://hub.docker.com/_/debian
2+
FROM debian:12 AS env
3+
4+
#############
5+
## SETUP ##
6+
#############
7+
RUN apt-get update -qq \
8+
&& apt-get install -qq \
9+
git pkg-config wget make autoconf libtool zlib1g-dev gawk g++ curl subversion \
10+
swig lsb-release \
11+
&& apt-get clean \
12+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
13+
ENTRYPOINT ["/bin/bash", "-c"]
14+
CMD ["/bin/bash"]
15+
16+
# Install CMake 3.28.3
17+
RUN ARCH=$(uname -m) \
18+
&& wget -q "https://cmake.org/files/v3.28/cmake-3.28.3-linux-${ARCH}.sh" \
19+
&& chmod a+x cmake-3.28.3-linux-${ARCH}.sh \
20+
&& ./cmake-3.28.3-linux-${ARCH}.sh --prefix=/usr/local/ --skip-license \
21+
&& rm cmake-3.28.3-linux-${ARCH}.sh
22+
23+
# Install .Net
24+
# see https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian#debian-11-
25+
RUN apt-get update -qq \
26+
&& apt-get install -qq gpg apt-transport-https \
27+
&& wget -q "https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb" -O packages-microsoft-prod.deb \
28+
&& dpkg -i packages-microsoft-prod.deb \
29+
&& rm packages-microsoft-prod.deb \
30+
&& apt-get update -qq \
31+
&& apt-get install -qq dotnet-sdk-3.1 dotnet-sdk-6.0 \
32+
&& apt-get clean \
33+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
34+
# Trigger first run experience by running arbitrary cmd
35+
RUN dotnet --info
36+
37+
# Java Install
38+
RUN apt-get update -qq \
39+
&& apt-get install -qq default-jdk maven \
40+
&& apt-get clean \
41+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
42+
ENV JAVA_HOME=/usr/lib/jvm/default-java
43+
44+
# Install Python
45+
RUN apt-get update -qq \
46+
&& apt-get install -qq python3 python3-dev python3-pip python3-venv \
47+
&& apt-get clean \
48+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
49+
RUN python3 -m pip install absl-py mypy mypy-protobuf
50+
51+
ENV TZ=America/Los_Angeles
52+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
53+
54+
################
55+
## OR-TOOLS ##
56+
################
57+
FROM env AS devel
58+
WORKDIR /root
59+
# Copy the snk key
60+
COPY or-tools.snk /root/or-tools.snk
61+
ENV DOTNET_SNK=/root/or-tools.snk
62+
63+
ARG SRC_GIT_BRANCH
64+
ENV SRC_GIT_BRANCH ${SRC_GIT_BRANCH:-main}
65+
ARG SRC_GIT_SHA1
66+
ENV SRC_GIT_SHA1 ${SRC_GIT_SHA1:-unknown}
67+
68+
ARG OR_TOOLS_PATCH
69+
ENV OR_TOOLS_PATCH ${OR_TOOLS_PATCH:-9999}
70+
71+
# Download sources
72+
# use SRC_GIT_SHA1 to modify the command
73+
# i.e. avoid docker reusing the cache when new commit is pushed
74+
SHELL ["/bin/bash", "-c"]
75+
RUN git clone -b "${SRC_GIT_BRANCH}" --single-branch --depth=1 https://github.com/google/or-tools \
76+
&& [[ $(cd or-tools && git rev-parse --verify HEAD) == ${SRC_GIT_SHA1} ]]
77+
WORKDIR /root/or-tools
78+
79+
# C++
80+
## build
81+
FROM devel AS cpp_build
82+
RUN make detect_cpp \
83+
&& make cpp JOBS=8
84+
## archive
85+
FROM cpp_build AS cpp_archive
86+
RUN make archive_cpp
87+
88+
# .Net
89+
## build
90+
FROM cpp_build AS dotnet_build
91+
ENV USE_DOTNET_CORE_31=ON
92+
RUN make detect_dotnet \
93+
&& make dotnet JOBS=8
94+
## archive
95+
FROM dotnet_build AS dotnet_archive
96+
RUN make archive_dotnet
97+
98+
# Java
99+
## build
100+
FROM cpp_build AS java_build
101+
RUN make detect_java \
102+
&& make java JOBS=8
103+
## archive
104+
FROM java_build AS java_archive
105+
RUN make archive_java
106+
107+
# Python
108+
## build
109+
FROM cpp_build AS python_build
110+
RUN make detect_python \
111+
&& make python JOBS=8
112+
## archive
113+
FROM python_build AS python_archive
114+
RUN make archive_python

0 commit comments

Comments
 (0)