Skip to content

Commit

Permalink
Merge branch 'dev' into 2024-07-rust-docs-protocols-codec-sv2
Browse files Browse the repository at this point in the history
  • Loading branch information
rrybarczyk committed Aug 27, 2024
2 parents ed21bfa + 0f0ee1e commit 122064b
Show file tree
Hide file tree
Showing 39 changed files with 801 additions and 694 deletions.
419 changes: 0 additions & 419 deletions .github/workflows/release-bin.yaml

This file was deleted.

10 changes: 1 addition & 9 deletions .github/workflows/release-libs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
name: Release Libs

on:
pull_request:
push:
branches:
- main

Expand All @@ -22,14 +22,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Run check-versioning-lib-release.sh
run: |
./check-versioning-lib-release.sh
if [ $? -eq 1 ]; then
echo "Script returned exit code 1, halting the workflow"
exit 1
fi
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
Expand Down
131 changes: 131 additions & 0 deletions .github/workflows/semver-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Semver Check

on:
push:
branches:
- "main"
- "dev"
pull_request:
branches:
- "main"
- "dev"

jobs:
semver-check:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Cache Cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y cmake

- name: Install cargo-semver-checks
run: cargo install cargo-semver-checks --locked

- name: Run semver checks for common
working-directory: common
run: cargo semver-checks

- name: Run semver checks for utils/buffer
working-directory: utils/buffer
run: cargo semver-checks

- name: Run semver checks for protocols/v2/binary-sv2/no-serde-sv2/codec
working-directory: protocols/v2/binary-sv2/no-serde-sv2/codec
run: cargo semver-checks

- name: Run semver checks for protocols/v2/binary-sv2/serde-sv2
working-directory: protocols/v2/binary-sv2/serde-sv2
run: cargo semver-checks

- name: Run semver checks for protocols/v2/binary-sv2/binary-sv2
working-directory: protocols/v2/binary-sv2/binary-sv2
run: cargo semver-checks

- name: Run semver checks for protocols/v2/const-sv2
working-directory: protocols/v2/const-sv2
run: cargo semver-checks

- name: Run semver checks for protocols/v2/framing-sv2
working-directory: protocols/v2/framing-sv2
run: cargo semver-checks

- name: Run semver checks for protocols/v2/noise-sv2
working-directory: protocols/v2/noise-sv2
run: cargo semver-checks

- name: Run semver checks for protocols/v2/codec-sv2
working-directory: protocols/v2/codec-sv2
run: cargo semver-checks

- name: Run semver checks for protocols/v2/subprotocols/common-messages
working-directory: protocols/v2/subprotocols/common-messages
run: cargo semver-checks

- name: Run semver checks for protocols/v2/subprotocols/job-declaration
working-directory: protocols/v2/subprotocols/job-declaration
run: cargo semver-checks

- name: Run semver checks for protocols/v2/subprotocols/mining
working-directory: protocols/v2/subprotocols/mining
run: cargo semver-checks

- name: Run semver checks for protocols/v2/subprotocols/template-distribution
working-directory: protocols/v2/subprotocols/template-distribution
run: cargo semver-checks

- name: Run semver checks for protocols/v2/sv2-ffi
working-directory: protocols/v2/sv2-ffi
run: cargo semver-checks

- name: Run semver checks for protocols/v2/roles-logic-sv2
working-directory: protocols/v2/roles-logic-sv2
run: cargo semver-checks --default-features

- name: Run semver checks for protocols/v1
working-directory: protocols/v1
run: cargo semver-checks

- name: Run semver checks for utils/bip32-key-derivation
working-directory: utils/bip32-key-derivation
run: cargo semver-checks

- name: Run semver checks for utils/error-handling
working-directory: utils/error-handling
run: cargo semver-checks

- name: Run semver checks for utils/key-utils
working-directory: utils/key-utils
run: cargo semver-checks

- name: Run semver checks for roles/roles-utils/network-helpers
working-directory: roles/roles-utils/network-helpers
run: cargo semver-checks

- name: Run semver checks for roles/roles-utils/rpc
working-directory: roles/roles-utils/rpc
run: cargo semver-checks
6 changes: 3 additions & 3 deletions benches/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ serde_json = { version = "1.0.64", default-features = false, features = ["alloc"
iai="0.1"
mining_sv2 = { path = "../protocols/v2/subprotocols/mining", version = "^1.0.0" }
roles_logic_sv2 = { path = "../protocols/v2/roles-logic-sv2", version = "^1.0.0" }
framing_sv2 = { version = "1.1.0", path = "../protocols/v2/framing-sv2" }
framing_sv2 = { version = "2.0.0", path = "../protocols/v2/framing-sv2" }
serde = { version = "1.0.89", default-features = false, features = ["derive", "alloc"] }
num-bigint = "0.4.3"
num-traits = "0.2.15"
Expand Down
18 changes: 9 additions & 9 deletions protocols/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion protocols/v2/binary-sv2/binary-sv2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "binary_sv2"
version = "1.0.0"
version = "1.2.0"
authors = ["fi3 <[email protected]>"]
edition = "2018"
description = "Sv2 data format"
Expand Down
2 changes: 1 addition & 1 deletion protocols/v2/binary-sv2/no-serde-sv2/codec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "binary_codec_sv2"
version = "1.0.0"
version = "1.2.0"
authors = ["fi3 <[email protected]>"]
edition = "2018"
description = "Sv2 data format"
Expand Down
10 changes: 5 additions & 5 deletions protocols/v2/binary-sv2/no-serde-sv2/codec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ use std::io::{Error as E, ErrorKind};
mod codec;
mod datatypes;
pub use datatypes::{
PubKey, Seq0255, Seq064K, ShortTxId, Signature, Str0255, Sv2Option, U32AsRef, B016M, B0255,
B032, B064K, U24, U256,
PubKey, Seq0255, Seq064K, ShortTxId, Signature, Str0255, Sv2DataType, Sv2Option, U32AsRef,
B016M, B0255, B032, B064K, U24, U256,
};

pub use crate::codec::{
decodable::Decodable,
decodable::{Decodable, GetMarker},
encodable::{Encodable, EncodableField},
GetSize, SizeHint,
Fixed, GetSize, SizeHint,
};

#[allow(clippy::wrong_self_convention)]
Expand All @@ -58,7 +58,7 @@ pub mod decodable {
}

pub mod encodable {
pub use crate::codec::encodable::{Encodable, EncodableField};
pub use crate::codec::encodable::{Encodable, EncodableField, EncodablePrimitive};
}

#[macro_use]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "derive_codec_sv2"
version = "1.0.0"
version = "1.1.0"
authors = ["fi3 <[email protected]>"]
edition = "2018"
description = "Derive macro for Sv2 binary format serializer and deserializer"
Expand Down
Loading

0 comments on commit 122064b

Please sign in to comment.