Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit 8a03f86

Browse files
committed
Starting node from scratch
1 parent 7b609bd commit 8a03f86

Some content is hidden

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

107 files changed

+2190
-9462
lines changed

.dockerignore

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1-
/target
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
/target/
4+
5+
# These are backup files generated by rustfmt
26
**/*.rs.bk
3-
/data
7+
8+
# Compiled files
9+
*.o
10+
*.so
11+
*.rlib
12+
*.dll
13+
14+
# IDEs data
15+
/.idea
16+
/.vim
17+
/.vscode
18+
*.swp
19+
*.swo
20+
21+
# Rust code coverage-specific
22+
/kcov-build/

.github/workflows/build.yml

+83-8
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,100 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13+
default:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Install rust stable
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
toolchain: stable
21+
override: true
22+
- name: Default build
23+
uses: actions-rs/cargo@v1
24+
with:
25+
command: check
26+
args: --workspace
27+
features:
28+
runs-on: ubuntu-latest
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
feature:
33+
- serde
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Install rust stable
37+
uses: actions-rs/toolchain@v1
38+
with:
39+
toolchain: stable
40+
override: true
41+
- name: Feature ${{ matrix.feature }}
42+
uses: actions-rs/cargo@v1
43+
with:
44+
command: check
45+
args: --no-default-features --features=${{ matrix.feature }}
46+
- name: Defaults + ${{ matrix.feature }}
47+
uses: actions-rs/cargo@v1
48+
with:
49+
command: check
50+
args: --features=${{ matrix.feature }}
51+
platforms:
52+
runs-on: ${{ matrix.os }}
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
os: [ ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022 ]
57+
steps:
58+
- uses: actions/checkout@v2
59+
- name: Install rust stable
60+
uses: actions-rs/toolchain@v1
61+
with:
62+
toolchain: stable
63+
override: true
64+
- name: Build with all features
65+
uses: actions-rs/cargo@v1
66+
with:
67+
command: check
68+
args: --workspace --all-targets --all-features
1369
toolchains:
1470
runs-on: ubuntu-latest
1571
strategy:
1672
fail-fast: false
1773
matrix:
18-
toolchain: [ nightly, beta, stable, 1.47.0 ]
74+
toolchain: [ nightly, beta, stable, 1.59.0 ]
1975
steps:
2076
- uses: actions/checkout@v2
21-
- name: Install dependencies
22-
run: |
23-
sudo apt-get update
24-
sudo apt-get install -y libzmq3-dev libpcre3-dev libpq-dev libssl-dev
25-
- name: Install rust ${{matrix.toolchain}}
77+
- name: Install rust ${{ matrix.toolchain }}
2678
uses: actions-rs/toolchain@v1
2779
with:
28-
toolchain: ${{matrix.toolchain}}
80+
toolchain: ${{ matrix.toolchain }}
2981
override: true
3082
- name: All features
3183
uses: actions-rs/cargo@v1
3284
with:
33-
command: build
85+
command: check
3486
args: --workspace --all-targets --all-features
87+
dependency:
88+
runs-on: ubuntu-latest
89+
steps:
90+
- uses: actions/checkout@v2
91+
- name: Install latest stable
92+
uses: actions-rs/toolchain@v1
93+
with:
94+
toolchain: stable
95+
override: true
96+
- name: Create dependency
97+
run: |
98+
cargo new dep_test
99+
cp contrib/depCargo.toml dep_test/Cargo.toml
100+
cd dep_test
101+
- name: Build dependency
102+
uses: actions-rs/cargo@v1
103+
with:
104+
command: check
105+
args: --verbose
106+
- name: Clean up
107+
run: |
108+
cd ..
109+
rm -rf dep_test

.github/workflows/codecov.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Codecov
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
codecov:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Install latest nightly
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
toolchain: nightly
21+
override: true
22+
- name: Build & test
23+
uses: actions-rs/cargo@v1
24+
with:
25+
command: test
26+
args: --workspace --all-features --no-fail-fast
27+
env:
28+
CARGO_INCREMENTAL: '0'
29+
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
30+
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
31+
- id: coverage
32+
name: Generate coverage
33+
uses: actions-rs/[email protected]
34+
- name: Upload coverage to Codecov
35+
uses: codecov/codecov-action@v1
36+
with:
37+
file: ${{ steps.coverage.outputs.report }}
38+
directory: ./coverage/reports/

.github/workflows/lint.yml

+32-2
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,44 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v2
17-
- name: Install latest nightly
17+
- name: Install rustc nightly
1818
uses: actions-rs/toolchain@v1
1919
with:
2020
toolchain: nightly
2121
override: true
2222
components: rustfmt
2323
- uses: actions-rs/cargo@v1
24-
name: Lints
24+
name: Formatting
2525
with:
2626
command: fmt
2727
args: --all -- --check
28+
clippy:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Install rustc stable
33+
uses: actions-rs/toolchain@v1
34+
with:
35+
toolchain: stable
36+
override: true
37+
components: clippy
38+
- uses: actions-rs/cargo@v1
39+
name: Clippy
40+
with:
41+
command: clippy
42+
args: --workspace --all-features
43+
doc:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v2
47+
- name: Install rustc nightly
48+
uses: actions-rs/toolchain@v1
49+
with:
50+
toolchain: nightly
51+
override: true
52+
components: rust-docs
53+
- uses: actions-rs/cargo@v1
54+
name: Clippy
55+
with:
56+
command: doc
57+
args: --workspace --all-features

.github/workflows/publication.yml

-17
This file was deleted.

.github/workflows/test.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
testing:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Install latest stable
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
toolchain: stable
21+
override: true
22+
- name: Build & test
23+
uses: actions-rs/cargo@v1
24+
with:
25+
command: test
26+
args: --workspace --all-features --no-fail-fast

.gitignore

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Generated by Cargo
2-
# will have compiled files and executables
31
/target
42

53
# These are backup files generated by rustfmt
@@ -9,6 +7,4 @@
97

108
# Temporary directory for debug data storage
119
/data
12-
# /sample
13-
14-
test/data
10+
/dep_test

.rustfmt.toml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1+
edition = "2021"
2+
13
max_width = 100
24
array_width = 100
35
attr_fn_like_width = 100
46
comment_width = 100
7+
chain_width = 100
8+
fn_call_width = 100
59
single_line_if_else_max_width = 100
610

711
format_code_in_doc_comments = true
812
fn_single_line = true
913
format_macro_matchers = true
10-
format_strings = false
14+
format_strings = true
1115
merge_derives = false
1216
overflow_delimited_expr = true
1317
reorder_modules = false
1418
use_field_init_shorthand = true
1519
use_try_shorthand = true
16-
wrap_comments = false
20+
wrap_comments = true
1721
where_single_line = true
1822
unstable_features = true
1923

0 commit comments

Comments
 (0)