Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Use a C++20 compliant devtoolset on Linux #1521

Closed
wants to merge 11 commits into from
35 changes: 24 additions & 11 deletions build_tooling/build_many_linux_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [[ -z "$manylinux_image" ]] ; then
v${cibuildwheel_ver:?'Must set either manylinux_image or cibuildwheel_ver environment variable'}

url="https://github.com/pypa/cibuildwheel/raw/v${cibuildwheel_ver}/cibuildwheel/resources/pinned_docker_images.cfg"
manylinux_image=$(curl -sL "$url" | awk "/${image_grep:-manylinux2014_x86_64}/ { print \$3 ; exit }" )
manylinux_image=$(curl -sL "$url" | awk "/${image_grep:-manylinux_2_28_x86_64}/ { print \$3 ; exit }" )
if [[ -z "$manylinux_image" ]] ; then
echo "Failed to parse source image from cibuildwheel repo: ${url}" >&2
exit 1
Expand Down Expand Up @@ -37,17 +37,30 @@ chmod 555 sccache

echo "
FROM $manylinux_image
RUN rpmkeys --import 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF' && \
curl https://download.mono-project.com/repo/centos7-stable.repo > /etc/yum.repos.d/mono-centos7-stable.repo && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://olcentgbl.trafficmanager.net|' /etc/yum.repos.d/CentOS-Base.repo && \
sed -ir 's/socket_timeout=3/socket_timeout=1/ ; s/maxhostfileage.*/maxhostfileage=1/ ;\
s/#?exclude.*/exclude=.edu/' /etc/yum/pluginconf.d/fastestmirror.conf
ADD sccache /usr/local/bin/
RUN rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
RUN yum update -y && \
yum install -y zip jq less devtoolset-11-gdb \
openssl-devel cyrus-sasl-devel devtoolset-10-libatomic-devel libcurl-devel python3-devel flex && \
rpm -Uvh --nodeps \$(repoquery --location mono-{core,web,devel,data,wcf,winfx}) && \
yum clean all && touch /etc/arcticdb_deps_installed
yum install -y \
zip \
jq \
less \
gcc-toolset-13-gdb \
openssl-devel \
cyrus-sasl-devel \
gcc-toolset-13-libatomic-devel \
libcurl-devel \
python3-devel \
flex \
ninja-build && \
yum clean all &&\
touch /etc/arcticdb_deps_installed

ENV CMAKE_C_COMPILER=/opt/rh/gcc-toolset-13/root/usr/bin/gcc
ENV CMAKE_CXX_COMPILER=/opt/rh/gcc-toolset-13/root/usr/bin/g++
ENV CC=/opt/rh/gcc-toolset-13/root/usr/bin/gcc
ENV CXX=/opt/rh/gcc-toolset-13/root/usr/bin/g++
ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-13/root/usr/lib64:/opt/rh/gcc-toolset-13/root/usr/lib:$LD_LIBRARY_PATH
ENV PATH=/opt/rh/gcc-toolset-13/root/usr/bin:$PATH

LABEL io.arcticdb.cibw_ver=\"${cibuildwheel_ver}\" io.arcticdb.base=\"${manylinux_image}\"
" > Dockerfile

Expand Down
Loading