ci/release: upgrade python packages release image to gcc-7.5.0

This commit is contained in:
Antoniu Pop
2022-01-14 23:18:43 +00:00
committed by Antoniu Pop
parent 8847e82203
commit 25116ec979
3 changed files with 51 additions and 32 deletions

View File

@@ -11,7 +11,7 @@ on:
# DOCKER_IMAGE variables aren't used in BuildAndPushDockerImages because of https://github.com/actions/runner/issues/480
env:
DOCKER_IMAGE_TEST: ghcr.io/zama-ai/concrete-compiler
DOCKER_IMAGE_TEST_GCC6: ghcr.io/zama-ai/concrete-compiler-gcc6
DOCKER_IMAGE_TEST_GCC7: ghcr.io/zama-ai/concrete-compiler-gcc7
DOCKER_IMAGE_TEST_DF: ghcr.io/zama-ai/concrete-compiler-df
jobs:
@@ -39,14 +39,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc6, latest]
compiler: [gcc7, latest]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: "KeySetCache"
if: ${{ matrix.compiler == 'gcc6' }}
if: ${{ matrix.compiler == 'gcc7' }}
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/KeySetCache
@@ -56,12 +56,12 @@ jobs:
${{ runner.os }}-KeySetCache-
- name: Build and test compiler
if: ${{ matrix.compiler == 'gcc6' }}
if: ${{ matrix.compiler == 'gcc7' }}
id: build-compiler
uses: addnab/docker-run-action@v3
with:
registry: ghcr.io
image: ${{ env.DOCKER_IMAGE_TEST_GCC6 }}
image: ${{ env.DOCKER_IMAGE_TEST_GCC7 }}
username: ${{ secrets.GHCR_LOGIN }}
password: ${{ secrets.GHCR_PASSWORD }}
options: -v ${{ github.workspace }}/compiler:/compiler -v ${{ github.workspace }}/build:/build -v ${{ github.workspace }}/KeySetCache:/tmp/KeySetCache
@@ -73,7 +73,7 @@ jobs:
cd /compiler
/opt/python/cp38-cp38/bin/pip install pytest
sed "s/pytest/\/opt\/python\/cp38-cp38\/bin\/python -m pytest/g" -i Makefile
make CCACHE=ON Python3_EXECUTABLE=/opt/python/cp38-cp38/bin/python BUILD_DIR=/build test doc
make CXX_COMPILER=/usr/local/bin/g++-7.5.0 CC_COMPILER=/usr/local/bin/gcc-7.5.0 CCACHE=ON Python3_EXECUTABLE=/opt/python/cp38-cp38/bin/python BUILD_DIR=/build test doc
echo "Debug: ccache statistics (after the build):"
ccache -s
chmod -R ugo+rwx /tmp/KeySetCache
@@ -105,7 +105,7 @@ jobs:
uses: addnab/docker-run-action@v3
with:
registry: ghcr.io
image: ${{ env.DOCKER_IMAGE_TEST_GCC6 }}
image: ${{ env.DOCKER_IMAGE_TEST_GCC7 }}
username: ${{ secrets.GHCR_LOGIN }}
password: ${{ secrets.GHCR_PASSWORD }}
options: -v ${{ github.workspace }}/compiler:/compiler -v ${{ github.workspace }}/docs:/docs -v ${{ github.workspace }}/build:/compiler/build
@@ -515,9 +515,9 @@ jobs:
- name: test-env
image: ghcr.io/zama-ai/concrete-compiler
dockerfile: builders/Dockerfile.concrete-compiler-env
- name: test-env-gcc6
image: ghcr.io/zama-ai/concrete-compiler-gcc6
dockerfile: builders/Dockerfile.concrete-compiler-gcc6-env
- name: test-env-gcc7
image: ghcr.io/zama-ai/concrete-compiler-gcc7
dockerfile: builders/Dockerfile.concrete-compiler-gcc7-env
- name: test-df
image: ghcr.io/zama-ai/concrete-compiler-df
dockerfile: builders/Dockerfile.concrete-compiler-df-env

View File

