diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d9ef63..f96cc5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive - - name: Install toolchain - uses: actions/setup-rust@v1 - with: - toolchain: ${{ matrix.toolchain }} - components: clippy + - name: Install Rust nightly + uses: dtolnay/rust-toolchain@nightly - - name: Cache cargo registry - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-registry- + - name: Cache cargo dependencies + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- - - name: Cargo fmt check - run: cargo fmt --all -- --check + - name: Build + run: cargo build --all-targets - - name: Build - run: cargo build --all-targets --verbose - - - 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 \ No newline at end of file + - name: Run tests + run: cargo test --all \ No newline at end of file diff --git a/README.md b/README.md index 31e50e0..e04eb08 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@

+[![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 diff --git a/backend/builds/cpu_spqlios.rs b/backend/builds/cpu_spqlios.rs index 160af9e..2485547 100644 --- a/backend/builds/cpu_spqlios.rs +++ b/backend/builds/cpu_spqlios.rs @@ -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");