mirror of
https://github.com/zama-ai/concrete.git
synced 2026-01-10 05:18:00 -05:00
fix(ci/docs): use python3.10 for API docs checking
This commit is contained in:
committed by
Quentin Bourgerie
parent
d5ad490ac9
commit
ac7ec70f53
@@ -147,7 +147,7 @@ jobs:
|
||||
release-checks:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.8"]
|
||||
python-version: ["3.10"]
|
||||
needs: [ build-linux-x86 ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -56,6 +56,10 @@ jobs:
|
||||
build-python-bindings:
|
||||
needs: setup-instance
|
||||
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)
|
||||
python-version: ["3.8", "3.10"]
|
||||
steps:
|
||||
- name: Checkout concrete
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
@@ -65,7 +69,8 @@ jobs:
|
||||
- name: Create concrete build directory
|
||||
run: mkdir build
|
||||
|
||||
- name: Build concrete-compiler python bindings
|
||||
- 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
|
||||
@@ -97,13 +102,53 @@ jobs:
|
||||
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' }}
|
||||
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
|
||||
|
||||
rustup toolchain install nightly-2024-09-30
|
||||
dnf -y install graphviz graphviz-devel
|
||||
|
||||
cd /concrete/frontends/concrete-python
|
||||
make PYTHON=/opt/python/cp310-cp310/bin/python venv
|
||||
source .venv/bin/activate
|
||||
|
||||
python -m pip install -r /concrete/third_party/llvm-project/mlir/python/requirements.txt
|
||||
python -m pip install -r /concrete/compilers/concrete-compiler/compiler/lib/Bindings/Python/requirements_dev.txt
|
||||
python -m pip install wheel auditwheel
|
||||
|
||||
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: Upload concrete-compiler python-bindings
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
with:
|
||||
name: concrete-compiler-python-bindings
|
||||
name: concrete-compiler-python-bindings-${{ matrix.python-version }}
|
||||
include-hidden-files: true
|
||||
retention-days: 3
|
||||
path: |
|
||||
@@ -112,7 +157,7 @@ jobs:
|
||||
- name: Upload wheel
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
with:
|
||||
name: concrete-python-wheel
|
||||
name: concrete-python-wheel-${{ matrix.python-version }}
|
||||
path: frontends/concrete-python/dist/*manylinux*.whl
|
||||
retention-days: 3
|
||||
- name: Slack Notification
|
||||
@@ -121,13 +166,13 @@ jobs:
|
||||
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990
|
||||
env:
|
||||
SLACK_COLOR: ${{ job.status }}
|
||||
SLACK_MESSAGE: "build-python-bindings finished with status: ${{ job.status }}. (${{ env.ACTION_RUN_URL }})"
|
||||
SLACK_MESSAGE: "build-python-bindings(${{ matrix.python-version }}) finished with status: ${{ job.status }}. (${{ env.ACTION_RUN_URL }})"
|
||||
|
||||
test-apidoc-up-to-date:
|
||||
needs: [build-python-bindings]
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
python-version: "3.8"
|
||||
python-version: "3.10"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
@@ -141,7 +186,7 @@ jobs:
|
||||
- name: Download concrete-compiler python-bindings
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
with:
|
||||
name: concrete-python-wheel
|
||||
name: concrete-python-wheel-${{ env.python-version }}
|
||||
path: wheel
|
||||
- name: Check documentation
|
||||
run: |
|
||||
@@ -168,11 +213,13 @@ jobs:
|
||||
test-pytest:
|
||||
needs: [setup-instance, build-python-bindings]
|
||||
runs-on: ${{ needs.setup-instance.outputs.runner-name }}
|
||||
env:
|
||||
python-version: "3.8"
|
||||
steps:
|
||||
- name: Download concrete-compiler python-bindings
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
with:
|
||||
name: concrete-compiler-python-bindings
|
||||
name: concrete-compiler-python-bindings-${{ env.python-version }}
|
||||
path: compiler-artifacts
|
||||
- name: Run pytest
|
||||
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
|
||||
@@ -189,6 +236,7 @@ jobs:
|
||||
set -e
|
||||
export COMPILER_BUILD_DIRECTORY=/compiler-artifacts
|
||||
cd /concrete/frontends/concrete-python
|
||||
make venv
|
||||
source .venv/bin/activate
|
||||
export KEY_CACHE_DIRECTORY=./key-set-cache
|
||||
mkdir $KEY_CACHE_DIRECTORY
|
||||
@@ -208,7 +256,7 @@ jobs:
|
||||
- name: Download concrete-compiler python-bindings
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
with:
|
||||
name: concrete-compiler-python-bindings
|
||||
name: concrete-compiler-python-bindings-3.8
|
||||
path: compiler-artifacts
|
||||
- name: Run pytest
|
||||
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
|
||||
@@ -225,6 +273,7 @@ jobs:
|
||||
set -e
|
||||
export COMPILER_BUILD_DIRECTORY=/compiler-artifacts
|
||||
cd /concrete/frontends/concrete-python
|
||||
make venv
|
||||
source .venv/bin/activate
|
||||
make test-notebooks
|
||||
- name: Slack Notification
|
||||
|
||||
Reference in New Issue
Block a user