From 39dc34758e48057d2dca258751535731c84e0c6d Mon Sep 17 00:00:00 2001 From: UneBaguette <28904802+UneBaguette@users.noreply.github.com> Date: Sat, 27 Jun 2026 15:43:59 +0200 Subject: [PATCH] chore: add renovate bot config and add workflows git --- .gitea/workflows/ci.yml | 97 ++++++++++++++++++++++++++++++++++++ .gitea/workflows/publish.yml | 26 ++++++++++ Cargo.toml | 2 +- README.md | 4 +- renovate.json | 30 +++++++++++ 5 files changed, 156 insertions(+), 3 deletions(-) create mode 100644 .gitea/workflows/ci.yml create mode 100644 .gitea/workflows/publish.yml create mode 100644 renovate.json diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..79b042a --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,97 @@ +name: Rust CI + +on: [ push, pull_request ] + +concurrency: + group: ci-${{ gitea.ref }} + cancel-in-progress: true + +jobs: + fmt: + name: cargo fmt + runs-on: linux_amd64 + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - name: Run cargo fmt + run: cargo fmt --all -- --check + + clippy: + name: cargo clippy + runs-on: linux_amd64 + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - name: Run cargo clippy + run: cargo clippy --all-features --all-targets -- -D warnings + - name: Run cargo doc + run: cargo doc --no-deps --document-private-items --features danger,std + env: + RUSTDOCFLAGS: -D warnings + + test: + name: test (${{ matrix.toolchain }} / ${{ matrix.backend_feature || 'no backend' }} / ${{ matrix.frontend_feature || 'no frontend' }}) + runs-on: linux_amd64 + strategy: + fail-fast: false + matrix: + backend_feature: + - --features ristretto255-ciphersuite + - "" + frontend_feature: + - "" + - --features danger + - --features serde + toolchain: + - stable + - "1.87.0" + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + - uses: dtolnay/rust-toolchain@${{ matrix.toolchain }} + - name: Run cargo test + run: cargo test --no-default-features ${{ matrix.backend_feature }} + - name: Run cargo test with alloc + run: cargo test --no-default-features ${{ matrix.frontend_feature }} ${{ matrix.backend_feature }} --features alloc + - name: Run cargo test with std + run: cargo test --no-default-features ${{ matrix.frontend_feature }} ${{ matrix.backend_feature }} --features std + - name: Run cargo test with all features + run: cargo test --all-features + + build-no-std: + name: no-std (${{ matrix.target }} / ${{ matrix.backend_feature || 'no backend' }}) + runs-on: linux_amd64 + strategy: + fail-fast: false + matrix: + target: + - wasm32-unknown-unknown + - thumbv6m-none-eabi + backend_feature: + - "" + - --features ristretto255-ciphersuite + frontend_feature: + - "" + - --features danger + - --features serde + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + - uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + - name: Build no-std + run: cargo build --verbose --target=${{ matrix.target }} --no-default-features ${{ matrix.frontend_feature }} ${{ matrix.backend_feature }} + + audit: + name: cargo audit + runs-on: linux_amd64 + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + - uses: dtolnay/rust-toolchain@stable + - name: Install cargo-audit + run: cargo install cargo-audit + - name: Run cargo audit + run: cargo audit -D warnings \ No newline at end of file diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..dd25508 --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,26 @@ +name: Publish + +on: + release: + types: [ published ] + +jobs: + publish: + runs-on: linux_amd64 + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + + - uses: dtolnay/rust-toolchain@stable + + - name: Login to crates.io + run: cargo login $CRATES_IO_TOKEN + env: + CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} + + - name: Dry run publish + run: cargo publish --dry-run --manifest-path Cargo.toml + + - name: Publish + run: cargo publish --manifest-path Cargo.toml + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 854de00..41f6751 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Kevin Lewi "] categories = ["no-std", "algorithms", "cryptography"] description = "An implementation of a verifiable oblivious pseudorandom function (VOPRF)" -edition = "2021" +edition = "2024" keywords = ["oprf"] license = "MIT" name = "voprf" diff --git a/README.md b/README.md index e95e2c3..5838c17 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# voprf ![Build Status](https://github.com/novifinancial/voprf/workflows/Rust%20CI/badge.svg) +# voprf An implementation of a (verifiable) oblivious pseudorandom function (VOPRF) A VOPRF is a verifiable oblivious pseudorandom function, a protocol between a client and a server. The regular (non-verifiable) OPRF is also supported in this implementation. @@ -8,7 +8,7 @@ This implementation is based on [RFC 9497](https://www.rfc-editor.org/rfc/rfc949 Documentation ------------- -The API can be found [here](https://docs.rs/voprf/) along with an example for usage. +The API can be found [here](https://docs.rs/voprf-vexahub/) along with an example for usage. Installation ------------ diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..510e947 --- /dev/null +++ b/renovate.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "dependencyDashboard": true, + "osvVulnerabilityAlerts": true, + "rangeStrategy": "auto", + "packageRules": [ + { + "matchManagers": [ + "cargo" + ], + "groupName": "rust deps" + }, + { + "matchManagers": [ + "cargo" + ], + "matchUpdateTypes": [ + "major" + ], + "automerge": false + } + ], + "lockFileMaintenance": { + "enabled": true + }, + "configMigration": true +} \ No newline at end of file