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/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 diff --git a/Cargo.toml b/Cargo.toml index 3853a30..8325124 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "stark-curve" -version = "0.1.1" +version = "0.1.2" 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"] 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