Skip to content

Commit

Permalink
Merge protocols and roles workspaces
Browse files Browse the repository at this point in the history
This commits removes the `protocols` and `roles` workspaces and creates
a new shared workspace for both of them. In practice we dont have a need
to maintain two different workspaces and no benefit is derived from
that.

With moving to a shared workspaces, the naming of the parent folders was
changed as will with `roles` becoming `stratum-roles` and `protocols`
becoming `stratum-protocols` and same for `common` crate. This required
a fix a across the codebase of the imports inside the different
`Cargo.toml`s.
  • Loading branch information
jbesraa committed Aug 21, 2024
1 parent 0f0ee1e commit 1766776
Show file tree
Hide file tree
Showing 239 changed files with 945 additions and 827 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/clippy-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
- name: Run Clippy on different workspaces and crates
run: |
cargo clippy --manifest-path=benches/Cargo.toml -- -D warnings -A dead-code
cargo clippy --manifest-path=common/Cargo.toml -- -D warnings -A dead-code
cargo clippy --manifest-path=protocols/Cargo.toml -- -D warnings -A dead-code
cargo clippy --manifest-path=roles/Cargo.toml -- -D warnings -A dead-code
cargo clippy --manifest-path=stratum-common/Cargo.toml -- -D warnings -A dead-code
cargo clippy --manifest-path=stratum-protocols/Cargo.toml -- -D warnings -A dead-code
cargo clippy --manifest-path=stratum-roles/Cargo.toml -- -D warnings -A dead-code
cargo clippy --manifest-path=utils/Cargo.toml -- -D warnings -A dead-code
cargo clippy --manifest-path=utils/message-generator/Cargo.toml -- -D warnings -A dead-code
6 changes: 3 additions & 3 deletions .github/workflows/fmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
- name: Run fmt in different workspaces and crates
run: |
cargo fmt --all --manifest-path=benches/Cargo.toml -- --check
cargo fmt --all --manifest-path=common/Cargo.toml -- --check
cargo fmt --all --manifest-path=protocols/Cargo.toml -- --check
cargo fmt --all --manifest-path=roles/Cargo.toml -- --check
cargo fmt --all --manifest-path=stratum-common/Cargo.toml -- --check
cargo fmt --all --manifest-path=stratum-protocols/Cargo.toml -- --check
cargo fmt --all --manifest-path=stratum-roles/Cargo.toml -- --check
cargo fmt --all --manifest-path=utils/Cargo.toml -- --check
cargo fmt --all --manifest-path=utils/message-generator/Cargo.toml -- --check
46 changes: 23 additions & 23 deletions .github/workflows/release-libs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,77 +42,77 @@ jobs:
- name: Publish crate no_serde_sv2_derive_codec
continue-on-error: true
run: |
cd protocols/v2/binary-sv2/no-serde-sv2/derive_codec
cd stratum-protocols/v2/binary-sv2/no-serde-sv2/derive_codec
cargo publish
- name: Publish crate no_serde_sv2_codec
continue-on-error: true
run: |
cd protocols/v2/binary-sv2/no-serde-sv2/codec
cd stratum-protocols/v2/binary-sv2/no-serde-sv2/codec
cargo publish
- name: Publish crate serde_sv2
continue-on-error: true
run: |
cd protocols/v2/binary-sv2/serde-sv2
cd stratum-protocols/v2/binary-sv2/serde-sv2
cargo publish
- name: Publish crate binary_sv2
continue-on-error: true
run: |
cd protocols/v2/binary-sv2/binary-sv2
cd stratum-protocols/v2/binary-sv2/binary-sv2
cargo publish
- name: Publish crate const_sv2
continue-on-error: true
run: |
cd protocols/v2/const-sv2
cd stratum-protocols/v2/const-sv2
cargo publish
- name: Publish crate framing_sv2
continue-on-error: true
run: |
cd protocols/v2/framing-sv2
cd stratum-protocols/v2/framing-sv2
cargo publish
- name: Publish crate noise_sv2
continue-on-error: true
run: |
cd protocols/v2/noise-sv2
cd stratum-protocols/v2/noise-sv2
cargo publish
- name: Publish crate codec_sv2
continue-on-error: true
run: |
cd protocols/v2/codec-sv2
cd stratum-protocols/v2/codec-sv2
cargo publish
- name: Publish crate common_messages
continue-on-error: true
run: |
cd protocols/v2/subprotocols/common-messages
cd stratum-protocols/v2/subprotocols/common-messages
cargo publish
- name: Publish crate job_declaration
continue-on-error: true
run: |
cd protocols/v2/subprotocols/job-declaration
cd stratum-protocols/v2/subprotocols/job-declaration
cargo publish
- name: Publish crate mining
continue-on-error: true
run: |
cd protocols/v2/subprotocols/mining
cd stratum-protocols/v2/subprotocols/mining
cargo publish
- name: Publish crate template_distribution
continue-on-error: true
run: |
cd protocols/v2/subprotocols/template-distribution
cd stratum-protocols/v2/subprotocols/template-distribution
cargo publish
- name: Publish crate sv2_ffi
continue-on-error: true
run: |
cd protocols/v2/sv2-ffi
cd stratum-protocols/v2/sv2-ffi
cargo publish --all-features
- name: Publish crate roles_logic_sv2
continue-on-error: true
run: |
cd protocols/v2/roles-logic-sv2
cd stratum-protocols/v2/roles-logic-sv2
cargo publish
- name: Publish crate v1
continue-on-error: true
run: |
cd protocols/v1
cd stratum-protocols/v1
cargo publish
- name: Publish crate bip32-key-derivation
continue-on-error: true
Expand All @@ -132,35 +132,35 @@ jobs:
- name: Publish crate network_helpers_sv2
continue-on-error: true
run: |
cd roles/roles-utils/network-helpers
cd stratum-roles/roles-utils/network-helpers
cargo publish
- name: Publish crate rpc_sv2
continue-on-error: true
run: |
cd roles/roles-utils/rpc
cd stratum-roles/roles-utils/rpc
cargo publish
- name: Publish crate jd_client
continue-on-error: true
run: |
cd roles/jd-client
cd stratum-roles/jd-client
cargo publish
- name: Publish crate jd_server
continue-on-error: true
run: |
cd roles/jd-server
cd stratum-roles/jd-server
cargo publish
- name: Publish crate mining_proxy_sv2
continue-on-error: true
run: |
cd roles/mining-proxy
cd stratum-roles/mining-proxy
cargo publish
- name: Publish crate pool_sv2
continue-on-error: true
run: |
cd roles/pool
cd stratum-roles/pool
cargo publish
- name: Publish crate translator_sv2
continue-on-error: true
run: |
cd roles/translator
cargo publish
cd stratum-roles/translator
cargo publish
4 changes: 2 additions & 2 deletions .github/workflows/rust-msrv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
- name: Build Benches
run: cargo build --manifest-path=benches/Cargo.toml
- name: Build Protocols
run: cargo build --manifest-path=protocols/Cargo.toml
run: cargo build --manifest-path=stratum-protocols/Cargo.toml
- name: Build Roles
run: cargo build --manifest-path=roles/Cargo.toml
run: cargo build --manifest-path=stratum-roles/Cargo.toml
- name: Build Utils
run: cargo build --manifest-path=utils/Cargo.toml
66 changes: 33 additions & 33 deletions .github/workflows/semver-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,60 +54,60 @@ jobs:
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
- name: Run semver checks for stratum-protocols/v2/binary-sv2/no-serde-sv2/codec
working-directory: stratum-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
- name: Run semver checks for stratum-protocols/v2/binary-sv2/serde-sv2
working-directory: stratum-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
- name: Run semver checks for stratum-protocols/v2/binary-sv2/binary-sv2
working-directory: stratum-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
- name: Run semver checks for stratum-protocols/v2/const-sv2
working-directory: stratum-protocols/v2/const-sv2
run: cargo semver-checks

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

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

