mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 03:55:04 -05:00
ci(perf) : build gcc7.5 in separate image.
This commit is contained in:
28
.github/workflows/continuous-integration.yml
vendored
28
.github/workflows/continuous-integration.yml
vendored
@@ -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 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
|
||||
make CXX_COMPILER=/gcc7/bin/g++-7.5.0 CC_COMPILER=/gcc7/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
|
||||
@@ -547,7 +547,6 @@ jobs:
|
||||
docker image push ${{ matrix.image }}:${{ github.ref_name }}
|
||||
|
||||
BuildAndPublishHPXDockerImage:
|
||||
needs: [BuildAndTest]
|
||||
name: Build & Publish HPX Docker Image
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
@@ -571,3 +570,28 @@ jobs:
|
||||
run: |
|
||||
docker build -t $IMAGE -f builders/Dockerfile.hpx-env .
|
||||
docker push $IMAGE:latest
|
||||
|
||||
BuildAndPublishGCC7DockerImage:
|
||||
name: Build & Publish GCC7 Docker Image
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
IMAGE: ghcr.io/zama-ai/gcc7
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v2.0.0
|
||||
|
||||
- name: Login
|
||||
if: contains(steps.changed-files.outputs.modified_files, 'builders/Dockerfile.gcc7-env')
|
||||
run: echo "${{ secrets.GHCR_PASSWORD }}" | docker login -u ${{ secrets.GHCR_LOGIN }} --password-stdin ghcr.io
|
||||
|
||||
- name: Build Tag and Publish
|
||||
if: contains(steps.changed-files.outputs.modified_files, 'builders/Dockerfile.gcc7-env')
|
||||
run: |
|
||||
docker build -t $IMAGE -f builders/Dockerfile.gcc7-env .
|
||||
docker push $IMAGE:latest
|
||||
|
||||
@@ -10,23 +10,12 @@ 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 gcc7
|
||||
COPY --from=ghcr.io/zama-ai/gcc7:latest /gcc7 /gcc7
|
||||
ENV PATH=/gcc7/bin:$PATH
|
||||
ENV LD_LIBRARY_PATH=/gcc7/lib/:/gcc7/lib64/:$LD_LIBRARY_PATH
|
||||
ENV CC=/gcc7/bin/gcc-7.5.0
|
||||
ENV CXX=/gcc7/bin/g++-7.5.0
|
||||
|
||||
# Setup LLVM
|
||||
COPY /llvm-project /llvm-project
|
||||
@@ -37,5 +26,5 @@ ENV CONCRETE_PROJECT=/concrete
|
||||
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
|
||||
RUN make -e CXX_COMPILER=$CXX CC_COMPILER=$CC BUILD_DIR=/build Python3_EXECUTABLE=/opt/python/${python_tag}/bin/python CCACHE=ON python-bindings concretecompiler
|
||||
ENV PATH "$PATH:/build/bin"
|
||||
|
||||
21
builders/Dockerfile.gcc7-env
Normal file
21
builders/Dockerfile.gcc7-env
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM quay.io/pypa/manylinux_2_24_x86_64
|
||||
|
||||
RUN apt-get update
|
||||
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y build-essential
|
||||
|
||||
# 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 --prefix=/gcc7 && make -j4 && make install
|
||||
|
||||
FROM quay.io/pypa/manylinux_2_24_x86_64
|
||||
COPY --from=0 /gcc7/ /gcc7/
|
||||
Reference in New Issue
Block a user