Files
concrete/.github/workflows/concrete_cpu_test.yml
2023-03-09 09:29:04 +01:00

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