Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
20e83a7
v0.0.4
sebastienrousseau May 7, 2024
4244568
refactor(kyberlib): :fire: removing Cargo.lock
sebastienrousseau May 7, 2024
23c5dd7
Merge branch 'main' into feat/kyberlib
sebastienrousseau May 7, 2024
34dfa13
fix(kyberlib): :fire: cleaning up `lib.rs`
sebastienrousseau May 7, 2024
3b0223f
feat(kyberlib): :sparkles: implement rlg crate for application-level …
sebastienrousseau May 7, 2024
3fa1fde
test(kyberlib): :white_check_mark: new tests for `wasm.rs`
sebastienrousseau May 7, 2024
5d3317b
test(kyberlib): :white_check_mark: new tests for `wam.rs`
sebastienrousseau May 7, 2024
524278e
test(kyberlib): :white_check_mark: tests covering the main functions …
sebastienrousseau May 8, 2024
14b0b2e
test(kyberlib): :white_check_mark: addresses the warning and simplifi…
sebastienrousseau May 8, 2024
ea2c3f7
test(kyberlib): :white_check_mark: add tests to cover all the constan…
sebastienrousseau May 8, 2024
5d78610
test(kyberlib): :art: fix minor formatting issues
sebastienrousseau May 8, 2024
b965213
test(kyberlib): :white_check_mark: add new tests for `lib.rs`
sebastienrousseau May 8, 2024
446510c
test(kyberlib): :white_check_mark: new unit tests for the `api.rs` mo…
sebastienrousseau May 8, 2024
122cf72
feat(kyberlib): :art: new macros for `kem.rs`
sebastienrousseau May 8, 2024
1144629
feat(kyberlib): :sparkles: new macros, fixes and document updates
sebastienrousseau May 8, 2024
423eb96
fix(kyberlib): :bug: add new import function
sebastienrousseau May 8, 2024
c41b350
test(kyberlib): :white_check_mark: new tests for `api.rs`
sebastienrousseau May 8, 2024
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
2 changes: 0 additions & 2 deletions .cargo/config.toml

This file was deleted.

9 changes: 7 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: 🧪 Audit
on:
push:
branches:
- main
- feat/kyberlib
pull_request:
branches:
Expand All @@ -18,6 +19,10 @@ jobs:
- uses: hecrj/setup-rust-action@v2
- name: Install cargo-audit
run: cargo install cargo-audit

- uses: actions/checkout@v4
- name: Audit dependencies
run: cargo audit
- name: Resolve dependencies
run: cargo update

- name: Audit vulnerabilities
run: cargo audit
3 changes: 2 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: 🧪 Check
on:
push:
branches:
- main
- feat/kyberlib
pull_request:
branches:
Expand All @@ -20,4 +21,4 @@ jobs:
components: clippy
- uses: actions/checkout@v4
- name: Check lints
run: cargo check --all-targets --workspace --all-features
run: cargo check --all-targets --workspace --all-features
61 changes: 61 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: 📶 Coverage

on:
push:
branches:
- main
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
coverage:
name: Code Coverage
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"

steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4

# Setup Rust nightly
- name: Install Rust
uses: actions-rs/toolchain@v1
id: toolchain
with:
toolchain: nightly
override: true

# Configure cache for Cargo
- name: Cache Cargo registry, index
uses: actions/cache@v4
id: cache-cargo
with:
path: |
~/.cargo/registry
~/.cargo/bin
~/.cargo/git
key: linux-${{ steps.toolchain.outputs.rustc_hash }}-rust-cov-${{ hashFiles('**/Cargo.lock') }}

# Run tests with all features
- name: Test (cargo test)
uses: actions-rs/cargo@v1
with:
command: test
args: "--workspace"

# Install grcov
- uses: actions-rs/[email protected]
id: coverage

# Upload to Codecov.io
- name: Upload to Codecov.io
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ${{ steps.coverage.outputs.report }}
11 changes: 5 additions & 6 deletions .github/workflows/document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ jobs:
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
publish_branch: gh-pages
cname: true
clean: true
commit_message: Deploy documentation at ${{ github.sha }}
commit_user_name: github-actions
commit_user_email: [email protected]
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc
user_email: [email protected]
user_name: github-actions
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
components: clippy
- uses: actions/checkout@v4
- name: Check lints
run: cargo clippy --workspace --all-features --all-targets --no-deps -- -D warnings
run: cargo clippy --workspace --all-features --all-targets --no-deps -- -D warnings
127 changes: 19 additions & 108 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: 🧪 Release

on: [push, pull_request]
on:
push:
branches:
- main
- feat/kyberlib
pull_request:
branches:
- feat/kyberlib
release:
types: [created]

