Skip to content

Commit 6ecc652

Browse files
committed
Restructure repo to now only contain the low-level crates
- Moved roles to its own repository: https://github.com/stratum-mining/sv2-apps - Move protocols/v2 --> sv2/ - Move protocols/v2 --> sv1/ - Move protocols/stratum-translation --> stratum-core/stratum-translation - Move utils/buffer --> sv2/buffer-sv2 - Adapted scripts and workflows where needed
1 parent e42fd9a commit 6ecc652

File tree

375 files changed

+386
-38591
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

375 files changed

+386
-38591
lines changed

.github/workflows/clippy-lint.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ jobs:
2727
toolchain: 1.89
2828
override: true
2929
components: clippy
30-
- name: Run Clippy on different workspaces and crates
31-
run: ./scripts/rust/clippy.sh
30+
- name: Run Clippy
31+
run: |
32+
cargo clippy -- -D warnings

.github/workflows/coverage-protocols.yaml

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,95 +24,119 @@ jobs:
2424
- name: Upload protocols coverage to codecov.io
2525
uses: codecov/codecov-action@v4
2626
with:
27-
directory: ./protocols/target/tarpaulin-reports
28-
file: ./protocols/target/tarpaulin-reports/cobertura.xml
27+
directory: ./target/tarpaulin-reports
28+
file: ./target/tarpaulin-reports/cobertura.xml
2929
flags: protocols
3030
token: ${{ secrets.CODECOV_TOKEN }}
31-
31+
32+
- name: Upload binary_codec_sv2-coverage to codecov.io
33+
uses: codecov/codecov-action@v4
34+
with:
35+
directory: ./target/tarpaulin-reports/codec-coverage
36+
file: ./target/tarpaulin-reports/codec-coverage/cobertura.xml
37+
flags: binary_codec_sv2-coverage
38+
token: ${{ secrets.CODECOV_TOKEN }}
39+
3240
- name: Upload binary_sv2-coverage to codecov.io
3341
uses: codecov/codecov-action@v4
3442
with:
35-
directory: ./protocols/target/tarpaulin-reports/binary-sv2-coverage
36-
file: ./protocols/target/tarpaulin-reports/binary-sv2-coverage/cobertura.xml
43+
directory: ./target/tarpaulin-reports/binary-sv2-coverage
44+
file: ./target/tarpaulin-reports/binary-sv2-coverage/cobertura.xml
3745
flags: binary_sv2-coverage
3846
token: ${{ secrets.CODECOV_TOKEN }}
3947

4048
- name: Upload codec_sv2-coverage to codecov.io
4149
uses: codecov/codecov-action@v4
4250
with:
43-
directory: ./protocols/target/tarpaulin-reports/codec-sv2-coverage
44-
file: ./protocols/target/tarpaulin-reports/codec-sv2-coverage/cobertura.xml
51+
directory: ./target/tarpaulin-reports/codec-sv2-coverage
52+
file: ./target/tarpaulin-reports/codec-sv2-coverage/cobertura.xml
4553
flags: codec_sv2-coverage
4654
token: ${{ secrets.CODECOV_TOKEN }}
4755

4856
- name: Upload channels_sv2-coverage to codecov.io
4957
uses: codecov/codecov-action@v4
5058
with:
51-
directory: ./protocols/target/tarpaulin-reports/channels-sv2-coverage
52-
file: ./protocols/target/tarpaulin-reports/channels-sv2-coverage/cobertura.xml
59+
directory: ./target/tarpaulin-reports/channels-sv2-coverage
60+
file: ./target/tarpaulin-reports/channels-sv2-coverage/cobertura.xml
5361
flags: channels_sv2-coverage
5462
token: ${{ secrets.CODECOV_TOKEN }}
5563

5664
- name: Upload common_messages_sv2-coverage to codecov.io
5765
uses: codecov/codecov-action@v4
5866
with:
59-
directory: ./protocols/target/tarpaulin-reports/common-messages-coverage
60-
file: ./protocols/target/tarpaulin-reports/common-messages-coverage/cobertura.xml
67+
directory: ./target/tarpaulin-reports/common-messages-coverage
68+
file: ./target/tarpaulin-reports/common-messages-coverage/cobertura.xml
6169
flags: common_messages_sv2-coverage
6270
token: ${{ secrets.CODECOV_TOKEN }}
6371

