Files
poulpy/.github/workflows/ci.yml
Jean-Philippe Bossuat 4e90e08a71 Support for bivariate convolution & normalization with offset (#126)
* Add bivariate-convolution
* Add pair-wise convolution + tests + benches
* Add take_cnv_pvec_[left/right] to Scratch & updated CHANGELOG.md
* cross-base2k normalization with positive offset
* clippy & fix CI doctest avx compile error
* more streamlined bounds derivation for normalization
* Working cross-base2k normalization with pos/neg offset
* Update normalization API & tests
* Add glwe tensoring test
* Add relinearization + preliminary test
* Fix GGLWEToGGSW key infos
* Add (X,Y) convolution by const (1, Y) poly
* Faster normalization test + add bench for cnv_by_const
* Update changelog
2025-12-21 16:56:42 +01:00

80 lines
2.3 KiB
YAML

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rustfmt
- name: Cache cargo deps
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
# Detect whether runner supports AVX2 + FMA
- name: Detect AVX support
id: avxcheck
run: |
if lscpu | grep -qi avx2 && lscpu | grep -qi fma; then
echo "supported=true" >> $GITHUB_OUTPUT
else
echo "supported=false" >> $GITHUB_OUTPUT
fi
# rustfmt always runs — unrelated to AVX support
- name: rustfmt (check only)
run: cargo fmt --all --check
# Build / lint / test WITH AVX
- name: Build (AVX enabled)
if: steps.avxcheck.outputs.supported == 'true'
run: |
RUSTFLAGS="-C target-feature=+avx2,+fma" \
cargo build --workspace --all-targets --features enable-avx
- name: Clippy (AVX enabled)
if: steps.avxcheck.outputs.supported == 'true'
run: |
RUSTFLAGS="-C target-feature=+avx2,+fma" \
cargo clippy --workspace --all-targets --features enable-avx -- -D warnings
- name: Tests (AVX enabled)
if: steps.avxcheck.outputs.supported == 'true'
run: |
RUSTDOCFLAGS="-C target-feature=+avx2 -C target-feature=+fma" \
RUSTFLAGS="-C target-feature=+avx2,+fma" \
cargo test --workspace --features enable-avx
# Build / lint / test WITHOUT AVX
- name: Build (portable mode)
if: steps.avxcheck.outputs.supported == 'false'
run: cargo build --workspace --all-targets
- name: Clippy (portable mode)
if: steps.avxcheck.outputs.supported == 'false'
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Tests (portable mode)
if: steps.avxcheck.outputs.supported == 'false'
run: cargo test --workspace