enc_rust 0.2.2

A pure rust implementation of the Module-Lattice-based standards ML-KEM and (soon) ML-DSA, also known as the PQC scheme Crystals Kyber and Dilithium.
Documentation
name: kyber_rust

permissions:
  contents: read

on:
  push:
  pull_request:

jobs:
  build:
    name: Build+test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v3
        with:
          persist-credentials: false

      - name: Install rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: llvm-tools

      - name: Install cargo llvm
        run: cargo install cargo-llvm-cov

      - name: cargo build
        run: cargo build

      - name: cargo test
        run: cargo test || cargo test || cargo test
        env:
          RUST_BACKTRACE: 1

      - name: cargo test all
        run: cargo test --all-features || cargo test --all-features || cargo test --all-features
        env:
          RUST_BACKTRACE: 1

      - name: Get coverage
        run: ./.github/coverage --lcov --output-path cov_report || ./.github/coverage --lcov --output-path cov_report || ./.github/coverage --lcov --output-path cov_report

      - name: Upload coverage reports to Codecov
        uses: codecov/codecov-action@v3
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
        with:
          file: cov_report

  format:
    name: Format
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v3
        with:
          persist-credentials: false
      - name: Install rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt
      - name: Check formatting
        run: cargo fmt --all -- --check

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v3
        with:
          persist-credentials: false
      - name: Install rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - run: cargo clippy -- -D warnings