From 31fdde961c5d5e3621cb94fb9f19fe8c6d9c651a Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Mon, 23 Sep 2024 12:11:51 +0200 Subject: [PATCH 1/4] Update contribution guidelines Signed-off-by: Denis Varlakov --- CONTRIBUTING.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9484b46..288d8e8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,10 +2,14 @@ Thanks for taking interest to contributing to our project! +## Join us in Discord! +We welcome all contributors to communicate with us [in Discord]! Please, reach out to us +in `#lockness-contribute` room. + ## Pull Requests -Prior to making a PR, we ask you to communicate it with us, preferably by opening an issue. -This would help to keep your work aligned with the maintainers view and get insights from -them. +Prior to making a PR, we ask you to communicate it with us, either [in Discord] or, if you +prefer, by opening an issue in the repo. This would help to keep your work aligned with the +maintainers view and avoid situations in which we can't accept your contribution. All commits are required to be signed via verified GPG key. You can read about commit signing in [this series of articles](https://docs.github.com/en/authentication/managing-commit-signature-verification) @@ -62,3 +66,7 @@ communicate with us for other reasons. However, if you want to report something that you believe might be a security vulnerability or a security flaw in this or any upstream project, please report it following the procedure described in [SECURITY.md](./SECURITY.md). + +Feel free to reach out to us [in Discord] as well. + +[in Discord]: https://discordapp.com/channels/905194001349627914/1285268686147424388 From aa8d419c3ce50a0a45b4a21ce34465bacbbcf0a0 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Mon, 23 Sep 2024 14:36:21 +0200 Subject: [PATCH 2/4] Update links Signed-off-by: Denis Varlakov --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3853a30..303c801 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.1" edition = "2021" license = "MIT OR Apache-2.0" description = "Stark curve implementation" -repository = "https://github.com/dfns/stark-curve" +repository = "https://github.com/LFDT-Lockness/stark-curve" categories = ["cryptography", "no-std", "no-std::no-alloc"] keywords = ["elliptic-curves", "stark-curve"] From 73374789d7d95d2cb71953f90e19178dbda47af2 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Mon, 23 Sep 2024 14:37:08 +0200 Subject: [PATCH 3/4] Add info about discord to readme Signed-off-by: Denis Varlakov --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index d9313f1..05ae8ed 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ ![License](https://img.shields.io/crates/l/stark-curve.svg) [![Docs](https://docs.rs/stark-curve/badge.svg)](https://docs.rs/stark-curve) [![Crates io](https://img.shields.io/crates/v/stark-curve.svg)](https://crates.io/crates/stark-curve) +[![Discord](https://img.shields.io/discord/905194001349627914?logo=discord&logoColor=ffffff&label=Discord)][in Discord] # Stark Curve @@ -40,6 +41,11 @@ used and tested. [ff]: https://crates.io/crates/ff [elliptic-curve]: https://crates.io/crates/elliptic-curve +## Join us in Discord! +Feel free to reach out to us [in Discord]! + +[in Discord]: https://discordapp.com/channels/905194001349627914/1285268686147424388 + ## License Licensed under either of From f6dd067820b903c41060adc2a96b8f81f6fc227c Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Mon, 23 Sep 2024 14:42:13 +0200 Subject: [PATCH 4/4] Bump version, add changelog, update CI Signed-off-by: Denis Varlakov --- .github/changelog.sh | 22 ++++++++++++++++++++ .github/workflows/rust.yml | 41 ++++++++++++++++++++++++++++++++++---- CHANGELOG.md | 8 ++++++++ Cargo.toml | 2 +- 4 files changed, 68 insertions(+), 5 deletions(-) create mode 100755 .github/changelog.sh create mode 100644 CHANGELOG.md diff --git a/.github/changelog.sh b/.github/changelog.sh new file mode 100755 index 0000000..f21e927 --- /dev/null +++ b/.github/changelog.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +m_branch=m; +changelog_file=CHANGELOG.md; + +# fetch master since we might be in a shallow clone +git fetch origin "$m_branch:$m_branch" --depth=1 + +changed=0; +for log in */"$changelog_file"; do + dir=$(dirname "$log"); + # check if version changed + if git diff "$m_branch" -- "$dir/Cargo.toml" | grep -q "^-version = "; then + # check if changelog updated + if git diff --exit-code --no-patch "$m_branch" -- "$log"; then + echo "$dir version changed, but $log is not updated" + changed=1; + fi + fi +done + +exit "$changed"; diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9b150e0..a83174a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,18 +11,51 @@ env: CARGO_NET_GIT_FETCH_WITH_CLI: true jobs: - build: + check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 - - name: Build - run: cargo build --release + with: + cache-on-failure: "true" + - name: Check all-features + run: cargo check + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: "true" - name: Run tests run: cargo test + fmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 - name: Check formatting run: cargo fmt --all -- --check + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: "true" - name: Run clippy run: cargo clippy --all --lib -- --no-deps -D clippy::all -D clippy::unwrap_used -D clippy::expect_used - - name: Run clippy tests + clippy-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: "true" + - name: Run clippy run: cargo clippy --tests -- -D clippy::all + check-changelog: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check changelogs + run: ./.github/changelog.sh diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d89f972 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ +## v0.1.2 +* Update links in the crate, add info about our discord to readme [#9] + +[#9]: https://github.com/LFDT-Lockness/stark-curve/pull/9 + +## v0.1.1 + +Changes prior to this version weren't documented diff --git a/Cargo.toml b/Cargo.toml index 303c801..8325124 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stark-curve" -version = "0.1.1" +version = "0.1.2" edition = "2021" license = "MIT OR Apache-2.0" description = "Stark curve implementation"