Skip to content

feat: add AddSubtractExpr #86

feat: add AddSubtractExpr

feat: add AddSubtractExpr #86

Workflow file for this run

name: CI-Lint-And-Test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
# Run cargo check (with various feature permutations)
check:
name: Check Package
runs-on: large-8-core-32gb-22-04
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-check-${{ hashFiles('**/Cargo.toml') }}
- name: Install stable toolchain
run: curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env
- name: Install Dependencies
run: export DEBIAN_FRONTEND=non-interactive && sudo apt-get update && sudo apt-get install -y clang lld
- name: Run cargo check (no features, exclude examples)
run: cargo check --no-default-features
- name: Run cargo check (default features)
run: cargo check --all-targets
- name: Run cargo check (all features)
run: cargo check --all-targets --all-features
- name: Run cargo check (proof-of-sql) (no features)
run: cargo check -p proof-of-sql --no-default-features
- name: Run cargo check (proof-of-sql) (all features)
run: cargo check -p proof-of-sql --all-features
- name: Run cargo check (proof-of-sql) (just "test" feature)
run: cargo check -p proof-of-sql --no-default-features --features="test"
- name: Run cargo check (proof-of-sql) (just "blitzar" feature)
run: cargo check -p proof-of-sql --no-default-features --features="blitzar"
test:
name: Test Suite
runs-on: large-8-core-32gb-22-04
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }}
- name: Install stable toolchain
run: curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env
- name: Install Dependencies
run: export DEBIAN_FRONTEND=non-interactive && sudo apt-get update && sudo apt-get install -y clang lld
- name: Run cargo test
run: cargo test --all-features
- name: Dry run cargo test (proof-of-sql) (test feature only)
run: cargo test -p proof-of-sql --no-run --no-default-features --features="test"
- name: Dry run cargo test (proof-of-sql) (blitzar feature only)
run: cargo test -p proof-of-sql --no-run --no-default-features --features="blitzar"
- name: Dry run cargo test (proof-of-sql) (no features)
run: cargo test -p proof-of-sql --no-run --no-default-features
- name: Run cargo test (proof primitives - Dory) (no features - i.e. not using blitzar)
run: cargo test proof_primitive::dory::dory_compute_commitments_test --no-default-features
- name: Run hello_world example
run: cargo run --example hello_world --features="blitzar test"
- name: Run posql_db example
run: bash crates/proof-of-sql/examples/posql_db/run_example.sh
clippy:
name: Clippy
runs-on: large-8-core-32gb-22-04
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.toml') }}
- name: Install stable toolchain
run: |
curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env
rustup component add clippy
- name: Install Dependencies
run: export DEBIAN_FRONTEND=non-interactive && sudo apt-get update && sudo apt-get install -y clang lld
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
# Run cargo fmt --all -- --config imports_granularity=Crate,group_imports=One --check
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
run: |
curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env
rustup component add rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --config imports_granularity=Crate,group_imports=One --check
udeps:
name: Unused Dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install nightly toolchain
run: |
curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env && rustup default nightly
cargo install cargo-udeps --locked
- name: Run cargo udeps
run: cargo +nightly udeps --all-targets