chore(ci): drop support for py3.8

This commit is contained in:
youben11
2025-04-25 16:19:35 +01:00
parent 56e73c1697
commit b186641c58
11 changed files with 31 additions and 59 deletions

View File

@@ -60,7 +60,7 @@ jobs:
run: |
set -e
export PYTHON=python
export PYTHON=python3.10
cd /concrete/frontends/concrete-python
make PYTHON=$PYTHON venv

View File

@@ -61,7 +61,7 @@ jobs:
build-linux-x86:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
hw: ["cpu", "gpu"]
needs: setup-instance
runs-on: ${{ needs.setup-instance.outputs.runner-name }}
@@ -249,7 +249,7 @@ jobs:
needs: check-duplicate-nightly
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ["aws-mac1-metal", "aws-mac2-metal"]
runs-on: ${{ matrix.runs-on }}
steps:
@@ -280,9 +280,6 @@ jobs:
cat frontends/concrete-python/version.txt >> frontends/concrete-python/concrete/fhe/version.py
- name: Build wheel
run: |
# Hack for mac2 host...
export PATH=$PATH:/Users/ec2-user/.cargo/bin:/Users/ec2-user/.pyenv/versions/3.8.20/bin
CONCRETE_PYTHON=$(pwd)/frontends/concrete-python
CONCRETE_COMPILER=$(pwd)/compilers/concrete-compiler/compiler
export COMPILER_BUILD_DIRECTORY=$CONCRETE_COMPILER/build
@@ -472,7 +469,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ needs.setup-instance.outputs.runner-name }}
steps:
# HOME is needed by actions-rs/toolchain
@@ -577,7 +574,7 @@ jobs:
test-linux-x86-gpu:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
fail-fast: false
needs: [setup-gpu-test-instance, build-linux-x86]
runs-on: ${{ needs.setup-gpu-test-instance.outputs.runner-name }}
@@ -662,7 +659,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ["aws-mac1-metal", "aws-mac2-metal"]
runs-on: ${{ matrix.runs-on }}
outputs:

View File

@@ -58,8 +58,12 @@ jobs:
runs-on: ${{ needs.setup-instance.outputs.runner-name }}
strategy:
matrix:
# we will use 3.8 for tests, and 3.10 for docs checking (3.8 doesn't work for now, TODO reactivate)
python-version: ["3.10"]
# we will use 3.9 for tests, and 3.10 for docs checking
include:
- python-version: "3.9"
python-executable: "/opt/python/cp39-cp39/bin/python"
- python-version: "3.10"
python-executable: "/opt/python/cp310-cp310/bin/python"
steps:
- name: Checkout concrete
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -69,41 +73,7 @@ jobs:
- name: Create concrete build directory
run: mkdir build
- name: Build concrete-compiler python bindings (3.8)
if: ${{ matrix.python-version == '3.8' }}
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
with:
registry: ghcr.io
image: ${{ env.DOCKER_IMAGE_TEST }}
username: ${{ secrets.GHCR_LOGIN }}
password: ${{ secrets.GHCR_PASSWORD }}
options: >-
-v ${{ github.workspace }}:/concrete
-v ${{ github.workspace }}/build:/build
shell: bash
run: |
set -e
cd /concrete/frontends/concrete-python
make venv
source .venv/bin/activate
cd /concrete/compilers/concrete-compiler/compiler
make BUILD_DIR=/build DATAFLOW_EXECUTION_ENABLED=ON CCACHE=ON Python3_EXECUTABLE=$(which python) python-bindings
echo "Debug: ccache statistics (after the build):"
ccache -s
for f in $(find /build/tools/concretelang/python_packages/concretelang_core/ -type l);
do
cp --remove-destination $(readlink -e $f) $f
done
cd /concrete/frontends/concrete-python
export COMPILER_BUILD_DIRECTORY="/build"
make whl
- name: Build concrete-compiler python bindings (3.10)
if: ${{ matrix.python-version == '3.10' }}
- name: Build concrete-compiler python bindings
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
with:
registry: ghcr.io
@@ -121,7 +91,7 @@ jobs:
ccache -p
cd /concrete/frontends/concrete-python
make PYTHON=/opt/python/cp310-cp310/bin/python venv
make PYTHON=${{ matrix.python-executable }} venv
source .venv/bin/activate
python -m pip install -r /concrete/third_party/llvm-project/mlir/python/requirements.txt
@@ -211,7 +181,8 @@ jobs:
needs: [setup-instance, build-python-bindings]
runs-on: ${{ needs.setup-instance.outputs.runner-name }}
env:
python-version: "3.8"
python-version: "3.9"
python-executable: "/opt/python/cp39-cp39/bin/python"
steps:
- name: Checkout concrete
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -238,7 +209,7 @@ jobs:
set -e
export COMPILER_BUILD_DIRECTORY=/compiler-artifacts
cd /concrete/frontends/concrete-python
make venv
make PYTHON=${{ env.python-executable }} venv
source .venv/bin/activate
export KEY_CACHE_DIRECTORY=./key-set-cache
mkdir $KEY_CACHE_DIRECTORY
@@ -254,6 +225,9 @@ jobs:
test-notebooks:
needs: [setup-instance, build-python-bindings]
runs-on: ${{ needs.setup-instance.outputs.runner-name }}
env:
python-version: "3.9"
python-executable: "/opt/python/cp39-cp39/bin/python"
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -263,7 +237,7 @@ jobs:
- name: Download concrete-compiler python-bindings
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: concrete-compiler-python-bindings-3.8
name: concrete-compiler-python-bindings-${{ env.python-version }}
path: compiler-artifacts
- name: Run pytest
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
@@ -280,7 +254,7 @@ jobs:
set -e
export COMPILER_BUILD_DIRECTORY=/compiler-artifacts
cd /concrete/frontends/concrete-python
make venv
make PYTHON=${{ env.python-executable }} venv
source .venv/bin/activate
make test-notebooks
- name: Slack Notification

