Skip to content

Commit

Permalink
Bump version, add changelog, update CI
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Varlakov <[email protected]>
  • Loading branch information
survived committed Sep 23, 2024
1 parent 7337478 commit f6dd067
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 5 deletions.
22 changes: 22 additions & 0 deletions .github/changelog.sh
Original file line number Diff line number Diff line change
@@ -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";
41 changes: 37 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit f6dd067

Please sign in to comment.