6472
- name: Upload framing_sv2-coverage to codecov.io
6573
uses: codecov/codecov-action@v4
6674
with:
67-
directory: ./protocols/target/tarpaulin-reports/framing-sv2-coverage
68-
file: ./protocols/target/tarpaulin-reports/framing-sv2-coverage/cobertura.xml
75+
directory: ./target/tarpaulin-reports/framing-sv2-coverage
76+
file: ./target/tarpaulin-reports/framing-sv2-coverage/cobertura.xml
6977
flags: framing_sv2-coverage
7078
token: ${{ secrets.CODECOV_TOKEN }}
7179

7280
- name: Upload job_declaration_sv2-coverage to codecov.io
7381
uses: codecov/codecov-action@v4
7482
with:
75-
directory: ./protocols/target/tarpaulin-reports/job-declaration-coverage
76-
file: ./protocols/target/tarpaulin-reports/job-declaration-coverage/cobertura.xml
83+
directory: ./target/tarpaulin-reports/job-declaration-coverage
84+
file: ./target/tarpaulin-reports/job-declaration-coverage/cobertura.xml
7785
flags: job_declaration_sv2-coverage
7886
token: ${{ secrets.CODECOV_TOKEN }}
7987

8088
- name: Upload noise_sv2-coverage to codecov.io
8189
uses: codecov/codecov-action@v4
8290
with:
83-
directory: ./protocols/target/tarpaulin-reports/noise-sv2-coverage
84-
file: ./protocols/target/tarpaulin-reports/noise-sv2-coverage/cobertura.xml
91+
directory: ./target/tarpaulin-reports/noise-sv2-coverage
92+
file: ./target/tarpaulin-reports/noise-sv2-coverage/cobertura.xml
8593
flags: noise_sv2-coverage
8694
token: ${{ secrets.CODECOV_TOKEN }}
8795

8896
- name: Upload parsers_sv2-coverage to codecov.io
8997
uses: codecov/codecov-action@v4
9098
with:
91-
directory: ./protocols/target/tarpaulin-reports/parsers-sv2-coverage
92-
file: ./protocols/target/tarpaulin-reports/parsers-sv2-coverage/cobertura.xml
99+
directory: ./target/tarpaulin-reports/parsers-sv2-coverage
100+
file: ./target/tarpaulin-reports/parsers-sv2-coverage/cobertura.xml
93101
flags: parsers_sv2-coverage
94102
token: ${{ secrets.CODECOV_TOKEN }}
95103

104+
- name: Upload roles_logic_sv2-coverage to codecov.io
105+
uses: codecov/codecov-action@v4
106+
with:
107+
directory: ./target/tarpaulin-reports/roles-logic-sv2-coverage
108+
file: ./target/tarpaulin-reports/roles-logic-sv2-coverage/cobertura.xml
109+
flags: roles_logic_sv2-coverage
110+
token: ${{ secrets.CODECOV_TOKEN }}
111+
96112
- name: Upload v1-coverage to codecov.io
97113
uses: codecov/codecov-action@v4
98114
with:
99-
directory: ./protocols/target/tarpaulin-reports/v1-coverage
100-
file: ./protocols/target/tarpaulin-reports/v1-coverage/cobertura.xml
115+
directory: ./target/tarpaulin-reports/v1-coverage
116+
file: ./target/tarpaulin-reports/v1-coverage/cobertura.xml
101117
flags: v1-coverage
102118
token: ${{ secrets.CODECOV_TOKEN }}
103119

104120
- name: Upload template_distribution_sv2-coverage to codecov.io
105121
uses: codecov/codecov-action@v4
106122
with:
107-
directory: ./protocols/target/tarpaulin-reports/template-distribution-coverage
108-
file: ./protocols/target/tarpaulin-reports/template-distribution-coverage/cobertura.xml
123+
directory: ./target/tarpaulin-reports/template-distribution-coverage
124+
file: ./target/tarpaulin-reports/template-distribution-coverage/cobertura.xml
109125
flags: template_distribution_sv2-coverage
110126
token: ${{ secrets.CODECOV_TOKEN }}
111127

112128
- name: Upload mining-coverage to codecov.io
113129
uses: codecov/codecov-action@v4
114130
with:
115-
directory: ./protocols/target/tarpaulin-reports/mining-coverage
116-
file: ./protocols/target/tarpaulin-reports/mining-coverage/cobertura.xml
131+
directory: ./target/tarpaulin-reports/mining-coverage
132+
file: ./target/tarpaulin-reports/mining-coverage/cobertura.xml
117133
flags: mining-coverage
118134
token: ${{ secrets.CODECOV_TOKEN }}
135+
136+
- name: Upload handlers_sv2-coverage to codecov.io
137+
uses: codecov/codecov-action@v4
138+
with:
139+
directory: ./target/tarpaulin-reports/handlers-sv2-coverage
140+
file: ./target/tarpaulin-reports/handlers-sv2-coverage/cobertura.xml
141+
flags: handler_sv2-coverage
142+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/coverage-roles.yaml