- name: Run semver checks for protocols/v2/codec-sv2
working-directory: protocols/v2/codec-sv2
- name: Run semver checks for stratum-protocols/v2/codec-sv2
working-directory: stratum-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
- name: Run semver checks for stratum-protocols/v2/subprotocols/common-messages
working-directory: stratum-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
- name: Run semver checks for stratum-protocols/v2/subprotocols/job-declaration
working-directory: stratum-protocols/v2/subprotocols/job-declaration
run: cargo semver-checks

- name: Run semver checks for protocols/v2/subprotocols/mining
working-directory: protocols/v2/subprotocols/mining
- name: Run semver checks for stratum-protocols/v2/subprotocols/mining
working-directory: stratum-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
- name: Run semver checks for stratum-protocols/v2/subprotocols/template-distribution
working-directory: stratum-protocols/v2/subprotocols/template-distribution
run: cargo semver-checks

- name: Run semver checks for protocols/v2/sv2-ffi
working-directory: protocols/v2/sv2-ffi
- name: Run semver checks for stratum-protocols/v2/sv2-ffi
working-directory: stratum-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
- name: Run semver checks for stratum-protocols/v2/roles-logic-sv2
working-directory: stratum-protocols/v2/roles-logic-sv2
run: cargo semver-checks --default-features

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

- name: Run semver checks for utils/bip32-key-derivation
Expand All @@ -122,10 +122,10 @@ jobs:
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
- name: Run semver checks for stratum-roles/roles-utils/network-helpers
working-directory: stratum-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
- name: Run semver checks for stratum-roles/roles-utils/rpc
working-directory: stratum-roles/roles-utils/rpc
run: cargo semver-checks
14 changes: 7 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ jobs:
- name: Build
run: |
cargo build --manifest-path=benches/Cargo.toml
cargo build --manifest-path=common/Cargo.toml
cargo build --manifest-path=protocols/Cargo.toml
cargo build --manifest-path=roles/Cargo.toml
cargo build --manifest-path=stratum-common/Cargo.toml
cargo build --manifest-path=stratum-protocols/Cargo.toml
cargo build --manifest-path=stratum-roles/Cargo.toml
cargo build --manifest-path=utils/Cargo.toml
- name: Run sv1-client-and-server example
Expand Down Expand Up @@ -75,14 +75,14 @@ jobs:
- name: Test
run: |
cargo test --manifest-path=benches/Cargo.toml
cargo test --manifest-path=common/Cargo.toml
cargo test --manifest-path=protocols/Cargo.toml
cargo test --manifest-path=roles/Cargo.toml
cargo test --manifest-path=stratum-common/Cargo.toml
cargo test --manifest-path=stratum-protocols/Cargo.toml
cargo test --manifest-path=stratum-roles/Cargo.toml
cargo test --manifest-path=utils/Cargo.toml
- name: Property based testing
run: |
cargo test --manifest-path=protocols/Cargo.toml --features prop_test
cargo test --manifest-path=stratum-protocols/Cargo.toml --features prop_test
- name: Run ping-pong-with-noise example
run: |
Expand Down
Loading

0 comments on commit 1766776

Please sign in to comment.