Skip to content

Commit

Permalink
Add Frodo-KEM (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelodder7 authored Jan 19, 2025
1 parent 7f490c6 commit 7d2e1c2
Show file tree
Hide file tree
Showing 36 changed files with 14,688 additions and 20 deletions.
144 changes: 144 additions & 0 deletions .github/workflows/frodo-kem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: frodo-kem

on:
pull_request:
paths:
- "frodo-kem/**"
- "Cargo.*"
paths-ignore:
- README.md
- SECURITY.md
- LICENSE-APACHE
- LICENSE-MIT
- .pants-ignore
- rustfmt.toml
push:
branches: master
- "frodo-kem/**"
- "Cargo.*"
paths-ignore:
- README.md
- SECURITY.md
- LICENSE-APACHE
- LICENSE-MIT
- .pants-ignore
- rustfmt.toml

env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUST_LOG_STYLE: always
RUSTFLAGS: "-Dwarnings"
RUSTDOCFLAGS: "-Dwarnings"

defaults:
run:
working-directory: frodo-kem
shell: bash

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cargo build --no-default-features --features=frodo
- run: cargo build --no-default-features --features=efrodo
- run: cargo build --no-default-features || [ $? -eq 101 ]
- run: cargo build --all-features


test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cargo build --all-features --benches --release --keep-going
- run: cargo test --all-features --release
- run: cargo test --no-default-features --features=frodo,efrodo,serde --release

careful:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo install cargo-careful
- run: cargo careful test tests
- run: cargo careful test test_vector --release

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
- run: cargo clippy --all --all-features -- -D warnings
- run: cargo clippy --all --no-default-features --features=frodo,efrodo,serde -- -D warnings

rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- run: cargo fmt -- --check

doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- run: cargo doc --all-features

deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo install cargo-udeps
- run: cargo udeps --all-targets --all-features

outdated:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo install cargo-outdated
- run: cargo outdated --root-deps-only --exit-code 1

pants:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo install cargo-pants
- run: cargo pants --loud --dev

cross:
needs: set-msrv
strategy:
matrix:
include:
- target: powerpc-unknown-linux-gnu
rust: ${{needs.set-msrv.outputs.msrv}}
- target: powerpc-unknown-linux-gnu
rust: stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cross-install@master
- run: cross test --release --target ${{ matrix.target }} --all-features
Loading

0 comments on commit 7d2e1c2

Please sign in to comment.