Lines changed: 0 additions & 86 deletions
This file was deleted.

.github/workflows/coverage-utils.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/docs.yaml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,65 +31,70 @@ jobs:
3131
3232
- name: Rust Docs crate buffer_sv2
3333
run: |
34-
cd utils/buffer
34+
cd sv2/buffer-sv2
3535
cargo doc
3636
3737
- name: Rust Docs crate binary_sv2 derive_codec
3838
run: |
39-
cd protocols/v2/binary-sv2/derive_codec
39+
cd sv2/binary-sv2/derive_codec
4040
cargo doc
4141
4242
- name: Rust Docs crate binary_sv2
4343
run: |
44-
cd protocols/v2/binary-sv2
44+
cd sv2/binary-sv2
4545
cargo doc --features with_buffer_pool
4646
4747
- name: Rust Docs crate channels_sv2
4848
run: |
49-
cd protocols/v2/channels-sv2
49+
cd sv2/channels-sv2
5050
cargo doc
5151
5252
- name: Rust Docs crate parsers_sv2
5353
run: |
54-
cd protocols/v2/parsers-sv2
54+
cd sv2/parsers-sv2
5555
cargo doc
5656
5757
- name: Rust Docs crate framing_sv2
5858
run: |
59-
cd protocols/v2/framing-sv2
59+
cd sv2/framing-sv2
6060
cargo doc --features with_buffer_pool
6161
6262
- name: Rust Docs crate noise_sv2
6363
run: |
64-
cd protocols/v2/noise-sv2
64+
cd sv2/noise-sv2
6565
cargo doc --features std
6666
6767
- name: Rust Docs crate codec_sv2
6868
run: |
69-
cd protocols/v2/codec-sv2
69+
cd sv2/codec-sv2
7070
cargo doc --features with_buffer_pool,noise_sv2
7171
72+
- name: Rust Docs crate handlers_sv2
73+
run: |
74+
cd sv2/handlers-sv2
75+
cargo doc
76+
7277
- name: Rust Docs crate common_messages
7378
run: |
74-
cd protocols/v2/subprotocols/common-messages
79+
cd sv2/subprotocols/common-messages
7580
cargo doc
7681
7782
- name: Rust Docs crate job_declaration
7883
run: |
79-
cd protocols/v2/subprotocols/job-declaration
84+
cd sv2/subprotocols/job-declaration
8085
cargo doc --all-features
8186
8287
- name: Rust Docs crate mining
8388
run: |
84-
cd protocols/v2/subprotocols/mining
89+
cd sv2/subprotocols/mining
8590
cargo doc --all-features
8691
8792
- name: Rust Docs crate template_distribution
8893
run: |
89-
cd protocols/v2/subprotocols/template-distribution
94+
cd sv2/subprotocols/template-distribution
9095
cargo doc
9196
9297
- name: Rust Docs crate sv1_api
9398
run: |
94-
cd protocols/v1
99+
cd sv1
95100
cargo doc

.github/workflows/fmt.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,4 @@ jobs:
2929
components: rustfmt
3030
- name: Run fmt in different workspaces and crates
3131
run: |
32-
cargo fmt --all --manifest-path=stratum-core/Cargo.toml -- --check
33-
cargo fmt --all --manifest-path=protocols/Cargo.toml -- --check
34-
cargo fmt --all --manifest-path=roles/Cargo.toml -- --check
35-
cargo fmt --all --manifest-path=utils/Cargo.toml -- --check
36-
cargo fmt --all --manifest-path=test/integration-tests/Cargo.toml -- --check
32+
cargo fmt --all -- --check --verbose

.github/workflows/integration-tests.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
toolchain: stable
2525
override: true
2626

27-
- name: Install cargo-nextest
28-
run: cargo install cargo-nextest --locked
29-
30-
- name: Integration Tests
27+
- name: Run Integration Tests Script
3128
run: |
32-
RUST_BACKTRACE=1 RUST_LOG=debug cargo nextest run --manifest-path=test/integration-tests/Cargo.toml --nocapture
29+
./scripts/run-integration-tests.sh

0 commit comments

Comments
 (0)