Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/ml-kem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- "Cargo.*"
push:
branches: master
workflow-dispatch:

defaults:
run:
Expand All @@ -21,7 +22,7 @@ jobs:
set-msrv:
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
with:
msrv: 1.74.0
msrv: 1.76.0

no_std:
needs: set-msrv
Expand Down Expand Up @@ -69,6 +70,23 @@ jobs:
- run: cargo test
- run: cargo test --all-features

bench:
needs: set-msrv
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cargo install cargo-codspeed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will compile cargo-codspeed on each CI run, which is really inefficient. It's better to use pre-compiled releases, e.g. see how we handle cargo-hack installation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will try to get things working and then optimize :)

- run: cargo codspeed build
- name: Run benchmarks
uses: CodSpeedHQ/action@v2
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: cargo codspeed run

cross:
needs: set-msrv
strategy:
Expand Down
123 changes: 114 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ml-kem/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ hex = "0.4.3"
hex-literal = "0.4.1"
rand = "0.8.5"
crypto-common = { version = "0.1.6", features = ["rand_core"] }
codspeed-criterion-compat = "2.6.0"

[[bench]]
name = "mlkem"
Expand Down
2 changes: 1 addition & 1 deletion ml-kem/benches/mlkem.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ::kem::{Decapsulate, Encapsulate};
use criterion::{criterion_group, criterion_main, Criterion};
use codspeed_criterion_compat::{criterion_group, criterion_main, Criterion};
use crypto_common::rand_core::CryptoRngCore;
use hybrid_array::{Array, ArraySize};
use ml_kem::*;
Expand Down