@@ -1,22 +0,0 @@
FROM quay.io/pypa/manylinux_2_24_x86_64
RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y build-essential ninja-build ccache
# setup ccache with an unlimited amount of files and storage
RUN ccache -M 0
RUN ccache -F 0
# Set the python path. Options: [cp38-cp38, cp39-cp39, cp310-cp310]
ARG python_tag=cp38-cp38
# Install python deps
RUN /opt/python/${python_tag}/bin/pip install numpy pybind11==2.6.2 PyYAML
# Setup LLVM
COPY /llvm-project /llvm-project
# Setup Concrete
COPY --from=ghcr.io/zama-ai/concrete-api-env:latest /target/release /concrete/target/release
ENV CONCRETE_PROJECT=/concrete
# Setup and build compiler
COPY /compiler /compiler
WORKDIR /compiler
RUN mkdir -p /build
RUN make BUILD_DIR=/build Python3_EXECUTABLE=/opt/python/${python_tag}/bin/python CCACHE=ON python-bindings concretecompiler
ENV PATH "$PATH:/build/bin"

View File

@@ -0,0 +1,41 @@
FROM quay.io/pypa/manylinux_2_24_x86_64
RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y build-essential ninja-build ccache
# setup ccache with an unlimited amount of files and storage
RUN ccache -M 0
RUN ccache -F 0
# Set the python path. Options: [cp38-cp38, cp39-cp39, cp310-cp310]
ARG python_tag=cp38-cp38
# Install python deps
RUN /opt/python/${python_tag}/bin/pip install numpy pybind11==2.6.2 PyYAML
# Build GCC-7.5.0
RUN curl -L https://mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-7.5.0/gcc-7.5.0.tar.gz --output gcc750.tar.gz && tar xzf gcc750.tar.gz && rm -f gcc750.tar.gz
ENV GCC750=$PWD/gcc-7.5.0
RUN curl -L https://mirrorservice.org/sites/sourceware.org/pub/gcc/infrastructure/gmp-6.2.1.tar.bz2 --output gmp.tar.bz2 && tar xjf gmp.tar.bz2
RUN mv gmp-6.2.1 ${GCC750}/gmp && rm -f gmp.tar.bz2
RUN curl -L https://mirrorservice.org/sites/sourceware.org/pub/gcc/infrastructure/mpc-1.2.1.tar.gz --output mpc.tar.gz && tar xzf mpc.tar.gz
RUN mv mpc-1.2.1 ${GCC750}/mpc && rm -f mpc.tar.gz
RUN curl -L https://mirrorservice.org/sites/sourceware.org/pub/gcc/infrastructure/mpfr-4.1.0.tar.bz2 --output mpfr.tar.bz2 && tar xjf mpfr.tar.bz2
RUN mv mpfr-4.1.0 ${GCC750}/mpfr && rm -f mpfr.tar.bz2
RUN curl -L https://mirrorservice.org/sites/sourceware.org/pub/gcc/infrastructure/isl-0.24.tar.bz2 --output isl.tar.bz2 && tar xjf isl.tar.bz2
RUN mv isl-0.24 ${GCC750}/isl && rm -f isl-0.24.tar.bz2
RUN mkdir ${GCC750}/build
RUN cd ${GCC750}/build && ../configure --disable-bootstrap --disable-multilib --program-suffix=-7.5.0 && make -j4 && make install
ENV PATH=/usr/local/bin:$PATH
ENV LD_LIBRARY_PATH=/usr/local/lib/:/usr/local/lib64/:$LD_LIBRARY_PATH
ENV CC=/usr/local/bin/gcc-7.5.0
ENV CXX=/usr/local/bin/g++-7.5.0
# Setup LLVM
COPY /llvm-project /llvm-project
# Setup Concrete
COPY --from=ghcr.io/zama-ai/concrete-api-env:latest /target/release /concrete/target/release
ENV CONCRETE_PROJECT=/concrete
# Setup and build compiler
COPY /compiler /compiler
WORKDIR /compiler
RUN mkdir -p /build
RUN make -e CXX_COMPILER=/usr/local/bin/g++-7.5.0 CC_COMPILER=/usr/local/bin/gcc-7.5.0 BUILD_DIR=/build Python3_EXECUTABLE=/opt/python/${python_tag}/bin/python CCACHE=ON python-bindings concretecompiler
ENV PATH "$PATH:/build/bin"