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

Test new docker img #1938

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: ./.github/workflows/cibw_docker_image.yml
permissions: {packages: write}
with:
cibuildwheel_ver: "2.12.1"
cibuildwheel_ver: "2.21.3"
force_update: false

common_config:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/build_container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Docker Container Build
on:
workflow_dispatch:
pull_request:
branches:
- master

jobs:
build:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Choose image tag
run: |
sha=$(git rev-parse --short HEAD)
image_ver="$(date '+%Y%m%d')-${sha}"
image_name="ghcr.io/man-group/arcticdb-container"
echo -e "image_ver=$image_ver\nimage_name=$image_name\noutput_tag=$image_name:$image_ver" | tee -a $GITHUB_ENV

- name: Build Docker image
run: |
docker build -t $image_name . -f docker/Dockerfile

- name: Publish Docker image to GHCR
# if: startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master'
run: |
docker login ghcr.io -u token -p "${{secrets.GITHUB_TOKEN}}"
docker tag $image_name $image_name:$image_ver
docker push $image_name:$image_ver
29 changes: 18 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,24 @@ 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

RUN dnf update -y
RUN dnf install -y python3.11 python3.11-devel python3.11-pip curl wget zip unzip tar perl-IPC-Cmd \
flex krb5-devel cyrus-sasl-devel epel-release libcurl-devel

RUN rpm --import https://download.mono-project.com/repo/xamarin.gpg
RUN dnf config-manager --add-repo https://download.mono-project.com/repo/centos8-stable.repo
RUN dnf install -y mono-complete

RUN dnf clean all

RUN export CMAKE_C_COMPILER=/opt/rh/gcc-toolset-12/root/bin/gcc
RUN export CMAKE_CXX_COMPILER=/opt/rh/gcc-toolset-12/root/bin/g++
RUN export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib:/opt/rh/gcc-toolset-12/root/usr/lib64/dyninst:${LD_LIBRARY_PATH}
RUN export PATH=/opt/rh/gcc-toolset-12/root/usr/bin:${PATH}

ADD sccache /usr/local/bin/
RUN yum update -y && \
yum install -y zip jq less devtoolset-11-gdb perl-IPC-Cmd \
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

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

Expand Down
4 changes: 3 additions & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ else()
if(${ARCTICDB_USING_CONDA})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
# DO NOT MERGE THIS
# This is just temprorary until we fix all warnings
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb")
if(DEFINED ENV{ARCTICDB_CODE_COVERAGE_BUILD})
Expand Down
25 changes: 25 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM quay.io/pypa/manylinux_2_28_x86_64

RUN dnf update -y
RUN dnf install -y python3.11 python3.11-devel python3.11-pip curl wget zip unzip tar perl-IPC-Cmd \
flex krb5-devel cyrus-sasl-devel epel-release libcurl-devel

RUN rpm --import https://download.mono-project.com/repo/xamarin.gpg
RUN dnf config-manager --add-repo https://download.mono-project.com/repo/centos8-stable.repo
RUN dnf install -y mono-complete

RUN dnf clean all

RUN export CMAKE_C_COMPILER=/opt/rh/gcc-toolset-12/root/bin/gcc
RUN export CMAKE_CXX_COMPILER=/opt/rh/gcc-toolset-12/root/bin/g++
RUN export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib:/opt/rh/gcc-toolset-12/root/usr/lib64/dyninst:${LD_LIBRARY_PATH}
RUN export PATH=/opt/rh/gcc-toolset-12/root/usr/bin:${PATH}

RUN wget -nv https://github.com/mozilla/sccache/releases/download/v0.8.2/sccache-v0.8.2-x86_64-unknown-linux-musl.tar.gz
RUN tar xvf sccache*.tar.gz
RUN mv sccache-*/sccache .
RUN chmod 555 sccache

RUN cp sccache /usr/local/bin/

WORKDIR /root
Loading