concurrency:
group: ${{ github.ref }}
Expand All @@ -21,113 +30,25 @@ jobs:
BUILD_ID: ${{ github.run_id }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_API_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OS: ${{ matrix.os }}
TARGET: ${{ matrix.target }}
OS: ${{ matrix.platform.os }}
TARGET: ${{ matrix.platform.target }}

strategy:
fail-fast: false
matrix:
target:
# List of targets:
# https://doc.rust-lang.org/nightly/rustc/platform-support.html

# Tier 1 platforms 🏆
- aarch64-unknown-linux-gnu # 64-bit Linux systems on ARM architecture
- i686-pc-windows-gnu # 32-bit Windows (i686-pc-windows-gnu)
- i686-pc-windows-msvc # 32-bit Windows (i686-pc-windows-msvc)
- i686-unknown-linux-gnu # 32-bit Linux (kernel 3.2+, glibc 2.17+)
- x86_64-apple-darwin # 64-bit macOS (10.7 Lion or later)
- x86_64-pc-windows-gnu # 64-bit Windows (x86_64-pc-windows-gnu)
- x86_64-pc-windows-msvc # 64-bit Windows (x86_64-pc-windows-msvc)
- x86_64-unknown-linux-gnu # 64-bit Linux (kernel 2.6.32+, glibc 2.11+)

# Tier 2 platforms 🥈
- aarch64-apple-darwin # 64-bit macOS on Apple Silicon
- aarch64-pc-windows-msvc # 64-bit Windows (aarch64-pc-windows-msvc)
- aarch64-unknown-linux-musl # 64-bit Linux systems on ARM architecture
- arm-unknown-linux-gnueabi # ARMv6 Linux (kernel 3.2, glibc 2.17)
- arm-unknown-linux-gnueabihf # ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17)
- armv7-unknown-linux-gnueabihf # ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17)
- powerpc-unknown-linux-gnu # PowerPC Linux (kernel 3.2, glibc 2.17)
- powerpc64-unknown-linux-gnu # PowerPC64 Linux (kernel 3.2, glibc 2.17)
- powerpc64le-unknown-linux-gnu # PowerPC64le Linux (kernel 3.2, glibc 2.17)
- riscv64gc-unknown-linux-gnu # RISC-V Linux (kernel 3.2, glibc 2.17)
- s390x-unknown-linux-gnu # s390x Linux (kernel 3.2, glibc 2.17)
- x86_64-unknown-freebsd # 64-bit FreeBSD on x86-64
- x86_64-unknown-linux-musl # 64-bit Linux (kernel 2.6.32+, musl libc)

include:
# Tier 1 platforms 🏆
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
cross: true
- target: i686-pc-windows-gnu
os: ubuntu-latest
cross: true
- target: i686-pc-windows-msvc
platform:
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: aarch64-pc-windows-msvc
os: windows-latest
cross: true
- target: i686-unknown-linux-gnu
os: ubuntu-latest
cross: true
- target: x86_64-apple-darwin
os: macos-latest
cross: true
- target: x86_64-pc-windows-gnu
os: ubuntu-latest
cross: true
- target: x86_64-pc-windows-msvc
os: windows-latest
cross: true
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
cross: true

# Tier 2 platforms 🥈
- target: aarch64-apple-darwin
os: macos-latest
cross: true
- target: aarch64-pc-windows-msvc
os: windows-latest
cross: true
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
cross: true
- target: arm-unknown-linux-gnueabi
os: ubuntu-latest
cross: true
- target: arm-unknown-linux-gnueabihf
os: ubuntu-latest
cross: true
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
cross: true
- target: powerpc-unknown-linux-gnu
os: ubuntu-latest
cross: true
- target: powerpc64-unknown-linux-gnu
os: ubuntu-latest
cross: true
- target: powerpc64le-unknown-linux-gnu
os: ubuntu-latest
cross: true
- target: riscv64gc-unknown-linux-gnu
os: ubuntu-latest
cross: true
- target: s390x-unknown-linux-gnu
os: ubuntu-latest
cross: true
- target: x86_64-unknown-freebsd
os: ubuntu-latest
cross: true
- target: x86_64-unknown-linux-musl
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
cross: true
# - target: x86_64-unknown-netbsd
# os: ubuntu-latest
# cross: true

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.platform.os }}

steps:
# Check out the repository code.
Expand Down Expand Up @@ -157,21 +78,11 @@ jobs:
id: install-target
run: rustup target add ${{ env.TARGET }}

- name: Install Cross and clean artifacts
run: |
# Install cross
cargo install cross

# Clean the build artifacts
cargo clean --verbose
shell: bash

# Build the targets
- name: Build targets
id: build-targets
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --verbose --workspace --release --target ${{ env.TARGET }}

Expand Down Expand Up @@ -337,4 +248,4 @@ jobs:
with:
command: publish
args: "--no-verify --allow-dirty"
use-cross: false
use-cross: false
31 changes: 1 addition & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,33 +37,4 @@ jobs:
# Run tests with all features
- name: Run tests with all features
id: run-tests-all-features
run: cargo test --verbose --workspace --all-features

# Install grcov
- name: Install grcov
# Only run this job on the main branch when a commit is pushed.
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
id: install-grcov
run: |
mkdir -p "${HOME}/.local/bin"
curl -sL https://github.com/mozilla/grcov/releases/download/v0.8.18/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - -C "${HOME}/.local/bin"
echo "$HOME/.local/bin" >> $GITHUB_PATH

# Use grcov to generate a coverage report
- name: Generate coverage report
# Only run this job on the main branch when a commit is pushed.
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
id: generate-code-coverage
uses: actions-rs/cargo@v1
with:
command: xtask
args: coverage

# Upload the coverage report to codecov
- name: Upload coverage report to codecov
# Only run this job on the main branch when a commit is pushed.
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
id: upload-report-codecov
uses: codecov/codecov-action@v4
with:
files: coverage/*.lcov
run: cargo test --verbose --workspace --all-features
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ build
Icon?
src/.DS_Store
tarpaulin-report.html
Cargo.lock
Loading