Files
voprf-vx/.github/workflows/main.yml
T
daxpeddaandGitHub 5ac52388ff Reduce allocations and some general code improvements (#26)
* Remove unnecessary paths

* Remove unnecessary conversion for `G::from_scalar_slice`

* Remove unnecessary allocations

* Return `GenericArray` from `get_context_string`

* Use `zip()` instead instead of indexing

* Changed `compute_composites` input to `Iterator`s

* Changed `generate_proof` input to `Iterator`s

* Changed `verify_proof` input to `Iterator`s

* Reduce allocations in `verifiable_unblind`

* Changed `verifiable_unblind` input to `Iterator`s

* Changed `batch_finalize` input to `Iterator`s
Removed `BatchFinalizeInput`

* Reduce allocations in `VerifiableClient::finalize`

* Changed `finalize_after_unblind` input to `Iterator`s

* Changed `batch_evaluate` input to `Iterator`s

* Reduce allocations in `evaluate`

* Changed `blind` input to `Into<Vec<u8>>`

* Remove note about `BatchFinalizeInput` from documentation

* Remove `Metadata`

* Changed `blind` input to `Vec<u8>`

* General improvements to test code

* Fix rustdoc

* Remove unnecessarily installed components
2021-10-12 15:07:47 -07:00

122 lines
3.0 KiB
YAML

name: Rust CI
on:
push:
branches:
- main
pull_request:
types: [opened, repoened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
backend_feature:
- u64_backend
- u32_backend
- p256,u64_backend
frontend_feature:
- serialize
toolchain:
- stable
- 1.51.0
name: test
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install ${{ matrix.toolchain }} toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features ${{ matrix.backend_feature }}
- name: Run cargo test with std
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features ${{ matrix.frontend_feature }},std --features ${{ matrix.backend_feature }}
build-no-std:
name: Build with no-std on ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
# for wasm
- wasm32-unknown-unknown
# for any no_std target
- thumbv6m-none-eabi
backend_feature:
- u64_backend
- u32_backend
- p256,u64_backend
frontend_feature:
- serialize
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
- run: rustup target add ${{ matrix.target }}
- run: cargo build --verbose --target=${{ matrix.target }} --no-default-features --features ${{ matrix.frontend_feature }} --features ${{ matrix.backend_feature }}
clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings
- name: Run cargo doc
uses: actions-rs/cargo@v1
env:
RUSTDOCFLAGS: -D warnings
with:
command: doc
args: --no-deps --document-private-items
format:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check