Add & fix CI (#60)

This commit is contained in:
Jean-Philippe Bossuat
2025-08-08 19:59:29 +02:00
committed by GitHub
parent 5d0d545f6a
commit 4c59733566
3 changed files with 25 additions and 49 deletions

View File

@@ -2,62 +2,36 @@ name: CI
on:
push:
branches: [ main ]
pull_request:
env:
CARGO_TERM_COLOR: always
branches: [ main ]
jobs:
build-and-test:
name: Build & Test (stable, beta, nightly)
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [stable, beta, nightly]
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: actions/setup-rust@v1
- name: Checkout code
uses: actions/checkout@v4
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
submodules: recursive
- name: Cache cargo registry
uses: actions/cache@v3
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cargo fmt check
run: cargo fmt --all -- --check
${{ runner.os }}-cargo-
- name: Build
run: cargo build --all-targets --verbose
run: cargo build --all-targets
- name: Run tests
run: cargo test --all-targets --verbose
- name: Run Clippy
run: cargo clippy --all-targets -- -D warnings
docs:
name: Check Documentation
runs-on: ubuntu-latest
needs: build-and-test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-rust@v1
with:
toolchain: stable
- name: Build docs
run: cargo doc --all --no-deps --verbose
run: cargo test --all

View File

@@ -4,6 +4,8 @@
<img src="poulpy.png" />
</p>
[![CI](https://github.com/phantomzone-org/poulpy/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/phantomzone-org/poulpy/actions/workflows/ci.yml)
**Poulpy** is a fast & modular FHE library that implements Ring-Learning-With-Errors based homomorphic encryption. It adopts the bivariate polynomial representation proposed in [Revisiting Key Decomposition Techniques for FHE: Simpler, Faster and More Generic](https://eprint.iacr.org/2023/771). In addition to simpler and more efficient arithmetic than the residue number system (RNS), this representation provides a common plaintext space for all schemes and allows easy switching between any two schemes. Poulpy also decouples the schemes implementations from the polynomial arithmetic backend by being built around a hardware abstraction layer (HAL). This enables user to easily provide or use a custom backend.
### Bivariate Polynomial Representation

View File

@@ -1,7 +1,7 @@
use std::path::PathBuf;
pub fn build() {
let dst: PathBuf = cmake::Config::new("src/implementation/cpu_spqlios/spqlios-arithmetic").build();
let dst: PathBuf = cmake::Config::new("src/implementation/cpu_spqlios/spqlios-arithmetic").define("ENABLE_TESTING", "FALSE").build();
let lib_dir: PathBuf = dst.join("lib");