View File

@@ -60,7 +60,7 @@ Concrete is a versatile library that can be used for a variety of purposes. For
## Getting Started
### System Requirements
- Python 3.8 - 3.12
- Python 3.9 - 3.12
- 8GB RAM minimum (16GB recommended)
- x86_64 or ARM64 processor
@@ -93,6 +93,7 @@ docker pull zamafhe/concrete-python:v2.0.0-gpu
| Concrete Version | Python Version | CUDA Support |
|-----------------|----------------|--------------|
| 2.11.0 | 3.9 - 3.12 | ≥ 11.8 |
| 2.0.0 | 3.8 - 3.12 | ≥ 11.8 |
| 1.1.0 | 3.8 - 3.10 | ≥ 11.7 |

View File

@@ -147,7 +147,7 @@ You can create a tarball containing libs, bins, and include files for the tools
> The wheel built in the following steps is for `concrete-compiler` (which doesn't have the frontend layer) and not `concrete-python`. If you are interested in the `concrete-python` package, then you should build it from [here](https://github.com/zama-ai/concrete/tree/main/frontends/concrete-python) instead.
Currently supported platforms:
- Linux x86_64 for python 3.8, 3.9, 3.10, and 3.11
- Linux x86_64 for python 3.9, 3.10, 3.11, and 3.12
pybind11 is required to build the python package, you can install it in your current environment with:

View File

@@ -48,7 +48,7 @@ RUN mkdir /boost/ && \
rm -rf /boost
# Set the python path. Options: [cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310, ...]
# Links and env would be available to use the appropriate python version
ARG python_tag=cp38-cp38
ARG python_tag=cp39-cp39
RUN ln -s /opt/python/${python_tag}/bin/pip /bin/pip && ln -s /opt/python/${python_tag}/bin/python /bin/python
ENV PYTHON_EXEC=/opt/python/${python_tag}/bin/python
# Install python deps

View File

@@ -9,7 +9,7 @@ This document explains the most common errors and provides solutions to fix them
**Cause**: The installation does not work fine for you.
**Possible solutions**:
- Be sure that you use a supported Python version (currently from 3.8 to 3.12, included).
- Be sure that you use a supported Python version (currently from 3.9 to 3.12, included).
- Check that you have done `pip install -U pip wheel setuptools` before.
- Consider adding a `--extra-index-url https://pypi.zama.ai/cpu` or `--extra-index-url https://pypi.zama.ai/gpu`, depending on whether you want the CPU or the GPU wheel.
- Concrete requires glibc>=2.28, be sure to have a sufficiently recent version.

View File

@@ -2,7 +2,7 @@
This document explains the steps to install **Concrete** into your project.
**Concrete** is natively supported on Linux and macOS from Python 3.8 to 3.12 inclusive. If you have Docker in your platform, you can use the docker image to use **Concrete**.
**Concrete** is natively supported on Linux and macOS from Python 3.9 to 3.12 inclusive. If you have Docker in your platform, you can use the docker image to use **Concrete**.
## Using PyPI

View File

@@ -88,7 +88,7 @@ persistent=yes
# Minimum Python version to use for version dependent checks. Will default to
# the version used to run pylint.
py-version=3.8
py-version=3.9
# Discover python modules and packages in the file system subtree.
recursive=no

View File

@@ -1,4 +1,4 @@
target-version = "py38"
target-version = "py39"
line-length = 100
select = [
"F", "E", "W", "C90", "I", "UP", "N", "YTT", "S", "BLE", "FBT", "B", "C4",

View File

@@ -69,7 +69,7 @@ setuptools.setup(
long_description=read("../../README.md"),
long_description_content_type="text/markdown",
python_requires=">=3.8",
python_requires=">=3.9",
setup_requires=["wheel"],
install_requires=read_requirements("requirements.txt"),
extras_require={