mirror of
https://github.com/arnaucube/mimc-rs.git
synced 2026-02-06 19:16:45 +01:00
Add GHA
This commit is contained in:
13
.github/workflows/rust.yml
vendored
Normal file
13
.github/workflows/rust.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
name: Test
|
||||||
|
on: [push, pull_request]
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --verbose
|
||||||
|
- name: Run tests
|
||||||
|
run: cargo test --verbose
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
language: rust
|
|
||||||
rust:
|
|
||||||
- stable
|
|
||||||
|
|
||||||
cache:
|
|
||||||
- cargo
|
|
||||||
|
|
||||||
script:
|
|
||||||
- RUST_BACKTRACE=1 cargo test --all
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# mimc-rs [](https://crates.io/crates/mimc-rs) [](https://travis-ci.org/arnaucube/mimc-rs)
|
# mimc-rs [](https://crates.io/crates/mimc-rs) [](https://github.com/arnaucube/mimc-rs/actions?query=workflow%3ATest)
|
||||||
MIMC7 hash implementation in Rust, a zkSNARK friendly hash function.
|
MIMC7 hash implementation in Rust, a zkSNARK friendly hash function.
|
||||||
|
|
||||||
https://eprint.iacr.org/2016/492.pdf
|
https://eprint.iacr.org/2016/492.pdf
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ fn criterion_benchmark(c: &mut Criterion) {
|
|||||||
big_arr.push(b2.clone());
|
big_arr.push(b2.clone());
|
||||||
let mimc7 = Mimc7::new();
|
let mimc7 = Mimc7::new();
|
||||||
|
|
||||||
c.bench_function("hash", |b| b.iter(|| mimc7.hash(big_arr.clone()).unwrap()));
|
c.bench_function("hash", |b| b.iter(|| mimc7.hash(big_arr.clone())));
|
||||||
}
|
}
|
||||||
|
|
||||||
criterion_group!(benches, criterion_benchmark);
|
criterion_group!(benches, criterion_benchmark);
|
||||||
|
|||||||
Reference in New Issue
Block a user