mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 11:35:02 -05:00
63 lines
1.3 KiB
YAML
63 lines
1.3 KiB
YAML
name: Concrete CPU - Tests
|
|
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
RUSTFLAGS: -D warnings
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Rust install
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
|
|
- name: Download cargo cache
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Formatting
|
|
run: |
|
|
cd backends/concrete-cpu
|
|
cargo fmt --check
|
|
|
|
- name: Remove header to force regeneration
|
|
run: |
|
|
cd backends/concrete-cpu
|
|
rm include/concrete-cpu.h
|
|
|
|
- name: Build
|
|
run: |
|
|
cd backends/concrete-cpu
|
|
cargo build --all-targets
|
|
|
|
- name: Check regenerated header is unchanged
|
|
run: |
|
|
cd backends/concrete-cpu
|
|
git diff --exit-code
|
|
|
|
- name: Lint
|
|
run: |
|
|
cd backends/concrete-cpu
|
|
cargo clippy --all-targets
|
|
|
|
- name: Tests
|
|
run: |
|
|
cd backends/concrete-cpu
|
|
cargo test --no-fail-fast --all-targets
|
|
|
|
- name: Zig install
|
|
run: |
|
|
sudo snap install zig --classic --beta
|
|
|
|
- name: Zig test
|
|
run: |
|
|
cd backends/concrete-cpu/test
|
|
make test
|